Full Code of openlgtv/epk2extract for AI

master 22a910d5578d cached
237 files
1.5 MB
516.7k tokens
1774 symbols
1 requests
Download .txt
Showing preview only (1,660K chars total). Download the full file or copy to clipboard to get everything.
Repository: openlgtv/epk2extract
Branch: master
Commit: 22a910d5578d
Files: 237
Total size: 1.5 MB

Directory structure:
gitextract_meo9h1xu/

├── .cirrus.yml
├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .sonarcloud_gen.sh
├── AUTHORS
├── CMakeLists.txt
├── COPYING
├── README.md
├── build.sh
├── cmake-modules/
│   └── FindLZO.cmake
├── code_format.sh
├── include/
│   ├── common.h
│   ├── config.h
│   ├── cramfs/
│   │   ├── cramfs.h
│   │   ├── cramfs_fs.h
│   │   └── cramfsswap.h
│   ├── crc.h
│   ├── epk.h
│   ├── epk1.h
│   ├── epk2.h
│   ├── epk3.h
│   ├── jffs2/
│   │   ├── jffs2.h
│   │   └── mini_inflate.h
│   ├── log.h
│   ├── lz4/
│   │   ├── bench.h
│   │   ├── lz4.h
│   │   └── lz4hc.h
│   ├── lzhs/
│   │   ├── lzhs.h
│   │   └── tables.h
│   ├── lzma/
│   │   ├── LzFind.h
│   │   ├── LzHash.h
│   │   ├── LzmaDec.h
│   │   ├── LzmaEnc.h
│   │   └── Types.h
│   ├── lzma.h
│   ├── lzo/
│   │   ├── lzo.h
│   │   ├── miniacc.h
│   │   ├── portab.h
│   │   └── portab_a.h
│   ├── main.h
│   ├── mediatek.h
│   ├── mediatek_pkg.h
│   ├── mfile.h
│   ├── minigzip.h
│   ├── os_byteswap.h
│   ├── osx/
│   │   └── elf.h
│   ├── philips.h
│   ├── realtek/
│   │   └── rtsplit.h
│   ├── realtek.h
│   ├── sniptype.h
│   ├── squashfs/
│   │   ├── action.h
│   │   ├── caches-queues-lists.h
│   │   ├── compressor.h
│   │   ├── error.h
│   │   ├── gzip_wrapper.h
│   │   ├── info.h
│   │   ├── lz4_wrapper.h
│   │   ├── lzo_wrapper.h
│   │   ├── mksquashfs.h
│   │   ├── process_fragments.h
│   │   ├── progressbar.h
│   │   ├── pseudo.h
│   │   ├── read_fs.h
│   │   ├── restore.h
│   │   ├── sort.h
│   │   ├── squashfs_compat.h
│   │   ├── squashfs_fs.h
│   │   ├── squashfs_swap.h
│   │   ├── unsquashfs.h
│   │   ├── unsquashfs_info.h
│   │   ├── xattr.h
│   │   └── xz_wrapper.h
│   ├── stream/
│   │   ├── crc32.h
│   │   └── tsfile.h
│   ├── symfile.h
│   ├── thpool.h
│   ├── u-boot/
│   │   ├── image.h
│   │   ├── mtdinfo.h
│   │   ├── partcommon.h
│   │   ├── partinfo.h
│   │   ├── partinfov1.h
│   │   └── partinfov2.h
│   ├── util.h
│   └── util_crypto.h
├── keys/
│   ├── AES.key
│   ├── MTK.key
│   ├── README.md
│   ├── e60.pem
│   ├── e60n.pem
│   ├── general_pub.pem
│   ├── h15.pem
│   ├── k24.pem
│   ├── k24n.pem
│   ├── k24t.pem
│   ├── k25lp.pem
│   ├── k2l.pem
│   ├── k2lp.pem
│   ├── k3lp.pem
│   ├── k5lp.pem
│   ├── k6hp.pem
│   ├── k6lp.pem
│   ├── k6lpfhd.pem
│   ├── k6lpwee.pem
│   ├── k7lp.pem
│   ├── k8ap.pem
│   ├── k8apwee.pem
│   ├── k8hp-hotel.pem
│   ├── k8hp.pem
│   ├── k8hpp.pem
│   ├── k8hpt.pem
│   ├── k8hpwee.pem
│   ├── k8lp-hotel.pem
│   ├── k8lp.pem
│   ├── k8lpn-hotel.pem
│   ├── k8lpn.pem
│   ├── k8lpn2.pem
│   ├── k8lpwee.pem
│   ├── kf23f-mnt.pem
│   ├── kf23f.pem
│   ├── kf23fwee.pem
│   ├── kid23q.pem
│   ├── lg1152.pem
│   ├── lg1154_netcast.pem
│   ├── lg1154_webos.pem
│   ├── lm14.pem
│   ├── lm15u.pem
│   ├── lm18a.pem
│   ├── lm21a.pem
│   ├── lm21an.pem
│   ├── lm21ann.pem
│   ├── lm21u.pem
│   ├── lm21ut.pem
│   ├── m14.pem
│   ├── m16.pem
│   ├── m16p.pem
│   ├── m16p3.pem
│   ├── m16pp.pem
│   ├── m23.pem
│   ├── m2_sspm.pem
│   ├── m3.pem
│   ├── mtk5369.pem
│   ├── mtk5398.pem
│   ├── netflix_pub.pem
│   ├── o18.pem
│   ├── o18_2019.pem
│   ├── o18k.pem
│   ├── o20.pem
│   ├── o208k.pem
│   ├── o20n.pem
│   ├── o22.pem
│   ├── o22n.pem
│   ├── o22n2.pem
│   ├── o22n28k.pem
│   ├── o22n3.pem
│   ├── o24.pem
│   └── o24n.pem
├── partinfo.py
├── sonar-project.properties
└── src/
    ├── CMakeLists.txt
    ├── cramfs/
    │   ├── CMakeLists.txt
    │   ├── cramfsswap.c
    │   └── uncramfs.c
    ├── crc32.c
    ├── epk.c
    ├── epk1.c
    ├── epk2.c
    ├── epk3.c
    ├── jffs2/
    │   ├── CMakeLists.txt
    │   ├── crc32.cpp
    │   ├── jffs2extract.cpp
    │   └── mini_inflate.cpp
    ├── lz4/
    │   ├── CMakeLists.txt
    │   ├── bench.c
    │   ├── lz4.c
    │   ├── lz4_format_description.txt
    │   ├── lz4demo.c
    │   └── lz4hc.c
    ├── lzhs/
    │   ├── CMakeLists.txt
    │   ├── lzhs.c
    │   └── lzhs_lib.c
    ├── lzma/
    │   ├── CMakeLists.txt
    │   ├── LzFind.c
    │   ├── LzmaDec.c
    │   └── LzmaEnc.c
    ├── lzo-lg.c
    ├── main.c
    ├── mediatek.c
    ├── mediatek_pkg.c
    ├── mfile.c
    ├── minigzip.c
    ├── partinfo.c
    ├── philips.c
    ├── realtek.c
    ├── squashfs/
    │   ├── CMakeLists.txt
    │   ├── action.c
    │   ├── caches-queues-lists.c
    │   ├── compressor.c
    │   ├── gzip_wrapper.c
    │   ├── info.c
    │   ├── lz4_wrapper.c
    │   ├── lzma_wrapper.c
    │   ├── lzma_xz_wrapper.c
    │   ├── lzo_wrapper.c
    │   ├── mksquashfs.c
    │   ├── process_fragments.c
    │   ├── progressbar.c
    │   ├── pseudo.c
    │   ├── read_file.c
    │   ├── read_fs.c
    │   ├── read_xattrs.c
    │   ├── restore.c
    │   ├── sort.c
    │   ├── swap.c
    │   ├── unsquash-1.c
    │   ├── unsquash-2.c
    │   ├── unsquash-3.c
    │   ├── unsquash-4.c
    │   ├── unsquashfs.c
    │   ├── unsquashfs_info.c
    │   ├── unsquashfs_xattr.c
    │   ├── xattr.c
    │   └── xz_wrapper.c
    ├── stream/
    │   ├── CMakeLists.txt
    │   ├── crc32.c
    │   └── tsfile.c
    ├── symfile.c
    ├── thpool.c
    ├── tools/
    │   ├── CMakeLists.txt
    │   ├── idb_extract.c
    │   ├── jffs2extract.c
    │   ├── lzhs_scanner.c
    │   ├── lzhsenc.c
    │   └── tsfile.c
    ├── util.c
    └── util_crypto.c

================================================
FILE CONTENTS
================================================

================================================
FILE: .cirrus.yml
================================================
env:
  CIRRUS_CLONE_DEPTH: 1

linux_x64_task:
  container:
    cpu: 2
    memory: 2G
    image: gcc:15.2.0

  install_script:
    - apt-get update -qq
    - apt-get install -qq liblzo2-dev libssl-dev libc6-dev cmake

  build_script:
    - ./build.sh

darwin_aarch64_task:
  macos_instance:
    image: ghcr.io/cirruslabs/macos-ventura-base:latest

  install_script:
    - brew install openssl@3 lzo
    - brew reinstall openssl@3

  build_script:
    - ./build.sh


================================================
FILE: .editorconfig
================================================
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true


================================================
FILE: .gitattributes
================================================
# auto-detect text files; use LF
* text=auto eol=lf

# text extensions
*.txt text
*.md text
*.c text
*.h text
*.cpp text
*.yml text
*.cmake text

# important that these use LF
*.sh text eol=lf
*.py text eol=lf

# specific text filenames
.gitattributes text
.gitignore text
.editorconfig text
AUTHORS text
COPYING text


================================================
FILE: .github/workflows/build.yml
================================================
name: SonarQube
on:
  push:
    branches:
      - master
      - develop
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  build:
    name: Build and analyze
    runs-on: ubuntu-latest
    env:
      BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Shallow clones should be disabled for a better relevancy of analysis
      - name: Install Dependencies
        run: |
          sudo apt-get install -y git build-essential cmake liblzo2-dev libssl-dev libc6-dev
      - name: Install Build Wrapper
        uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5
      - name: Run Build Wrapper
        run: |
          build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ./build.sh
      - name: SonarQube Scan
        uses: SonarSource/sonarqube-scan-action@v5
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        with:
          args: >
            --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"



================================================
FILE: .gitignore
================================================
### CMake ###
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt

### C ###
# Object files
*.o

# Libraries
*.a
*.la

# Executables
*.exe
*.out


### Epk2Extract ###

# build
build_linux
build_cygwin
build_osx

# Linux build artifacts
src/epk2extract
src/tools/idb_extract
src/tools/jffs2extract
src/tools/lzhs_scanner
src/tools/lzhsenc


================================================
FILE: .sonarcloud_gen.sh
================================================
#!/bin/sh
csv_prop(){
	echo -ne "$1="
	cat | paste -sd,
}

gen(){
	cat <<-EOF
	## THIS FILE IS AUTOGENERATED
	## edit .sonarcloud_gen.sh instead
	sonar.projectKey=openlgtv_epk2extract
	sonar.organization=openlgtv

	EOF

	(cat <<-EOF
	r1
	EOF
	) | csv_prop "sonar.issue.ignore.multicriteria"

	echo ""

	cat <<-EOF
	# format string is not a string literal
	sonar.issue.ignore.multicriteria.r1.ruleKey=c:S5281
	sonar.issue.ignore.multicriteria.r1.resourceKey=**
	EOF

	echo ""

	(cat <<-EOF
	src/*.c
	src/lzhs/*.c
	src/stream/*.c
	src/tools/*.c
	include/*.h
	include/lzhs/*.h
	include/realtek/*.h
	include/stream/*.h
	EOF
	) | csv_prop "sonar.inclusions"

}

cd "$(dirname "$(readlink -f "$0")")"
gen > sonar-project.properties


================================================
FILE: AUTHORS
================================================
This project is covered by the GPL licence. See COPYING for details.

epk2extract contributors list:
- Arno1
- cronix
- jenya
- lprot
- rtokarev (sym handling)
- Smx (smxdev4@gmail.com, current maintainer)
- sirius (original author of epk2extract)
- tbage
- xeros

Special thanks to:
- All the testers
- Authors of the original compression algorithms and libraries


================================================
FILE: CMakeLists.txt
================================================
set(CMAKE_LEGACY_CYGWIN_WIN32 0)

cmake_minimum_required(VERSION 3.13)
project(epk2extract)

if( NOT CMAKE_BUILD_TYPE )
	set(CMAKE_BUILD_TYPE Debug)
endif()

set(CMAKE_CXX_FLAGS_TEST "-Ofast")
set(CMAKE_C_FLAGS_TEST "-Ofast -funroll-loops -fprefetch-loop-arrays -march=native")

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)

set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake-modules/")
find_package(OpenSSL REQUIRED)
find_package(LZO REQUIRED)
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)
find_library(M_LIB m REQUIRED)

add_subdirectory(src)


================================================
FILE: COPYING
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


================================================
FILE: README.md
================================================
[![Build Status](https://travis-ci.org/openlgtv/epk2extract.svg?branch=master)](https://travis-ci.org/openlgtv/epk2extract)

epk2extract
===========

[![Join the chat at https://gitter.im/openlgtv/epk2extract](https://badges.gitter.im/openlgtv/epk2extract.svg)](https://gitter.im/openlgtv/epk2extract?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Join on Discord: https://discord.gg/xWqRVEm

epk2extract is a tool that can extract, decrypt, convert multiple file formats that can be found in LG TV sets and similar devices.

Supported Formats:
===========================================
**NOTE: To unpack epk v2 and v3 you need proper AES and RSA keys for decryption. To get them you will need to dump them from a running TV.**

**NOTE: To decrypt PVR recordings you need a dump of the unique AES-128 key from your TV**

| Format	| Notes
| :-----	| :-----
| epk v1	| First version of epk format, not encrypted and not signed
| epk v2	| Introduces signing and encryption, keys needed
| epk v3   	| Introduced with WebOS. Keys needed
| Mediatek pkg | UPG/PKG files used by Hisense/Sharp/Philips (missing Philips AES key) and possibly others
| Philips "fusion" | Upgrade files used by some Philips TVs
| squashfs	|
| cramfs	|
| lz4		| Slightly modified version with header magic
| lzo		|
| gzip		|
| jffs2		|
| lzhs		| Special compression for MTK bootloaders (boot.pak, tzfw.pak), uses lzss + huffman
| lzhs_fs   | LZHS compressed filesystem used in MTK Upgrade files for the external writable partition (3rdw)
| mtdinfo/partinfo |  LG Partition table format (mtdi.pak, part.pak)
| str/pif	| PVR recording format that can be found in netcast models
| sym		| LG Debugging symbols. Can extract function names and addresses to an IDA script file (idc)

Although epk2extract is only tested on LG firmware files, you may use it to extract other files like a general unpack tool, as long as they are supported according to the table above.

**!!WARNING!!**<br>
**epk2extract isn't designed to repack files**<br>
**If you wish to repack modified files, follow the openlgtv wiki/forum, and do it in a Linux environment (no cygwin)**<br>
**Don't repack files extracted in cygwin environment**<br>
**In any case, you do so at your own risk**<br>

*THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE*

| Tools:	| Description
| :----		| :----
| lzhsenc	| Compresses a given file with lzhs algorithm
| lzhs_scanner	| Scans a given file to find lzhs files, and extracts them
| idb_extract | Extracts Image Database (IDB) files that can be found in LG firmwares
| jffs2extract | Extracts JFFS2 images. Supports various compression algorithms


To compile on Linux:
===========================================

### Install build dependencies:
Ubuntu/Debian:
```shell
apt-get install git build-essential cmake liblzo2-dev libssl-dev libc6-dev zlib1g-dev
```
Mandriva/Mageia:
```shell
urpmi git task-c++-devel cmake liblzo-devel libopenssl-devel glibc-devel --auto
```

### Build it
```shell
./build.sh
```

After building, epk2extract can be found in ./build_\<platform\>/


To compile on Cygwin:
=====================

### Install Cygwin and during setup select following packages:

    Devel -> gcc-g++, git, cmake, make
    Libs  -> liblzo2-devel, zlib-devel
    Net   -> openssl-devel
    Utils -> ncurses

### Build it
```shell
./build.sh
```

The build script automatically copies required shared libraries to the ./build_cygwin/ folder, so you can use epk2extract standalone/portable without a full cygwin installation.


=====================
### How to speed up extraction process
You can build the test build, which contains compiler optimizations, with this command
```shell
CMAKE_FLAGS=-DCMAKE_BUILD_TYPE=Test ./build.sh
```
The Test build is orders of magnitude faster than the Debug build

### To use:

Put *.pem and AES.key files in the same directory as the epk2extract binary.

Run it via sudo/fakeroot to avoid warnings (while extracting device nodes from rootfs):

    fakeroot ./epk2extract file

## To get IDC from SYM run:

    ./epk2extract xxxxxxxx.sym

## To decode part.pak or mtdi.pak do:

    ./epk2extract part.pak

Or use partinfo.py (**deprected**)

    python partinfo.py part.pak


================================================
FILE: build.sh
================================================
#!/bin/bash
#epk2extract build script
#Copyright 2016 Smx <smxdev4@gmail.com>
#All right reserved

normal='tput sgr0'
lred='printf \033[01;31m'
lgreen='printf \033[01;32m'
lyellow='printf \033[01;33m'
lblue='printf \033[01;34m'
white='printf \033[01;37m'

cwd=$(pwd)
srcdir=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd`

exe=(
	"epk2extract" "tools/lzhsenc"
	"tools/lzhs_scanner" "tools/idb_extract"
	"tools/jffs2extract" "tools/tsfile"
)

nproc_cmd="nproc"

if [ "$OSTYPE" == "cygwin" ]; then rel=build_cygwin
elif [[ "$OSTYPE" =~ "linux" ]]; then rel=build_linux
elif [[ "$OSTYPE" =~ "darwin" ]]; then
	nproc_cmd="sysctl -n hw.logicalcpu"
	rel=build_osx
	CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl ${CMAKE_FLAGS}"
else
	$lred; "Can't build - unknown OS type. Aborting..."; $normal
	exit 1
fi

installdir=$srcdir/$rel
objdir=$installdir/obj

cd $srcdir

if [ "$1" == "clean" ]; then
	$lyellow; echo "Removing cmake cache and make files"; $normal
	rm -r $objdir
	if [ -d "$installdir" ]; then
		$lyellow; echo "Removing build dir"; $normal
		rm -r "$installdir"
	fi
	$lgreen; echo "Done!"; $normal
	exit 0
fi

$lyellow; echo "Building epk2extract"; $normal
if [ ! -e "$rel/obj" ]; then
	mkdir -p $objdir
fi

cd $objdir

NUM_THREADS=$($nproc_cmd)

case "$1" in
	"-v")
		MAKE_FLAGS="${MAKE_ARGS} VERBOSE=1 -j${NUM_THREADS}"
		;;
esac

cmake $srcdir $CMAKE_FLAGS
make $MAKE_FLAGS
RESULT=$?
cd src

if [ ! $RESULT -eq 0 ]; then
	$lred; echo "Build Failed!"; $normal
	exit 1
fi

if [ "$rel" == "build_cygwin" ]; then
	for exe in ${exe[@]}; do
		cp $exe.exe $installdir/
	done
	if [ "$HOSTTYPE" == "i686" ]; then #cygwin32
		sharedlibs=("cygz.dll" "cygwin1.dll" "cyglzo2-2.dll" "cyggcc_s-1.dll" "cygcrypto-1.1.dll" "cygstdc++-6.dll")
	elif [ "$HOSTTYPE" == "x86_64" ]; then #cygwin64
		sharedlibs=("cygz.dll" "cygwin1.dll" "cyglzo2-2.dll" "cygcrypto-1.1.dll" "cyggcc_s-seh-1.dll" "cygstdc++-6.dll")
	fi
	for cyglib in ${sharedlibs[@]}; do
		$white; echo "Installing $cyglib"; $normal
		islibok=$(which "$cyglib" &>/dev/null; echo $?)
		if [ $islibok == 0 ]; then
			cp `which $cyglib` $installdir/
		else
			$lred
			echo "Something wrong! $cyglib not found."
			echo "Verify your cygwin installation and try again."
			$normal
			exit 1
		fi
	done
else
	for exe in ${exe[@]}; do
		cp $exe $installdir/
	done
fi

if [ -d "$srcdir/keys" ]; then
	for key in $(find ${srcdir}/keys -iname "*.pem" -or -iname "*.key" | sort); do
		$lblue; echo "Installing $(basename $key)"; $normal
		cp $key $installdir/
	done
fi
$lgreen; echo "Build completed!"; $normal
exit 0


================================================
FILE: cmake-modules/FindLZO.cmake
================================================
# Find liblzo2
# LZO_FOUND - system has the LZO library
# LZO_INCLUDE_DIR - the LZO include directory
# LZO_LIBRARIES - The libraries needed to use LZO

if (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
	# in cache already
	SET(LZO_FOUND TRUE)
else (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
	FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h
		 ${LZO_ROOT}/include/
		 /usr/include/
		 /usr/local/include/
		 /sw/lib/
		 /sw/local/lib/
	)

	if(WIN32 AND MSVC)
	else(WIN32 AND MSVC)
		FIND_LIBRARY(LZO_LIBRARIES NAMES lzo2
			PATHS
			${LZO_ROOT}/lib
			/usr/lib
			/usr/local/lib
			/sw/lib
			/sw/local/lib
		)
	endif(WIN32 AND MSVC)

	if (LZO_INCLUDE_DIR AND LZO_LIBRARIES)
		 set(LZO_FOUND TRUE)
	endif (LZO_INCLUDE_DIR AND LZO_LIBRARIES)

	if (LZO_FOUND)
		 if (NOT LZO_FIND_QUIETLY)
				message(STATUS "Found LZO: ${LZO_LIBRARIES}")
		 endif (NOT LZO_FIND_QUIETLY)
	else (LZO_FOUND)
		 if (LZO_FIND_REQUIRED)
				message(FATAL_ERROR "Could NOT find LZO")
		 endif (LZO_FIND_REQUIRED)
	endif (LZO_FOUND)

	MARK_AS_ADVANCED(LZO_INCLUDE_DIR LZO_LIBRARIES)
endif (LZO_INCLUDE_DIR AND LZO_LIBRARIES)


================================================
FILE: code_format.sh
================================================
#!/bin/bash
function my_indent() {
	file="$1"
	indent \
		--linux-style \
		--use-tabs \
		--tab-size4 \
		--indent-level4 \
		--preprocessor-indentation4 \
		--else-endif-column0 \
		--braces-on-if-line \
		--braces-on-func-def-line \
		--braces-on-struct-decl-line \
		--line-length0 \
			"$file"
}

if [ -z "$1" ]; then
	dirs="src include"
elif [ -d "$1" ]; then
	dirs="$1"
elif [ -f "$1" ]; then
	echo "Reindenting ${1}..."
	my_indent "$1"
	exit 0
fi

for file in `find src include -type f -name "*.c" -or -name "*.cpp" -or -name "*.h"`; do
	echo "Reindenting ${file}..."
	my_indent "$file"
done
exit 0


================================================
FILE: include/common.h
================================================
/**
 * Copyright 2016 Smx <smxdev4@gmail.com>
 * All right reserved
 */
#ifndef __COMMON_H
#define __COMMON_H

/* Branch Prediction Hints */
#ifdef __GNUC__
#define LIKELY(x)    __builtin_expect (!!(x), 1)
#define UNLIKELY(x)  __builtin_expect (!!(x), 0)
#else
#define LIKELY(x)	(x)
#define UNLIKELY(x)	(x)
#endif

#ifdef __GNUC__
#define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
#else
#define UNUSED(x) UNUSED_ ## x
#endif

#ifdef __GNUC__
#define UNUSED_FUNCTION(x) __attribute__((__unused__)) UNUSED_ ## x
#else
#define UNUSED_FUNCTION(x) UNUSED_ ## x
#endif

#ifdef __GNUC__
#define FORMAT_PRINTF(x, y) __attribute__((__format__(__printf__, (x), (y))))
#else
#define FORMAT_PRINTF(x, y)
#endif

#define countof(x) (sizeof(x) / sizeof((x)[0]))

#endif


================================================
FILE: include/config.h
================================================
/**
 * Copyright 20xx sirius
 * All right reserved
 */
#ifndef CONFIG_H_
#    define CONFIG_H_

#include <stdbool.h>

typedef struct {
	char *config_dir;
	char *dest_dir;
	int enableSignatureChecking;
	bool noAutoUnsquashfs;
	bool signatureOnly;
} config_opts_t;

extern config_opts_t config_opts;

#    define G_DIR_SEPARATOR_S "/"

#    if defined(__APPLE__)
#        include <sys/syslimits.h>
#    elif defined(__CYGWIN__)
#        include <limits.h>
#    else
#        include <linux/limits.h>
#    endif

#    ifndef PATH_MAX
#        define PATH_MAX        4096	/* # chars in a path name including nul */
#    endif

#endif /* CONFIG_H_ */


================================================
FILE: include/cramfs/cramfs.h
================================================
#ifndef __CRAMFS_H
#define __CRAMFS_H

#define CRAMFS_MAGIC		0x28cd3d45
										/* some random number */
#define CRAMFS_SIGNATURE	"Compressed ROMFS"

// Needed by cramfs
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;

/*
 * Reasonably terse representation of the inode data.
 */
struct cramfs_inode {
	u32 mode:16, uid:16;
	/* SIZE for device files is i_rdev */
	u32 size:24, gid:8;
	/* NAMELEN is the length of the file name, divided by 4 and
	   rounded up.  (cramfs doesn't support hard links.) */
	/* OFFSET: For symlinks and non-empty regular files, this
	   contains the offset (divided by 4) of the file data in
	   compressed form (starting with an array of block pointers;
	   see README).  For non-empty directories it is the offset
	   (divided by 4) of the inode of the first file in that
	   directory.  For anything else, offset is zero. */
	u32 namelen:6, offset:26;
};

/*
 * Superblock information at the beginning of the FS.
 */
struct cramfs_super {
	u32 magic;					/* 0x28cd3d45 - random number */
	u32 size;					/* Not used.  mkcramfs currently
								   writes a constant 1<<16 here. */
	u32 flags;					/* 0 */
	u32 future;					/* 0 */
	u8 signature[16];			/* "Compressed ROMFS" */
	u8 fsid[16];				/* random number */
	u8 name[16];				/* user-defined name */
	struct cramfs_inode root;	/* Root inode data */
};

/*
 * Valid values in super.flags.  Currently we refuse to mount
 * if (flags & ~CRAMFS_SUPPORTED_FLAGS).  Maybe that should be
 * changed to test super.future instead.
 */
#define CRAMFS_SUPPORTED_FLAGS (0xff)

/* Uncompression interfaces to the underlying zlib */
int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen);
int cramfs_uncompress_init(void);
int cramfs_uncompress_exit(void);

int is_cramfs_image(char const *imagefile, char *endian);
int uncramfs(char const *dirname, char const *imagefile);

#endif


================================================
FILE: include/cramfs/cramfs_fs.h
================================================
#ifndef __CRAMFS_FS_H
#    define __CRAMFS_FS_H

#    include <sys/types.h>

#    define CRAMFS_MAGIC		0x28cd3d45
										/* some random number */

// Needed by cramfs
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;

/*
 * Width of various bitfields in struct cramfs_inode.
 * Primarily used to generate warnings in mkcramfs.
 */
#    define CRAMFS_MODE_WIDTH 16
#    define CRAMFS_UID_WIDTH 16
#    define CRAMFS_SIZE_WIDTH 24
#    define CRAMFS_GID_WIDTH 8
#    define CRAMFS_NAMELEN_WIDTH 6
#    define CRAMFS_OFFSET_WIDTH 26

/*
 * Since inode.namelen is a unsigned 6-bit number, the maximum cramfs
 * path length is 63 << 2 = 252.
 */
#    define CRAMFS_MAXPATHLEN (((1 << CRAMFS_NAMELEN_WIDTH) - 1) << 2)

/*
 * Reasonably terse representation of the inode data.
 */
struct cramfs_inode {
	u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH;
	/* SIZE for device files is i_rdev */
	u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH;
	/* NAMELEN is the length of the file name, divided by 4 and
	   rounded up.  (cramfs doesn't support hard links.) */
	/* OFFSET: For symlinks and non-empty regular files, this
	   contains the offset (divided by 4) of the file data in
	   compressed form (starting with an array of block pointers;
	   see README).  For non-empty directories it is the offset
	   (divided by 4) of the inode of the first file in that
	   directory.  For anything else, offset is zero. */
	u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH;
};

struct cramfs_info {
	u32 crc;
	u32 edition;
	u32 blocks;
	u32 files;
};

/*
 * Superblock information at the beginning of the FS.
 */
struct cramfs_super {
	u32 magic;					/* 0x28cd3d45 - random number */
	u32 size;					/* length in bytes */
	u32 flags;					/* feature flags */
	u32 future;					/* reserved for future use */
	u8 signature[16];			/* "Compressed ROMFS" */
	struct cramfs_info fsid;	/* unique filesystem info */
	u8 name[16];				/* user-defined name */
	struct cramfs_inode root;	/* root inode data */
};

/*
 * Feature flags
 *
 * 0x00000000 - 0x000000ff: features that work for all past kernels
 * 0x00000100 - 0xffffffff: features that don't work for past kernels
 */
#    define CRAMFS_FLAG_FSID_VERSION_2	0x00000001
												/* fsid version #2 */
#    define CRAMFS_FLAG_SORTED_DIRS		0x00000002
												/* sorted dirs */
#    define CRAMFS_FLAG_HOLES		0x00000100
											/* support for holes */
#    define CRAMFS_FLAG_WRONG_SIGNATURE	0x00000200
												/* reserved */
#    define CRAMFS_FLAG_SHIFTED_ROOT_OFFSET	0x00000400
													/* shifted root fs */

/*
 * Valid values in super.flags.  Currently we refuse to mount
 * if (flags & ~CRAMFS_SUPPORTED_FLAGS).  Maybe that should be
 * changed to test super.future instead.
 */
#    define CRAMFS_SUPPORTED_FLAGS	( 0x000000ff \
				| CRAMFS_FLAG_HOLES \
				| CRAMFS_FLAG_WRONG_SIGNATURE \
				| CRAMFS_FLAG_SHIFTED_ROOT_OFFSET )

#endif /* __CRAMFS_FS_H */


================================================
FILE: include/cramfs/cramfsswap.h
================================================
#ifndef __CRAMFSSWAP_H
#define __CRAMFSSWAP_H
int cramswap(char *sinfile, char *soutfile);
#endif //__CRAMFSSWAP_H


================================================
FILE: include/crc.h
================================================
/*
**  CRC.H - header file for SNIPPETS CRC and checksum functions
*/

#ifndef CRC__H
#    define CRC__H

#    include <stdlib.h>			/* For size_t                 */
#    include "sniptype.h"		/* For BYTE, WORD, DWORD      */

/*
**  File: ARCCRC16.C
*/

void init_crc_table(void);
WORD crc_calc(WORD crc, char *buf, unsigned nbytes);
void do_file(char *fn);

/*
**  File: CRC-16.C
*/

WORD crc16(char *data_p, WORD length);

/*
**  File: CRC-16F.C
*/

WORD updcrc(WORD icrc, BYTE * icp, size_t icnt);

/*
**  File: CRC_32.C
*/

#    define UPDC32(octet,crc) (crc_32_tab[((crc)\
     ^ ((BYTE)octet)) & 0xff] ^ ((crc) >> 8))

DWORD updateCRC32(unsigned char ch, DWORD crc);
Boolean_T crc32file(char *name, DWORD * crc, long *charcnt);
DWORD crc32buf(char *buf, size_t len);

/*
**  File: CHECKSUM.C
*/

unsigned checksum(void *buffer, size_t len, unsigned int seed);

/*
**  File: CHECKEXE.C
*/

void checkexe(char *fname);

#endif /* CRC__H */


================================================
FILE: include/epk.h
================================================
/**
 * Copyright 2016 Smx <smxdev4@gmail.com>
 * All right reserved
 */

#ifndef __EPK_H
#define __EPK_H
#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>

#define SIGNATURE_SIZE 0x80  //RSA-1024
#define SIGNATURE_SIZE_NEW 0x100 //RSA-2048
typedef unsigned char signature_t[SIGNATURE_SIZE];
typedef unsigned char signature_new_t[SIGNATURE_SIZE_NEW];

typedef enum {
	RELEASE = 0,
	DEBUG,
	TEST,
	UNKNOWN,
} BUILD_TYPE_T;

typedef enum {
    EPK,
	EPK_V2,
	EPK_V3,
	EPK_V3_NEW,
    PAK_V2,
    RAW
} FILE_TYPE_T;

typedef enum {
	SIG_SHA1,
	SIG_SHA256
} SIG_TYPE_T;

#define EPK_VERSION_FORMAT "%02" PRIx8 ".%02" PRIx8 ".%02" PRIx8 ".%02" PRIx8
#define EPKV1_VERSION_FORMAT "%02" PRIx8 ".%02" PRIx8 ".%02" PRIx8

bool isEpkVersionString(const char *str);
int wrap_verifyimage(void *signature, void *data, size_t signSize, char *config_dir, SIG_TYPE_T sigType);
int wrap_decryptimage(void *src, size_t datalen, void *dest, char *config_dir, FILE_TYPE_T type, FILE_TYPE_T *outType);
void extractEPKfile(const char *epk_file, config_opts_t *config_opts);
#endif


================================================
FILE: include/epk1.h
================================================
/**
 * Copyright 2016 Smx <smxdev4@gmail.com>
 * Copyright 2016 lprot
 * Copyright 20?? sirius
 * All right reserved
 */

#ifndef EPK1_H_
#    define EPK1_H_

#    include <stdint.h>
#    include <sys/stat.h>
#    include <sys/types.h>
#    include <stdio.h>
#    include <epk.h>
#    include <string.h>

struct pakRec_t {
	uint32_t offset;
	uint32_t size;
};

struct epk1BEHeader_t {
	unsigned char epakMagic[4];
	uint32_t fileSize;
	uint32_t pakCount;
	uint32_t offset;
	uint32_t size;
};

struct epk1BEVersion_t {
	uint8_t pad;
	uint8_t major;
	uint8_t minor1;
	uint8_t minor2;
};

struct epk1Header_t {
	unsigned char epakMagic[4];
	uint32_t fileSize;
	uint32_t pakCount;
	struct pakRec_t pakRecs[20];
	unsigned char fwVer[4];
	unsigned char otaID[32];
};

struct epk1NewHeader_t {
	unsigned char epakMagic[4];
	uint32_t fileSize;
	uint32_t pakCount;
	unsigned char fwVer[4];
	unsigned char otaID[32];
	struct pakRec_t pakRecs[26];
};

struct pakHeader_t {
	unsigned char pakName[4];
	uint32_t pakSize;
	unsigned char platform[15];
	unsigned char unknown[105];
};

void extract_epk1_file(const char *epk_file, config_opts_t *config_opts);
bool isFileEPK1(const char *epk_file);

#endif /* EPK1_H_ */


================================================
FILE: include/epk2.h
================================================
/**
 * Copyright 2016 Smx <smxdev4@gmail.com>
 * All right reserved
 */
#ifndef _EPK2_H_
#define _EPK2_H_

#include <stdint.h>
#include "mfile.h"
#include "epk.h"

#define EPK2_MAGIC "EPK2"
#define PAK_MAGIC "MPAK"

int compare_pak2_header(uint8_t *header, size_t headerSize);
int compare_epk2_header(uint8_t *header, size_t headerSize);
MFILE *isFileEPK2(const char *epk_file);
void extractEPK2(MFILE *epk, config_opts_t *config_opts);

typedef struct {
	char imageType[4];
	uint32_t imageSize; //excluded headers and signatures
	char modelName[64];
	uint32_t swVersion;
	uint32_t swDate;
	BUILD_TYPE_T devMode;
	uint32_t segmentCount;
	uint32_t segmentSize;
	uint32_t segmentIndex;
	char pakMagic[4];
	unsigned char reserved[24];
	uint32_t segmentCrc32;
} PAK_V2_HEADER_T;

typedef struct {
	uint32_t imageOffset;
	uint32_t imageSize; //containing headers (excluded signatures)
	char imageType[4];
	uint32_t imageVersion;
	uint32_t segmentSize;
} PAK_V2_LOCATION_T;

/**
 * NOTE: the number of partitions is hardcoded in the structure
 * 16 - GP2
 * 32 - (not sure if some sets use 32)
 * 64 - NC4
 **/
typedef struct {
	char fileType[4];
	uint32_t fileSize;
	uint32_t fileNum;
	char epkMagic[4];
	uint8_t epakVersion[4];
	char otaId[32];
	PAK_V2_LOCATION_T imageLocation[64];
} EPK_V2_HEADER_T;

struct epk2_structure {
	signature_t signature;
	EPK_V2_HEADER_T epkHeader;
	uint32_t crc32Info[64];
	uint32_t reserved;
	char platformVersion[16];
	char sdkVersion[16];
};

struct pak2_structure {
	signature_t signature;
	PAK_V2_HEADER_T pakHeader;
	unsigned char pData[];
};
#endif


================================================
FILE: include/epk3.h
================================================
/**
 * Copyright 2016 Smx <smxdev4@gmail.com>
 * All right reserved
 */

#ifndef __EPK3_H
#define __EPK3_H
#include "mfile.h"
#include "epk.h"

#define EPK3_MAGIC "EPK3"

int compare_epk3_header(uint8_t *header, size_t headerSize);
int compare_epk3_new_header(uint8_t *header, size_t headerSize);
MFILE *isFileEPK3(const char *epk_file);
void extractEPK3(MFILE *epk, FILE_TYPE_T epkType, config_opts_t *config_opts);

typedef struct __attribute__((packed)) {
	char epkMagic[4];
	uint8_t epkVersion[4];
	char otaId[32];
	uint32_t packageInfoSize;
	uint32_t bChunked;
} EPK_V3_HEADER_T;

typedef struct __attribute__((packed)) {
	char epkMagic[4];
	char epkVersion[4];
	char otaId[32];
	uint32_t packageInfoSize;
	uint32_t bChunked;
	uint32_t pakInfoMagic;
	uint8_t encryptType[6];
	uint8_t updateType[3];
	uint8_t gap[3];
	float updatePlatformVersion;
	float compatibleMinimumVersion;
	int needToCheckCompatibleVersion;
	uint8_t reserved[1384];
} EPK_V3_NEW_HEADER_T;

typedef union __attribute__((packed)) {
	EPK_V3_HEADER_T old;
	EPK_V3_NEW_HEADER_T new;
} EPK_V3_HEADER_UNION;

typedef struct __attribute__((packed)) {
	// SegmentInfo
	uint32_t isSegmented;
	uint32_t segmentIndex;
	uint32_t segmentCount;
	uint32_t segmentSize;
} PACKAGE_SEGMENT_INFO_T;

typedef struct __attribute__((packed)) {
	// PackageData
	//void * pData;
	uint32_t reserved;
} PACKAGE_INFO_DATA_T;

typedef struct __attribute__((packed)) {
	// PackageInfo
	uint32_t packageType;
	uint32_t packageInfoSize;
	char packageName[128];
	char packageVersion[96];
	char packageArchitecture[32];
	unsigned char checkSum[32];
	uint32_t packageSize;
	uint32_t dipk;
	PACKAGE_SEGMENT_INFO_T segmentInfo;
	PACKAGE_INFO_DATA_T infoData;
} PAK_V3_HEADER_T;

typedef struct __attribute__((packed)) {
	// ListHeader
	uint32_t packageInfoListSize;
	uint32_t packageInfoCount;
	PAK_V3_HEADER_T packages[];
} PAK_V3_LISTHEADER_T;

typedef struct __attribute__((packed)) {
	uint32_t packageInfoListSize;
	uint32_t packageInfoCount;
	uint32_t pakInfoMagic;
	PAK_V3_HEADER_T packages[];
} PAK_V3_NEW_LISTHEADER_T;

typedef union __attribute__((packed)) {
	PAK_V3_LISTHEADER_T old;
	PAK_V3_NEW_LISTHEADER_T new;
} PAK_V3_LISTHEADER_UNION;

struct __attribute__((packed)) epk3_head_structure {
	signature_t signature;
	EPK_V3_HEADER_T epkHeader;
	uint32_t crc32Info[384];
	uint32_t reserved; //or unknown
	char platformVersion[16];
	char sdkVersion[16];
};

struct __attribute__((packed)) epk3_new_head_structure {
	signature_new_t signature;
	EPK_V3_NEW_HEADER_T epkHeader;
	char platformVersion[16];
	char sdkVersion[16];
};

struct  __attribute__((packed)) epk3_structure {
	struct epk3_head_structure head;
	signature_t packageInfo_signature;
	PAK_V3_LISTHEADER_T packageInfo;
};

struct __attribute__((packed)) epk3_new_structure {
	struct epk3_new_head_structure head;
	signature_new_t packageInfo_signature;
	PAK_V3_NEW_LISTHEADER_T packageInfo;
};

typedef union __attribute__((packed)) {
	struct epk3_structure old;
	struct epk3_new_structure new;
} epk3_union;

struct __attribute__((packed)) pak3_structure {
	signature_t signature;
	PAK_V3_HEADER_T header;
};
#endif


================================================
FILE: include/jffs2/jffs2.h
================================================
/*
 * JFFS2 -- Journalling Flash File System, Version 2.
 *
 * Copyright © 2001-2007 Red Hat, Inc.
 * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org>
 *
 * Created by David Woodhouse <dwmw2@infradead.org>
 *
 * For licensing information, see the file 'LICENCE' in the
 * jffs2 directory.
 */

#ifndef __LINUX_JFFS2_H__
#define __LINUX_JFFS2_H__

#ifdef __APPLE__
typedef __signed__ char __s8;
typedef unsigned char __u8;

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;

#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#else
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
#else
#include <asm/types.h>
#endif

/* Values we may expect to find in the 'magic' field */
#define JFFS2_OLD_MAGIC_BITMASK 0x1984
#define JFFS2_MAGIC_BITMASK 0x1985
#define KSAMTIB_CIGAM_2SFFJ 0x8519 /* For detecting wrong-endian fs */
#define JFFS2_EMPTY_BITMASK 0xffff
#define JFFS2_DIRTY_BITMASK 0x0000

/* Summary node MAGIC marker */
#define JFFS2_SUM_MAGIC	0x02851885

/* We only allow a single char for length, and 0xFF is empty flash so
   we don't want it confused with a real length. Hence max 254.
*/
#define JFFS2_MAX_NAME_LEN 254

/* How small can we sensibly write nodes? */
#define JFFS2_MIN_DATA_LEN 128

#define JFFS2_COMPR_NONE	0x00
#define JFFS2_COMPR_ZERO	0x01
#define JFFS2_COMPR_RTIME	0x02
#define JFFS2_COMPR_RUBINMIPS	0x03
#define JFFS2_COMPR_COPY	0x04
#define JFFS2_COMPR_DYNRUBIN	0x05
#define JFFS2_COMPR_ZLIB	0x06
#define JFFS2_COMPR_LZO		0x07
#define JFFS2_COMPR_LZMA	0x08
/* Compatibility flags. */
#define JFFS2_COMPAT_MASK 0xc000      /* What do to if an unknown nodetype is found */
#define JFFS2_NODE_ACCURATE 0x2000
/* INCOMPAT: Fail to mount the filesystem */
#define JFFS2_FEATURE_INCOMPAT 0xc000
/* ROCOMPAT: Mount read-only */
#define JFFS2_FEATURE_ROCOMPAT 0x8000
/* RWCOMPAT_COPY: Mount read/write, and copy the node when it's GC'd */
#define JFFS2_FEATURE_RWCOMPAT_COPY 0x4000
/* RWCOMPAT_DELETE: Mount read/write, and delete the node when it's GC'd */
#define JFFS2_FEATURE_RWCOMPAT_DELETE 0x0000

#define JFFS2_NODETYPE_DIRENT (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 1)
#define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2)
#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4)

#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6)

#define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8)
#define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9)

/* XATTR Related */
#define JFFS2_XPREFIX_USER		1	/* for "user." */
#define JFFS2_XPREFIX_SECURITY		2	/* for "security." */
#define JFFS2_XPREFIX_ACL_ACCESS	3	/* for "system.posix_acl_access" */
#define JFFS2_XPREFIX_ACL_DEFAULT	4	/* for "system.posix_acl_default" */
#define JFFS2_XPREFIX_TRUSTED		5	/* for "trusted.*" */

#define JFFS2_ACL_VERSION		0x0001

// Maybe later...
//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4)


#define JFFS2_INO_FLAG_PREREAD	  1	/* Do read_inode() for this one at
					   mount time, don't wait for it to
					   happen later */
#define JFFS2_INO_FLAG_USERCOMPR  2	/* User has requested a specific
					   compression type */


struct jffs2_unknown_node
{
	/* All start like this */
	__u16 magic;
	__u16 nodetype;
	__u32 totlen; /* So we can skip over nodes we don't grok */
	__u32 hdr_crc;
};

struct jffs2_raw_dirent
{
	__u16 magic;
	__u16 nodetype;	/* == JFFS2_NODETYPE_DIRENT */
	__u32 totlen;
	__u32 hdr_crc;
	__u32 pino;
	__u32 version;
	__u32 ino; /* == zero for unlink */
	__u32 mctime;
	__u8 nsize;
	__u8 type;
	__u8 unused[2];
	__u32 node_crc;
	__u32 name_crc;
	__u8 name[0];
};

/* The JFFS2 raw inode structure: Used for storage on physical media.  */
/* The uid, gid, atime, mtime and ctime members could be longer, but
   are left like this for space efficiency. If and when people decide
   they really need them extended, it's simple enough to add support for
   a new type of raw node.
*/
struct jffs2_raw_inode
{
	__u16 magic;      /* A constant magic number.  */
	__u16 nodetype;   /* == JFFS2_NODETYPE_INODE */
	__u32 totlen;     /* Total length of this node (inc data, etc.) */
	__u32 hdr_crc;
	__u32 ino;        /* Inode number.  */
	__u32 version;    /* Version number.  */
	__u32 mode;       /* The file's type or mode.  */
	__u16 uid;        /* The file's owner.  */
	__u16 gid;        /* The file's group.  */
	__u32 isize;      /* Total resultant size of this inode (used for truncations)  */
	__u32 atime;      /* Last access time.  */
	__u32 mtime;      /* Last modification time.  */
	__u32 ctime;      /* Change time.  */
	__u32 offset;     /* Where to begin to write.  */
	__u32 csize;      /* (Compressed) data size */
	__u32 dsize;	     /* Size of the node's data. (after decompression) */
	__u8 compr;       /* Compression algorithm used */
	__u8 usercompr;   /* Compression algorithm requested by the user */
	__u16 flags;	     /* See JFFS2_INO_FLAG_* */
	__u32 data_crc;   /* CRC for the (compressed) data.  */
	__u32 node_crc;   /* CRC for the raw inode (excluding data)  */
	__u8 data[0];
};

struct jffs2_raw_xattr {
	__u16 magic;
	__u16 nodetype;	/* = JFFS2_NODETYPE_XATTR */
	__u32 totlen;
	__u32 hdr_crc;
	__u32 xid;		/* XATTR identifier number */
	__u32 version;
	__u8 xprefix;
	__u8 name_len;
	__u16 value_len;
	__u32 data_crc;
	__u32 node_crc;
	__u8 data[0];
} __attribute__((packed));

struct jffs2_raw_xref
{
	__u16 magic;
	__u16 nodetype;	/* = JFFS2_NODETYPE_XREF */
	__u32 totlen;
	__u32 hdr_crc;
	__u32 ino;		/* inode number */
	__u32 xid;		/* XATTR identifier number */
	__u32 xseqno;	/* xref sequential number */
	__u32 node_crc;
} __attribute__((packed));

struct jffs2_raw_summary
{
	__u16 magic;
	__u16 nodetype; 	/* = JFFS2_NODETYPE_SUMMARY */
	__u32 totlen;
	__u32 hdr_crc;
	__u32 sum_num;	/* number of sum entries*/
	__u32 cln_mkr;	/* clean marker size, 0 = no cleanmarker */
	__u32 padded;	/* sum of the size of padding nodes */
	__u32 sum_crc;	/* summary information crc */
	__u32 node_crc; 	/* node crc */
	__u32 sum[0]; 	/* inode summary info */
};

union jffs2_node_union
{
	struct jffs2_raw_inode i;
	struct jffs2_raw_dirent d;
	struct jffs2_raw_xattr x;
	struct jffs2_raw_xref r;
	struct jffs2_raw_summary s;
	struct jffs2_unknown_node u;
};

/* Data payload for device nodes. */
union jffs2_device_node {
	__u16 old_id;
	__u32 new_id;
};

#ifdef __cplusplus
extern "C" {
#endif

#include <stdbool.h>

struct jffs2_main_args {
	int erase_size;
	int verbose;
	bool keep_unlinked;
};

int jffs2extract(char *infile, char *outdir, struct jffs2_main_args);
#ifdef __cplusplus
}
#endif

#endif /* __LINUX_JFFS2_H__ */


================================================
FILE: include/jffs2/mini_inflate.h
================================================
/*-------------------------------------------------------------------------
 * Filename:      mini_inflate.h
 * Version:       $Id: mini_inflate.h,v 1.2 2002/01/17 00:53:20 nyet Exp $
 * Copyright:     Copyright (C) 2001, Russ Dill
 * Author:        Russ Dill <Russ.Dill@asu.edu>
 * Description:   Mini deflate implementation
 *-----------------------------------------------------------------------*/
/*
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

typedef __SIZE_TYPE__ size;

#define NO_ERROR 0
#define COMP_UNKNOWN 1			/* The specififed bytype is invalid */
#define CODE_NOT_FOUND 2		/* a huffman code in the stream could not be decoded */
#define TOO_MANY_BITS 3			/* pull_bits was passed an argument that is too
								 * large */

/* This struct represents an entire huffman code set. It has various lookup
 * tables to speed decoding */
struct huffman_set {
	int bits;					/* maximum bit length */
	int num_symbols;			/* Number of symbols this code can represent */
	int *lengths;				/* The bit length of symbols */
	int *symbols;				/* All of the symbols, sorted by the huffman code */
	int *count;					/* the number of codes of this bit length */
	int *first;					/* the first code of this bit length */
	int *pos;					/* the symbol that first represents (in the symbols
								 * array) */
};

struct bitstream {
	unsigned char *data;		/* increments as we move from byte to byte */
	unsigned char bit;			/* 0 to 7 */
	void *(*memcpy) (void *, const void *, size);
	unsigned long decoded;		/* The number of bytes decoded */
	int error;

	int distance_count[16];
	int distance_first[16];
	int distance_pos[16];
	int distance_lengths[32];
	int distance_symbols[32];

	int code_count[8];
	int code_first[8];
	int code_pos[8];
	int code_lengths[19];
	int code_symbols[19];

	int length_count[16];
	int length_first[16];
	int length_pos[16];
	int length_lengths[288];
	int length_symbols[288];

	struct huffman_set codes;
	struct huffman_set lengths;
	struct huffman_set distance;
};

#define NO_COMP 0
#define FIXED_COMP 1
#define DYNAMIC_COMP 2

long decompress_block(unsigned char *dest, unsigned char *source, void *(*inflate_memcpy) (void *dest, const void *src, size n));


================================================
FILE: include/log.h
================================================
#ifndef _LOG_H_
#    define _LOG_H_
/*
* Copyright (c) 2011 Roman Tokarev <roman.s.tokarev@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#    define error_level 0
#    define info_level 1
#    define debug_level 2

#    define say_error(format, args...) say(error_level, "error: "format, ##args)
#    define say_info(format, args...) say(info_level, "info: "format, ##args)
#    define say_debug(format, args...) say(debug_level, "debug: "format, ##args)

extern unsigned verbose;

int create_log(const char *fname);
void say(unsigned level, const char *format, ...);

#endif


================================================
FILE: include/lz4/bench.h
================================================
/*
    bench.h - Demo program to benchmark open-source compression algorithm
    Copyright (C) Yann Collet 2012

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

	You can contact the author at :
	- LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
	- LZ4 source repository : http://code.google.com/p/lz4/
*/
#pragma once

#if defined (__cplusplus)
extern "C" {
#endif

	int BMK_benchFile(char **fileNamesTable, int nbFiles, int cLevel);

// Parameters
	void BMK_SetBlocksize(int bsize);
	void BMK_SetNbIterations(int nbLoops);

#if defined (__cplusplus)
}
#endif


================================================
FILE: include/lz4/lz4.h
================================================
/*
   LZ4 - Fast LZ compression algorithm
   Header File
   Copyright (C) 2011-2012, Yann Collet.
   BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are
   met:

       * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
       * Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following disclaimer
   in the documentation and/or other materials provided with the
   distribution.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

   You can contact the author at :
   - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
   - LZ4 source repository : http://code.google.com/p/lz4/
*/
#pragma once

#if defined (__cplusplus)
extern "C" {
#endif

//****************************
// Simple Functions
//****************************

int LZ4_compress(const char *source, char *dest, int isize);
int LZ4_uncompress(const char *source, char *dest, int osize);

int LZ4_decode_file(const char *input_filename, const char *output_filename);

/*
LZ4_compress() :
	isize  : is the input size. Max supported value is ~1.9GB
	return : the number of bytes written in buffer dest
			 or 0 if the compression fails (if LZ4_COMPRESSMIN is set)
	note : destination buffer must be already allocated.
		destination buffer must be sized to handle worst cases situations (input data not compressible)
		worst case size evaluation is provided by function LZ4_compressBound()

LZ4_uncompress() :
	osize  : is the output size, therefore the original size
	return : the number of bytes read in the source buffer
			 If the source stream is malformed, the function will stop decoding and return a negative result, indicating the byte position of the faulty instruction
			 This function never writes beyond dest + osize, and is therefore protected against malicious data packets
	note : destination buffer must be already allocated
*/

//****************************
// Advanced Functions
//****************************

int LZ4_compressBound(int isize);

/*
LZ4_compressBound() :
	Provides the maximum size that LZ4 may output in a "worst case" scenario (input data not compressible)
	primarily useful for memory allocation of output buffer.

	isize  : is the input size. Max supported value is ~1.9GB
	return : maximum output size in a "worst case" scenario
	note : this function is limited by "int" range (2^31-1)
*/

int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int isize, int maxOutputSize);

/*
LZ4_uncompress_unknownOutputSize() :
	isize  : is the input size, therefore the compressed size
	maxOutputSize : is the size of the destination buffer (which must be already allocated)
	return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize)
			 If the source stream is malformed, the function will stop decoding and return a negative result, indicating the byte position of the faulty instruction
			 This function never writes beyond dest + maxOutputSize, and is therefore protected against malicious data packets
	note   : Destination buffer must be already allocated.
	         This version is slightly slower than LZ4_uncompress()
*/

int LZ4_compressCtx(void **ctx, const char *source, char *dest, int isize);
int LZ4_compress64kCtx(void **ctx, const char *source, char *dest, int isize);

/*
LZ4_compressCtx() :
	This function explicitly handles the CTX memory structure.
	It avoids allocating/deallocating memory between each call, improving performance when malloc is heavily invoked.
	This function is only useful when memory is allocated into the heap (HASH_LOG value beyond STACK_LIMIT)
	Performance difference will be noticeable only when repetitively calling the compression function over many small segments.
	Note : by default, memory is allocated into the stack, therefore "malloc" is not invoked.
LZ4_compress64kCtx() :
	Same as LZ4_compressCtx(), but specific to small inputs (<64KB).
	isize *Must* be <64KB, otherwise the output will be corrupted.

	On first call : provide a *ctx=NULL; It will be automatically allocated.
	On next calls : reuse the same ctx pointer.
	Use different pointers for different threads when doing multi-threading.

*/

#if defined (__cplusplus)
}
#endif


================================================
FILE: include/lz4/lz4hc.h
================================================
/*
   LZ4 HC - High Compression Mode of LZ4
   Header File
   Copyright (C) 2011-2012, Yann Collet.
   BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions are
   met:

       * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
       * Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following disclaimer
   in the documentation and/or other materials provided with the
   distribution.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

   You can contact the author at :
   - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
   - LZ4 source repository : http://code.google.com/p/lz4/
*/
#pragma once

#if defined (__cplusplus)
extern "C" {
#endif

	int LZ4_compressHC(const char *source, char *dest, int isize);

/*
LZ4_compressHC :
	return : the number of bytes in compressed buffer dest
	note : destination buffer must be already allocated.
		To avoid any problem, size it to handle worst cases situations (input data not compressible)
		Worst case size evaluation is provided by function LZ4_compressBound() (see "lz4.h")
*/

/* Note :
Decompression functions are provided within regular LZ4 source code (see "lz4.h") (BSD license)
*/

#if defined (__cplusplus)
}
#endif


================================================
FILE: include/lzhs/lzhs.h
================================================
/**
 * Copyright 2016 Smx <smxdev4@gmail.com>
 * Copyright 2016 lprot
 * All right reserved
 */
#ifndef _LZHS_H
#define _LZHS_H

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "mfile.h"

struct lzhs_header {
	uint32_t uncompressedSize, compressedSize;
	uint16_t checksum; /* checksum is 1 byte, segment number is 2 bytes */
	uint8_t spare[6];
};

/* for LZSS */
#define N             4096
#define F             34
#define THRESHOLD     2

struct lzhs_ctx {
	/* LZSS  */
	unsigned long int textsize, codesize;
	uint8_t text_buf[N + F - 1];
	int32_t match_length, match_position, lson[N + 1], rson[N + 257], dad[N + 1];

	/* Huffman  */
	int32_t i, j, k;
	uint32_t c, code, len, code_buf_ptr;
	uint8_t code_buf[32], mask, bitno;
	uint32_t preno, precode;
};

/*for Huffman */
typedef struct __attribute__ ((__packed__)) {
	uint32_t code;
	uint32_t len;
} t_code;

struct lzhs_ctx *lzhs_ctx_new();
void lzhs_init_lookup();
void unlzss(struct lzhs_ctx *ctx, cursor_t *in, cursor_t *out);
void unhuff(struct lzhs_ctx *ctx, cursor_t *in, cursor_t *out);

MFILE *is_lzhs(const char *filename);
bool _is_lzhs_mem(struct lzhs_header *header);
bool is_lzhs_mem(MFILE *file, off_t offset);

void lzss(struct lzhs_ctx *ctx, FILE * infile, FILE * outfile, unsigned long int *p_textsize, unsigned long int *p_codesize);
void huff(struct lzhs_ctx *ctx, FILE * in, FILE * out, unsigned long int *p_textsize, unsigned long int *p_codesize);

int process_lzhs_segment(MFILE *in_file, off_t offset, const char *name);

int extract_lzhs(MFILE *in_file);
cursor_t *lzhs_decode(MFILE *in_file, off_t offset, const char *out_path, uint8_t *out_checksum);
void lzhs_encode(const char *infile, const char *outfile);
void scan_lzhs(const char *filename, int extract);

#endif


================================================
FILE: include/lzhs/tables.h
================================================
/**
 * Copyright 2016 Smx <smxdev4@gmail.com>
 * Copyright 2016 lprot
 * All right reserved
 */
#ifndef _LZHS_TAB_H
#    define _LZHS_TAB_H
static uint8_t charlen_table[2304] = {	//256 + 32 elements of t_code
	0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
	0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x29, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x2B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x2D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x2F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x8A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x8B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x8D, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x30, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x8F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x90, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x82, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x31, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x93, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x0B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x85, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x86, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x33, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x96, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x87, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x88, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x34, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x99, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x89, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x9A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x8A, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x8B, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x35, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x9C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x9D, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x8D, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x8E, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x8F, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x9E, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x91, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x92, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x93, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x94, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x95, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x96, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x97, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x37, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x98, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x99, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xA0, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9A, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x39, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x3B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xA2, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xA3, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0x9B, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x9C, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x9D, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x9E, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x9F, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xA0, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xA1, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB0, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xB1, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xB2, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xA2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xA3, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xA4, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB3, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xA5, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB4, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xB5, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xB6, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0x3C, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xA4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xA5, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xA6, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xA7, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xA8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xA6, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB7, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0x0D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xA9, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xA7, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xA8, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xA9, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xAA, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xAB, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xAC, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0x3D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xAD, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xAA, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xAE, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xAF, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB0, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xB8, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xB9, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0x3E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xB1, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xB2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB3, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xBA, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xBB, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xBC, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xBD, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xAB, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xB4, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB5, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xB6, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xBE, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xBF, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xAC, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xAD, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xB7, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xB9, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xC1, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xC2, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xC3, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xAE, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xAF, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xB0, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xC4, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xC5, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xC6, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xC7, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xC8, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0x40, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xB1, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xBA, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xBB, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xC9, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xCA, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xCB, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xCC, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xB2, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xB3, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xCD, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xCE, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xCF, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xD0, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xD1, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xDE, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xB4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xBC, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xBD, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xBE, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xD2, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xD3, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xDF, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xB5, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xD4, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xD5, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE1, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xD6, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xB6, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xD7, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE2, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xD8, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE3, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xE4, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xE5, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xD9, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xB7, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xE6, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xE7, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xB8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xBF, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xDA, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xDB, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xDC, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE8, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xE9, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xEA, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xC0, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xC1, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xDD, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xEB, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xDE, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xEC, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xED, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xEE, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0x0E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0xC2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xC3, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xDF, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xC4, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xEF, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xC5, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xC6, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xE0, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE1, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xC7, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xE2, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xF1, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xF2, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xC8, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xC9, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xE3, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xE4, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xCA, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xCB, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0xCC, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xCD, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xCE, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xE5, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xE6, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE7, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xE8, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE9, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0x42, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xB9, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xF3, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xF4, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xEA, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xF5, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xCF, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xD0, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xBA, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xD1, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xD2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xD3, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xD4, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xD5, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xBB, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
	0x11, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x13, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
	0xBC, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xBD, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
	0xBE, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xD6, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
	0xD7, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xEB, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xEC, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xED, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
	0xEE, 0x03, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xF6, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xF7, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xF9, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xFA, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
	0xFB, 0x07, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
	0xF9, 0x0F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFA, 0x0F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
	0xFB, 0x0F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
	0xFC, 0x0F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFD, 0x1F, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
	0xFD, 0x0F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
	0xFF, 0x1F, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0xBF, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00
};

static uint8_t pos_table[256] = {		//32 elements of t_code
	0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
	0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
	0x0F, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
	0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
	0x13, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
	0x2A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x2C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x2E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x32, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x34, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x36, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x38, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x3A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x3C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
	0x3E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00
};
#endif


================================================
FILE: include/lzma/LzFind.h
================================================
/* LzFind.h -- Match finder for LZ algorithms
2009-04-22 : Igor Pavlov : Public domain */

#ifndef __LZ_FIND_H
#define __LZ_FIND_H

#include "Types.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef UInt32 CLzRef;

typedef struct _CMatchFinder
{
  Byte *buffer;
  UInt32 pos;
  UInt32 posLimit;
  UInt32 streamPos;
  UInt32 lenLimit;

  UInt32 cyclicBufferPos;
  UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */

  UInt32 matchMaxLen;
  CLzRef *hash;
  CLzRef *son;
  UInt32 hashMask;
  UInt32 cutValue;

  Byte *bufferBase;
  ISeqInStream *stream;
  int streamEndWasReached;

  UInt32 blockSize;
  UInt32 keepSizeBefore;
  UInt32 keepSizeAfter;

  UInt32 numHashBytes;
  int directInput;
  size_t directInputRem;
  int btMode;
  int bigHash;
  UInt32 historySize;
  UInt32 fixedHashSize;
  UInt32 hashSizeSum;
  UInt32 numSons;
  SRes result;
  UInt32 crc[256];
} CMatchFinder;

#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
#define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(Int32)(index)])

#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)

int MatchFinder_NeedMove(CMatchFinder *p);
Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
void MatchFinder_MoveBlock(CMatchFinder *p);
void MatchFinder_ReadIfRequired(CMatchFinder *p);

void MatchFinder_Construct(CMatchFinder *p);

/* Conditions:
     historySize <= 3 GB
     keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB
*/
int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
    UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
    ISzAlloc *alloc);
void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems);
void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);

UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
    UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
    UInt32 *distances, UInt32 maxLen);

/*
Conditions:
  Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func.
  Mf_GetPointerToCurrentPos_Func's result must be used only before any other function
*/

typedef void (*Mf_Init_Func)(void *object);
typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index);
typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
typedef void (*Mf_Skip_Func)(void *object, UInt32);

typedef struct _IMatchFinder
{
  Mf_Init_Func Init;
  Mf_GetIndexByte_Func GetIndexByte;
  Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
  Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
  Mf_GetMatches_Func GetMatches;
  Mf_Skip_Func Skip;
} IMatchFinder;

void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);

void MatchFinder_Init(CMatchFinder *p);
UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: include/lzma/LzHash.h
================================================
/* LzHash.h -- HASH functions for LZ algorithms
2009-02-07 : Igor Pavlov : Public domain */

#ifndef __LZ_HASH_H
#define __LZ_HASH_H

#define kHash2Size (1 << 10)
#define kHash3Size (1 << 16)
#define kHash4Size (1 << 20)

#define kFix3HashSize (kHash2Size)
#define kFix4HashSize (kHash2Size + kHash3Size)
#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size)

#define HASH2_CALC hashValue = cur[0] | ((UInt32)cur[1] << 8);

#define HASH3_CALC { \
  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
  hash2Value = temp & (kHash2Size - 1); \
  hashValue = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; }

#define HASH4_CALC { \
  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
  hash2Value = temp & (kHash2Size - 1); \
  hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
  hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; }

#define HASH5_CALC { \
  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
  hash2Value = temp & (kHash2Size - 1); \
  hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
  hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \
  hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \
  hash4Value &= (kHash4Size - 1); }

/* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */
#define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;


#define MT_HASH2_CALC \
  hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);

#define MT_HASH3_CALC { \
  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
  hash2Value = temp & (kHash2Size - 1); \
  hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }

#define MT_HASH4_CALC { \
  UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
  hash2Value = temp & (kHash2Size - 1); \
  hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
  hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }

#endif


================================================
FILE: include/lzma/LzmaDec.h
================================================
/* LzmaDec.h -- LZMA Decoder
2009-02-07 : Igor Pavlov : Public domain */

#ifndef __LZMA_DEC_H
#define __LZMA_DEC_H

#include "Types.h"

#ifdef __cplusplus
extern "C" {
#endif

/* #define _LZMA_PROB32 */
/* _LZMA_PROB32 can increase the speed on some CPUs,
   but memory usage for CLzmaDec::probs will be doubled in that case */

#ifdef _LZMA_PROB32
#define CLzmaProb UInt32
#else
#define CLzmaProb UInt16
#endif


/* ---------- LZMA Properties ---------- */

#define LZMA_PROPS_SIZE 5

typedef struct _CLzmaProps
{
  unsigned lc, lp, pb;
  UInt32 dicSize;
} CLzmaProps;

/* LzmaProps_Decode - decodes properties
Returns:
  SZ_OK
  SZ_ERROR_UNSUPPORTED - Unsupported properties
*/

SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);


/* ---------- LZMA Decoder state ---------- */

/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
   Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */

#define LZMA_REQUIRED_INPUT_MAX 20

typedef struct
{
  CLzmaProps prop;
  CLzmaProb *probs;
  Byte *dic;
  const Byte *buf;
  UInt32 range, code;
  SizeT dicPos;
  SizeT dicBufSize;
  UInt32 processedPos;
  UInt32 checkDicSize;
  unsigned state;
  UInt32 reps[4];
  unsigned remainLen;
  int needFlush;
  int needInitState;
  UInt32 numProbs;
  unsigned tempBufSize;
  Byte tempBuf[LZMA_REQUIRED_INPUT_MAX];
} CLzmaDec;

#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; }

void LzmaDec_Init(CLzmaDec *p);

/* There are two types of LZMA streams:
     0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
     1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */

typedef enum
{
  LZMA_FINISH_ANY,   /* finish at any point */
  LZMA_FINISH_END    /* block must be finished at the end */
} ELzmaFinishMode;

/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!

   You must use LZMA_FINISH_END, when you know that current output buffer
   covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.

   If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
   and output value of destLen will be less than output buffer size limit.
   You can check status result also.

   You can use multiple checks to test data integrity after full decompression:
     1) Check Result and "status" variable.
     2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
     3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
        You must use correct finish mode in that case. */

typedef enum
{
  LZMA_STATUS_NOT_SPECIFIED,               /* use main error code instead */
  LZMA_STATUS_FINISHED_WITH_MARK,          /* stream was finished with end mark. */
  LZMA_STATUS_NOT_FINISHED,                /* stream was not finished */
  LZMA_STATUS_NEEDS_MORE_INPUT,            /* you must provide more input bytes */
  LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK  /* there is probability that stream was finished without end mark */
} ELzmaStatus;

/* ELzmaStatus is used only as output value for function call */


/* ---------- Interfaces ---------- */

/* There are 3 levels of interfaces:
     1) Dictionary Interface
     2) Buffer Interface
     3) One Call Interface
   You can select any of these interfaces, but don't mix functions from different
   groups for same object. */


/* There are two variants to allocate state for Dictionary Interface:
     1) LzmaDec_Allocate / LzmaDec_Free
     2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
   You can use variant 2, if you set dictionary buffer manually.
   For Buffer Interface you must always use variant 1.

LzmaDec_Allocate* can return:
  SZ_OK
  SZ_ERROR_MEM         - Memory allocation error
  SZ_ERROR_UNSUPPORTED - Unsupported properties
*/

SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);

SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc);
void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc);

/* ---------- Dictionary Interface ---------- */

/* You can use it, if you want to eliminate the overhead for data copying from
   dictionary to some other external buffer.
   You must work with CLzmaDec variables directly in this interface.

   STEPS:
     LzmaDec_Constr()
     LzmaDec_Allocate()
     for (each new stream)
     {
       LzmaDec_Init()
       while (it needs more decompression)
       {
         LzmaDec_DecodeToDic()
         use data from CLzmaDec::dic and update CLzmaDec::dicPos
       }
     }
     LzmaDec_Free()
*/

/* LzmaDec_DecodeToDic

   The decoding to internal dictionary buffer (CLzmaDec::dic).
   You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!

finishMode:
  It has meaning only if the decoding reaches output limit (dicLimit).
  LZMA_FINISH_ANY - Decode just dicLimit bytes.
  LZMA_FINISH_END - Stream must be finished after dicLimit.

Returns:
  SZ_OK
    status:
      LZMA_STATUS_FINISHED_WITH_MARK
      LZMA_STATUS_NOT_FINISHED
      LZMA_STATUS_NEEDS_MORE_INPUT
      LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
  SZ_ERROR_DATA - Data error
*/

SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
    const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);


/* ---------- Buffer Interface ---------- */

/* It's zlib-like interface.
   See LzmaDec_DecodeToDic description for information about STEPS and return results,
   but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
   to work with CLzmaDec variables manually.

finishMode:
  It has meaning only if the decoding reaches output limit (*destLen).
  LZMA_FINISH_ANY - Decode just destLen bytes.
  LZMA_FINISH_END - Stream must be finished after (*destLen).
*/

SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
    const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);


/* ---------- One Call Interface ---------- */

/* LzmaDecode

finishMode:
  It has meaning only if the decoding reaches output limit (*destLen).
  LZMA_FINISH_ANY - Decode just destLen bytes.
  LZMA_FINISH_END - Stream must be finished after (*destLen).

Returns:
  SZ_OK
    status:
      LZMA_STATUS_FINISHED_WITH_MARK
      LZMA_STATUS_NOT_FINISHED
      LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
  SZ_ERROR_DATA - Data error
  SZ_ERROR_MEM  - Memory allocation error
  SZ_ERROR_UNSUPPORTED - Unsupported properties
  SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
*/

SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
    const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
    ELzmaStatus *status, ISzAlloc *alloc);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: include/lzma/LzmaEnc.h
================================================
/*  LzmaEnc.h -- LZMA Encoder
2009-02-07 : Igor Pavlov : Public domain */

#ifndef __LZMA_ENC_H
#define __LZMA_ENC_H

#include "Types.h"

#ifdef __cplusplus
extern "C" {
#endif

#define LZMA_PROPS_SIZE 5

typedef struct _CLzmaEncProps
{
  int level;       /*  0 <= level <= 9 */
  UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version
                      (1 << 12) <= dictSize <= (1 << 30) for 64-bit version
                       default = (1 << 24) */
  int lc;          /* 0 <= lc <= 8, default = 3 */
  int lp;          /* 0 <= lp <= 4, default = 0 */
  int pb;          /* 0 <= pb <= 4, default = 2 */
  int algo;        /* 0 - fast, 1 - normal, default = 1 */
  int fb;          /* 5 <= fb <= 273, default = 32 */
  int btMode;      /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */
  int numHashBytes; /* 2, 3 or 4, default = 4 */
  UInt32 mc;        /* 1 <= mc <= (1 << 30), default = 32 */
  unsigned writeEndMark;  /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */
  int numThreads;  /* 1 or 2, default = 2 */
} CLzmaEncProps;

void LzmaEncProps_Init(CLzmaEncProps *p);
void LzmaEncProps_Normalize(CLzmaEncProps *p);
UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2);


/* ---------- CLzmaEncHandle Interface ---------- */

/* LzmaEnc_* functions can return the following exit codes:
Returns:
  SZ_OK           - OK
  SZ_ERROR_MEM    - Memory allocation error
  SZ_ERROR_PARAM  - Incorrect paramater in props
  SZ_ERROR_WRITE  - Write callback error.
  SZ_ERROR_PROGRESS - some break from progress callback
  SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
*/

typedef void * CLzmaEncHandle;

CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc);
void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig);
SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props);
SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size);
SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream,
    ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
    int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);

/* ---------- One Call Interface ---------- */

/* LzmaEncode
Return code:
  SZ_OK               - OK
  SZ_ERROR_MEM        - Memory allocation error
  SZ_ERROR_PARAM      - Incorrect paramater
  SZ_ERROR_OUTPUT_EOF - output buffer overflow
  SZ_ERROR_THREAD     - errors in multithreading functions (only for Mt version)
*/

SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
    const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
    ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);

#ifdef __cplusplus
}
#endif

#endif


================================================
FILE: include/lzma/Types.h
================================================
/* Types.h -- Basic types
2009-11-23 : Igor Pavlov : Public domain */

#ifndef __7Z_TYPES_H
#define __7Z_TYPES_H

#include <stddef.h>

#ifdef _WIN32
#include <windows.h>
#endif

#ifndef EXTERN_C_BEGIN
#ifdef __cplusplus
#define EXTERN_C_BEGIN extern "C" {
#define EXTERN_C_END }
#else
#define EXTERN_C_BEGIN
#define EXTERN_C_END
#endif
#endif

EXTERN_C_BEGIN

#define SZ_OK 0

#define SZ_ERROR_DATA 1
#define SZ_ERROR_MEM 2
#define SZ_ERROR_CRC 3
#define SZ_ERROR_UNSUPPORTED 4
#define SZ_ERROR_PARAM 5
#define SZ_ERROR_INPUT_EOF 6
#define SZ_ERROR_OUTPUT_EOF 7
#define SZ_ERROR_READ 8
#define SZ_ERROR_WRITE 9
#define SZ_ERROR_PROGRESS 10
#define SZ_ERROR_FAIL 11
#define SZ_ERROR_THREAD 12

#define SZ_ERROR_ARCHIVE 16
#define SZ_ERROR_NO_ARCHIVE 17

typedef int SRes;

#ifdef _WIN32
typedef DWORD WRes;
#else
typedef int WRes;
#endif

#ifndef RINOK
#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
#endif

typedef unsigned char Byte;
typedef short Int16;
typedef unsigned short UInt16;

#ifdef _LZMA_UINT32_IS_ULONG
typedef long Int32;
typedef unsigned long UInt32;
#else
typedef int Int32;
typedef unsigned int UInt32;
#endif

#ifdef _SZ_NO_INT_64

/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
   NOTES: Some code will work incorrectly in that case! */

typedef long Int64;
typedef unsigned long UInt64;

#else

#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#else
typedef long long int Int64;
typedef unsigned long long int UInt64;
#endif

#endif

#ifdef _LZMA_NO_SYSTEM_SIZE_T
typedef UInt32 SizeT;
#else
typedef size_t SizeT;
#endif

typedef int Bool;
#define True 1
#define False 0


#ifdef _WIN32
#define MY_STD_CALL __stdcall
#else
#define MY_STD_CALL
#endif

#ifdef _MSC_VER

#if _MSC_VER >= 1300
#define MY_NO_INLINE __declspec(noinline)
#else
#define MY_NO_INLINE
#endif

#define MY_CDECL __cdecl
#define MY_FAST_CALL __fastcall

#else

#define MY_CDECL
#define MY_FAST_CALL

#endif


/* The following interfaces use first parameter as pointer to structure */

typedef struct
{
  SRes (*Read)(void *p, void *buf, size_t *size);
    /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
       (output(*size) < input(*size)) is allowed */
} ISeqInStream;

/* it can return SZ_ERROR_INPUT_EOF */
SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size);
SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType);
SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf);

typedef struct
{
  size_t (*Write)(void *p, const void *buf, size_t size);
    /* Returns: result - the number of actually written bytes.
       (result < size) means error */
} ISeqOutStream;

typedef enum
{
  SZ_SEEK_SET = 0,
  SZ_SEEK_CUR = 1,
  SZ_SEEK_END = 2
} ESzSeek;

typedef struct
{
  SRes (*Read)(void *p, void *buf, size_t *size);  /* same as ISeqInStream::Read */
  SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
} ISeekInStream;

typedef struct
{
  SRes (*Look)(void *p, void **buf, size_t *size);
    /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
       (output(*size) > input(*size)) is not allowed
       (output(*size) < input(*size)) is allowed */
  SRes (*Skip)(void *p, size_t offset);
    /* offset must be <= output(*size) of Look */

  SRes (*Read)(void *p, void *buf, size_t *size);
    /* reads directly (without buffer). It's same as ISeqInStream::Read */
  SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
} ILookInStream;

SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size);
SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset);

/* reads via ILookInStream::Read */
SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType);
SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size);

#define LookToRead_BUF_SIZE (1 << 14)

typedef struct
{
  ILookInStream s;
  ISeekInStream *realStream;
  size_t pos;
  size_t size;
  Byte buf[LookToRead_BUF_SIZE];
} CLookToRead;

void LookToRead_CreateVTable(CLookToRead *p, int lookahead);
void LookToRead_Init(CLookToRead *p);

typedef struct
{
  ISeqInStream s;
  ILookInStream *realStream;
} CSecToLook;

void SecToLook_CreateVTable(CSecToLook *p);

typedef struct
{
  ISeqInStream s;
  ILookInStream *realStream;
} CSecToRead;

void SecToRead_CreateVTable(CSecToRead *p);

typedef struct
{
  SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize);
    /* Returns: result. (result != SZ_OK) means break.
       Value (UInt64)(Int64)-1 for size means unknown value. */
} ICompressProgress;

typedef struct
{
  void *(*Alloc)(void *p, size_t size);
  void (*Free)(void *p, void *address); /* address can be 0 */
} ISzAlloc;

#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
#define IAlloc_Free(p, a) (p)->Free((p), a)

EXTERN_C_END

#endif


================================================
FILE: include/lzma.h
================================================
#pragma once

#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "jffs2/jffs2.h"
#ifndef PAGE_SIZE
	extern int page_size;
	#define PAGE_SIZE page_size
#endif
#define LZMA_MALLOC malloc
#define LZMA_FREE free
#define PRINT_ERROR(msg) fprintf(stderr, msg)
#define INIT
#define STATIC

#ifndef __APPLE__
#    include <asm/types.h>
#endif

#include "lzma/LzmaDec.h"
#include "lzma/LzmaEnc.h"

#define LZMA_BEST_LEVEL (9)
#define LZMA_BEST_LC    (0)
#define LZMA_BEST_LP    (0)
#define LZMA_BEST_PB    (0)
#define LZMA_BEST_FB  (273)

#define LZMA_BEST_DICT(n) (((int)((n) / 2)) * 2)

static void *p_lzma_malloc(void *p, size_t size)
{
        if (size == 0)
                return NULL;

        return LZMA_MALLOC(size);
}

static void p_lzma_free(void *p, void *address)
{
        if (address != NULL)
                LZMA_FREE(address);
}

static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};



================================================
FILE: include/lzo/lzo.h
================================================
#ifndef __LZO_LG_H
#define __LZO_LG_H
int check_lzo_header(const char *name);
int lzo_unpack(const char *in_name, const char *out_name);
#endif //__LZO_LG_H


================================================
FILE: include/lzo/miniacc.h
================================================
/* ACC --- Automatic Compiler Configuration

   This file is part of the LZO real-time data compression library.

   Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
   Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
   All Rights Reserved.

   The LZO library is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2 of
   the License, or (at your option) any later version.

   The LZO library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with the LZO library; see the file COPYING.
   If not, write to the Free Software Foundation, Inc.,
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

   Markus F.X.J. Oberhumer
   <markus@oberhumer.com>
   http://www.oberhumer.com/opensource/lzo/
 */

#ifndef __ACC_H_INCLUDED
#    define __ACC_H_INCLUDED 1
#    define ACC_VERSION     20080430L
#    if defined(__CYGWIN32__) && !defined(__CYGWIN__)
#        define __CYGWIN__ __CYGWIN32__
#    endif
#    if defined(__IBMCPP__) && !defined(__IBMC__)
#        define __IBMC__ __IBMCPP__
#    endif
#    if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER)
#        define __INTEL_COMPILER __ICL
#    endif
#    if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
#        define _ALL_SOURCE 1
#    endif
#    if defined(__mips__) && defined(__R5900__)
#        if !defined(__LONG_MAX__)
#            define __LONG_MAX__ 9223372036854775807L
#        endif
#    endif
#    if defined(__INTEL_COMPILER) && defined(__linux__)
#        pragma warning(disable: 193)
#    endif
#    if defined(__KEIL__) && defined(__C166__)
#        pragma warning disable = 322
#    elif 0 && defined(__C251__)
#        pragma warning disable = 322
#    endif
#    if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
#        if (_MSC_VER >= 1300)
#            pragma warning(disable: 4668)
#        endif
#    endif
#    if defined(__POCC__) && defined(_WIN32)
#        if (__POCC__ >= 400)
#            pragma warn(disable: 2216)
#        endif
#    endif
#    if 0 && defined(__WATCOMC__)
#        if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
#            pragma warning 203 9
#        endif
#    endif
#    if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
#        pragma option -h
#    endif
#    if defined(ACC_CFG_NO_CONFIG_HEADER)
#    elif defined(ACC_CFG_CONFIG_HEADER)
#        include ACC_CFG_CONFIG_HEADER
#    else
#    endif
#    if defined(ACC_CFG_NO_LIMITS_H)
#    elif defined(ACC_LIBC_NAKED) || defined(ACC_BROKEN_LIMITS_H)
#        ifndef __ACC_FALLBACK_LIMITS_H_INCLUDED
#            define __ACC_FALLBACK_LIMITS_H_INCLUDED
#            undef CHAR_BIT
#            define CHAR_BIT        8
#            ifndef MB_LEN_MAX
#                define MB_LEN_MAX      1
#            endif
#            ifndef __SCHAR_MAX__
#                define __SCHAR_MAX__   127
#            endif
#            ifndef __SHRT_MAX__
#                define __SHRT_MAX__    32767
#            endif
#            ifndef __INT_MAX__
#                define __INT_MAX__     2147483647
#            endif
#            ifndef __LONG_MAX__
#                if defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__)
#                    define __LONG_MAX__    9223372036854775807L
#                else
#                    define __LONG_MAX__    2147483647L
#                endif
#            endif
#            undef SCHAR_MIN
#            undef SCHAR_MAX
#            undef UCHAR_MAX
#            define SCHAR_MIN       (-1 - SCHAR_MAX)
#            define SCHAR_MAX       (__SCHAR_MAX__)
#            define UCHAR_MAX       (SCHAR_MAX * 2 + 1)
#            undef SHRT_MIN
#            undef SHRT_MAX
#            undef USHRT_MAX
#            define SHRT_MIN        (-1 - SHRT_MAX)
#            define SHRT_MAX        (__SHRT_MAX__)
#            if ((__INT_MAX__) == (__SHRT_MAX__))
#                define USHRT_MAX       (SHRT_MAX * 2U + 1U)
#            else
#                define USHRT_MAX       (SHRT_MAX * 2 + 1)
#            endif
#            undef INT_MIN
#            undef INT_MAX
#            undef UINT_MAX
#            define INT_MIN         (-1 - INT_MAX)
#            define INT_MAX         (__INT_MAX__)
#            define UINT_MAX        (INT_MAX * 2U + 1U)
#            undef LONG_MIN
#            undef LONG_MAX
#            undef ULONG_MAX
#            define LONG_MIN        (-1L - LONG_MAX)
#            define LONG_MAX        ((__LONG_MAX__) + 0L)
#            define ULONG_MAX       (LONG_MAX * 2UL + 1UL)
#            undef CHAR_MIN
#            undef CHAR_MAX
#            if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED)
#                define CHAR_MIN        0
#                define CHAR_MAX        UCHAR_MAX
#            else
#                define CHAR_MIN        SCHAR_MIN
#                define CHAR_MAX        SCHAR_MAX
#            endif
#        endif
#    else
#        include <limits.h>
#    endif
#    if 0
#        define ACC_0xffffL             0xfffful
#        define ACC_0xffffffffL         0xfffffffful
#    else
#        define ACC_0xffffL             65535ul
#        define ACC_0xffffffffL         4294967295ul
#    endif
#    if (ACC_0xffffL == ACC_0xffffffffL)
#        error "your preprocessor is broken 1"
#    endif
#    if (16ul * 16384ul != 262144ul)
#        error "your preprocessor is broken 2"
#    endif
#    if 0
#        if (32767 >= 4294967295ul)
#            error "your preprocessor is broken 3"
#        endif
#        if (65535u >= 4294967295ul)
#            error "your preprocessor is broken 4"
#        endif
#    endif
#    if (UINT_MAX == ACC_0xffffL)
#        if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
#            if !defined(MSDOS)
#                define MSDOS 1
#            endif
#            if !defined(_MSDOS)
#                define _MSDOS 1
#            endif
#        elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
#            if (__VERSION == 520) && (MB_LEN_MAX == 1)
#                if !defined(__AZTEC_C__)
#                    define __AZTEC_C__ __VERSION
#                endif
#                if !defined(__DOS__)
#                    define __DOS__ 1
#                endif
#            endif
#        endif
#    endif
#    if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == ACC_0xffffL)
#        define ptrdiff_t long
#        define _PTRDIFF_T_DEFINED
#    endif
#    if (UINT_MAX == ACC_0xffffL)
#        undef __ACC_RENAME_A
#        undef __ACC_RENAME_B
#        if defined(__AZTEC_C__) && defined(__DOS__)
#            define __ACC_RENAME_A 1
#        elif defined(_MSC_VER) && defined(MSDOS)
#            if (_MSC_VER < 600)
#                define __ACC_RENAME_A 1
#            elif (_MSC_VER < 700)
#                define __ACC_RENAME_B 1
#            endif
#        elif defined(__TSC__) && defined(__OS2__)
#            define __ACC_RENAME_A 1
#        elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
#            define __ACC_RENAME_A 1
#        elif defined(__PACIFIC__) && defined(DOS)
#            if !defined(__far)
#                define __far far
#            endif
#            if !defined(__near)
#                define __near near
#            endif
#        endif
#        if defined(__ACC_RENAME_A)
#            if !defined(__cdecl)
#                define __cdecl cdecl
#            endif
#            if !defined(__far)
#                define __far far
#            endif
#            if !defined(__huge)
#                define __huge huge
#            endif
#            if !defined(__near)
#                define __near near
#            endif
#            if !defined(__pascal)
#                define __pascal pascal
#            endif
#            if !defined(__huge)
#                define __huge huge
#            endif
#        elif defined(__ACC_RENAME_B)
#            if !defined(__cdecl)
#                define __cdecl _cdecl
#            endif
#            if !defined(__far)
#                define __far _far
#            endif
#            if !defined(__huge)
#                define __huge _huge
#            endif
#            if !defined(__near)
#                define __near _near
#            endif
#            if !defined(__pascal)
#                define __pascal _pascal
#            endif
#        elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
#            if !defined(__cdecl)
#                define __cdecl cdecl
#            endif
#            if !defined(__pascal)
#                define __pascal pascal
#            endif
#        endif
#        undef __ACC_RENAME_A
#        undef __ACC_RENAME_B
#    endif
#    if (UINT_MAX == ACC_0xffffL)
#        if defined(__AZTEC_C__) && defined(__DOS__)
#            define ACC_BROKEN_CDECL_ALT_SYNTAX 1
#        elif defined(_MSC_VER) && defined(MSDOS)
#            if (_MSC_VER < 600)
#                define ACC_BROKEN_INTEGRAL_CONSTANTS 1
#            endif
#            if (_MSC_VER < 700)
#                define ACC_BROKEN_INTEGRAL_PROMOTION 1
#                define ACC_BROKEN_SIZEOF 1
#            endif
#        elif defined(__PACIFIC__) && defined(DOS)
#            define ACC_BROKEN_INTEGRAL_CONSTANTS 1
#        elif defined(__TURBOC__) && defined(__MSDOS__)
#            if (__TURBOC__ < 0x0150)
#                define ACC_BROKEN_CDECL_ALT_SYNTAX 1
#                define ACC_BROKEN_INTEGRAL_CONSTANTS 1
#                define ACC_BROKEN_INTEGRAL_PROMOTION 1
#            endif
#            if (__TURBOC__ < 0x0200)
#                define ACC_BROKEN_SIZEOF 1
#            endif
#            if (__TURBOC__ < 0x0400) && defined(__cplusplus)
#                define ACC_BROKEN_CDECL_ALT_SYNTAX 1
#            endif
#        elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
#            define ACC_BROKEN_CDECL_ALT_SYNTAX 1
#            define ACC_BROKEN_SIZEOF 1
#        endif
#    endif
#    if defined(__WATCOMC__) && (__WATCOMC__ < 900)
#        define ACC_BROKEN_INTEGRAL_CONSTANTS 1
#    endif
#    if defined(_CRAY) && defined(_CRAY1)
#        define ACC_BROKEN_SIGNED_RIGHT_SHIFT 1
#    endif
#    define ACC_PP_STRINGIZE(x)             #x
#    define ACC_PP_MACRO_EXPAND(x)          ACC_PP_STRINGIZE(x)
#    define ACC_PP_CONCAT2(a,b)             a ## b
#    define ACC_PP_CONCAT3(a,b,c)           a ## b ## c
#    define ACC_PP_CONCAT4(a,b,c,d)         a ## b ## c ## d
#    define ACC_PP_CONCAT5(a,b,c,d,e)       a ## b ## c ## d ## e
#    define ACC_PP_ECONCAT2(a,b)            ACC_PP_CONCAT2(a,b)
#    define ACC_PP_ECONCAT3(a,b,c)          ACC_PP_CONCAT3(a,b,c)
#    define ACC_PP_ECONCAT4(a,b,c,d)        ACC_PP_CONCAT4(a,b,c,d)
#    define ACC_PP_ECONCAT5(a,b,c,d,e)      ACC_PP_CONCAT5(a,b,c,d,e)
#    if 1
#        define ACC_CPP_STRINGIZE(x)            #x
#        define ACC_CPP_MACRO_EXPAND(x)         ACC_CPP_STRINGIZE(x)
#        define ACC_CPP_CONCAT2(a,b)            a ## b
#        define ACC_CPP_CONCAT3(a,b,c)          a ## b ## c
#        define ACC_CPP_CONCAT4(a,b,c,d)        a ## b ## c ## d
#        define ACC_CPP_CONCAT5(a,b,c,d,e)      a ## b ## c ## d ## e
#        define ACC_CPP_ECONCAT2(a,b)           ACC_CPP_CONCAT2(a,b)
#        define ACC_CPP_ECONCAT3(a,b,c)         ACC_CPP_CONCAT3(a,b,c)
#        define ACC_CPP_ECONCAT4(a,b,c,d)       ACC_CPP_CONCAT4(a,b,c,d)
#        define ACC_CPP_ECONCAT5(a,b,c,d,e)     ACC_CPP_CONCAT5(a,b,c,d,e)
#    endif
#    define __ACC_MASK_GEN(o,b)     (((((o) << ((b)-1)) - (o)) << 1) + (o))
#    if 1 && defined(__cplusplus)
#        if !defined(__STDC_CONSTANT_MACROS)
#            define __STDC_CONSTANT_MACROS 1
#        endif
#        if !defined(__STDC_LIMIT_MACROS)
#            define __STDC_LIMIT_MACROS 1
#        endif
#    endif
#    if defined(__cplusplus)
#        define ACC_EXTERN_C extern "C"
#    else
#        define ACC_EXTERN_C extern
#    endif
#    if !defined(__ACC_OS_OVERRIDE)
#        if defined(ACC_OS_FREESTANDING)
#            define ACC_INFO_OS           "freestanding"
#        elif defined(ACC_OS_EMBEDDED)
#            define ACC_INFO_OS           "embedded"
#        elif 1 && defined(__IAR_SYSTEMS_ICC__)
#            define ACC_OS_EMBEDDED       1
#            define ACC_INFO_OS           "embedded"
#        elif defined(__CYGWIN__) && defined(__GNUC__)
#            define ACC_OS_CYGWIN         1
#            define ACC_INFO_OS           "cygwin"
#        elif defined(__EMX__) && defined(__GNUC__)
#            define ACC_OS_EMX            1
#            define ACC_INFO_OS           "emx"
#        elif defined(__BEOS__)
#            define ACC_OS_BEOS           1
#            define ACC_INFO_OS           "beos"
#        elif defined(__Lynx__)
#            define ACC_OS_LYNXOS         1
#            define ACC_INFO_OS           "lynxos"
#        elif defined(__OS400__)
#            define ACC_OS_OS400          1
#            define ACC_INFO_OS           "os400"
#        elif defined(__QNX__)
#            define ACC_OS_QNX            1
#            define ACC_INFO_OS           "qnx"
#        elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
#            define ACC_OS_DOS32          1
#            define ACC_INFO_OS           "dos32"
#        elif defined(__BORLANDC__) && defined(__DPMI16__)
#            define ACC_OS_DOS16          1
#            define ACC_INFO_OS           "dos16"
#        elif defined(__ZTC__) && defined(DOS386)
#            define ACC_OS_DOS32          1
#            define ACC_INFO_OS           "dos32"
#        elif defined(__OS2__) || defined(__OS2V2__)
#            if (UINT_MAX == ACC_0xffffL)
#                define ACC_OS_OS216        1
#                define ACC_INFO_OS         "os216"
#            elif (UINT_MAX == ACC_0xffffffffL)
#                define ACC_OS_OS2          1
#                define ACC_INFO_OS         "os2"
#            else
#                error "check your limits.h header"
#            endif
#        elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
#            define ACC_OS_WIN64          1
#            define ACC_INFO_OS           "win64"
#        elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
#            define ACC_OS_WIN32          1
#            define ACC_INFO_OS           "win32"
#        elif defined(__MWERKS__) && defined(__INTEL__)
#            define ACC_OS_WIN32          1
#            define ACC_INFO_OS           "win32"
#        elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
#            if (UINT_MAX == ACC_0xffffL)
#                define ACC_OS_WIN16        1
#                define ACC_INFO_OS         "win16"
#            elif (UINT_MAX == ACC_0xffffffffL)
#                define ACC_OS_WIN32        1
#                define ACC_INFO_OS         "win32"
#            else
#                error "check your limits.h header"
#            endif
#        elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
#            if (UINT_MAX == ACC_0xffffL)
#                define ACC_OS_DOS16        1
#                define ACC_INFO_OS         "dos16"
#            elif (UINT_MAX == ACC_0xffffffffL)
#                define ACC_OS_DOS32        1
#                define ACC_INFO_OS         "dos32"
#            else
#                error "check your limits.h header"
#            endif
#        elif defined(__WATCOMC__)
#            if defined(__NT__) && (UINT_MAX == ACC_0xffffL)
#                define ACC_OS_DOS16        1
#                define ACC_INFO_OS         "dos16"
#            elif defined(__NT__) && (__WATCOMC__ < 1100)
#                define ACC_OS_WIN32        1
#                define ACC_INFO_OS         "win32"
#            elif defined(__linux__) || defined(__LINUX__)
#                define ACC_OS_POSIX        1
#                define ACC_INFO_OS         "posix"
#            else
#                error "please specify a target using the -bt compiler option"
#            endif
#        elif defined(__palmos__)
#            define ACC_OS_PALMOS         1
#            define ACC_INFO_OS           "palmos"
#        elif defined(__TOS__) || defined(__atarist__)
#            define ACC_OS_TOS            1
#            define ACC_INFO_OS           "tos"
#        elif defined(macintosh) && !defined(__ppc__)
#            define ACC_OS_MACCLASSIC     1
#            define ACC_INFO_OS           "macclassic"
#        elif defined(__VMS)
#            define ACC_OS_VMS            1
#            define ACC_INFO_OS           "vms"
#        elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
#            define ACC_OS_CONSOLE        1
#            define ACC_OS_CONSOLE_PS2    1
#            define ACC_INFO_OS           "console"
#            define ACC_INFO_OS_CONSOLE   "ps2"
#        elif (defined(__mips__) && defined(__psp__))
#            define ACC_OS_CONSOLE        1
#            define ACC_OS_CONSOLE_PSP    1
#            define ACC_INFO_OS           "console"
#            define ACC_INFO_OS_CONSOLE   "psp"
#        else
#            define ACC_OS_POSIX          1
#            define ACC_INFO_OS           "posix"
#        endif
#        if (ACC_OS_POSIX)
#            if defined(_AIX) || defined(__AIX__) || defined(__aix__)
#                define ACC_OS_POSIX_AIX        1
#                define ACC_INFO_OS_POSIX       "aix"
#            elif defined(__FreeBSD__)
#                define ACC_OS_POSIX_FREEBSD    1
#                define ACC_INFO_OS_POSIX       "freebsd"
#            elif defined(__hpux__) || defined(__hpux)
#                define ACC_OS_POSIX_HPUX       1
#                define ACC_INFO_OS_POSIX       "hpux"
#            elif defined(__INTERIX)
#                define ACC_OS_POSIX_INTERIX    1
#                define ACC_INFO_OS_POSIX       "interix"
#            elif defined(__IRIX__) || defined(__irix__)
#                define ACC_OS_POSIX_IRIX       1
#                define ACC_INFO_OS_POSIX       "irix"
#            elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
#                define ACC_OS_POSIX_LINUX      1
#                define ACC_INFO_OS_POSIX       "linux"
#            elif defined(__APPLE__) || defined(__MACOS__)
#                define ACC_OS_POSIX_MACOSX     1
#                define ACC_INFO_OS_POSIX       "macosx"
#            elif defined(__minix__) || defined(__minix)
#                define ACC_OS_POSIX_MINIX      1
#                define ACC_INFO_OS_POSIX       "minix"
#            elif defined(__NetBSD__)
#                define ACC_OS_POSIX_NETBSD     1
#                define ACC_INFO_OS_POSIX       "netbsd"
#            elif defined(__OpenBSD__)
#                define ACC_OS_POSIX_OPENBSD    1
#                define ACC_INFO_OS_POSIX       "openbsd"
#            elif defined(__osf__)
#                define ACC_OS_POSIX_OSF        1
#                define ACC_INFO_OS_POSIX       "osf"
#            elif defined(__solaris__) || defined(__sun)
#                if defined(__SVR4) || defined(__svr4__)
#                    define ACC_OS_POSIX_SOLARIS  1
#                    define ACC_INFO_OS_POSIX     "solaris"
#                else
#                    define ACC_OS_POSIX_SUNOS    1
#                    define ACC_INFO_OS_POSIX     "sunos"
#                endif
#            elif defined(__ultrix__) || defined(__ultrix)
#                define ACC_OS_POSIX_ULTRIX     1
#                define ACC_INFO_OS_POSIX       "ultrix"
#            elif defined(_UNICOS)
#                define ACC_OS_POSIX_UNICOS     1
#                define ACC_INFO_OS_POSIX       "unicos"
#            else
#                define ACC_OS_POSIX_UNKNOWN    1
#                define ACC_INFO_OS_POSIX       "unknown"
#            endif
#        endif
#    endif
#    if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
#        if (UINT_MAX != ACC_0xffffL)
#            error "this should not happen"
#        endif
#        if (ULONG_MAX != ACC_0xffffffffL)
#            error "this should not happen"
#        endif
#    endif
#    if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32 || ACC_OS_WIN64)
#        if (UINT_MAX != ACC_0xffffffffL)
#            error "this should not happen"
#        endif
#        if (ULONG_MAX != ACC_0xffffffffL)
#            error "this should not happen"
#        endif
#    endif
#    if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
#        define ACC_CC_CILLY          1
#        define ACC_INFO_CC           "Cilly"
#        if defined(__CILLY__)
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(__CILLY__)
#        else
#            define ACC_INFO_CCVER      "unknown"
#        endif
#    elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
#        define ACC_CC_SDCC           1
#        define ACC_INFO_CC           "sdcc"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(SDCC)
#    elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
#        define ACC_CC_PATHSCALE      (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__)
#        define ACC_INFO_CC           "Pathscale C"
#        define ACC_INFO_CCVER        __PATHSCALE__
#    elif defined(__INTEL_COMPILER)
#        define ACC_CC_INTELC         1
#        define ACC_INFO_CC           "Intel C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__INTEL_COMPILER)
#        if defined(_WIN32) || defined(_WIN64)
#            define ACC_CC_SYNTAX_MSC 1
#        else
#            define ACC_CC_SYNTAX_GNUC 1
#        endif
#    elif defined(__POCC__) && defined(_WIN32)
#        define ACC_CC_PELLESC        1
#        define ACC_INFO_CC           "Pelles C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__POCC__)
#    elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__)
#        if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
#            define ACC_CC_LLVM         (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
#        else
#            define ACC_CC_LLVM         (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
#        endif
#        define ACC_INFO_CC           "llvm-gcc"
#        define ACC_INFO_CCVER        __VERSION__
#    elif defined(__GNUC__) && defined(__VERSION__)
#        if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
#            define ACC_CC_GNUC         (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
#        elif defined(__GNUC_MINOR__)
#            define ACC_CC_GNUC         (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
#        else
#            define ACC_CC_GNUC         (__GNUC__ * 0x10000L)
#        endif
#        define ACC_INFO_CC           "gcc"
#        define ACC_INFO_CCVER        __VERSION__
#    elif defined(__ACK__) && defined(_ACK)
#        define ACC_CC_ACK            1
#        define ACC_INFO_CC           "Amsterdam Compiler Kit C"
#        define ACC_INFO_CCVER        "unknown"
#    elif defined(__AZTEC_C__)
#        define ACC_CC_AZTECC         1
#        define ACC_INFO_CC           "Aztec C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__AZTEC_C__)
#    elif defined(__BORLANDC__)
#        define ACC_CC_BORLANDC       1
#        define ACC_INFO_CC           "Borland C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__BORLANDC__)
#    elif defined(_CRAYC) && defined(_RELEASE)
#        define ACC_CC_CRAYC          1
#        define ACC_INFO_CC           "Cray C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(_RELEASE)
#    elif defined(__DMC__) && defined(__SC__)
#        define ACC_CC_DMC            1
#        define ACC_INFO_CC           "Digital Mars C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__DMC__)
#    elif defined(__DECC)
#        define ACC_CC_DECC           1
#        define ACC_INFO_CC           "DEC C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__DECC)
#    elif defined(__HIGHC__)
#        define ACC_CC_HIGHC          1
#        define ACC_INFO_CC           "MetaWare High C"
#        define ACC_INFO_CCVER        "unknown"
#    elif defined(__IAR_SYSTEMS_ICC__)
#        define ACC_CC_IARC           1
#        define ACC_INFO_CC           "IAR C"
#        if defined(__VER__)
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(__VER__)
#        else
#            define ACC_INFO_CCVER      "unknown"
#        endif
#    elif defined(__IBMC__)
#        define ACC_CC_IBMC           1
#        define ACC_INFO_CC           "IBM C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__IBMC__)
#    elif defined(__KEIL__) && defined(__C166__)
#        define ACC_CC_KEILC          1
#        define ACC_INFO_CC           "Keil C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__C166__)
#    elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
#        define ACC_CC_LCCWIN32       1
#        define ACC_INFO_CC           "lcc-win32"
#        define ACC_INFO_CCVER        "unknown"
#    elif defined(__LCC__)
#        define ACC_CC_LCC            1
#        define ACC_INFO_CC           "lcc"
#        if defined(__LCC_VERSION__)
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(__LCC_VERSION__)
#        else
#            define ACC_INFO_CCVER      "unknown"
#        endif
#    elif defined(_MSC_VER)
#        define ACC_CC_MSC            1
#        define ACC_INFO_CC           "Microsoft C"
#        if defined(_MSC_FULL_VER)
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(_MSC_VER) "." ACC_PP_MACRO_EXPAND(_MSC_FULL_VER)
#        else
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(_MSC_VER)
#        endif
#    elif defined(__MWERKS__)
#        define ACC_CC_MWERKS         1
#        define ACC_INFO_CC           "Metrowerks C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__MWERKS__)
#    elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
#        define ACC_CC_NDPC           1
#        define ACC_INFO_CC           "Microway NDP C"
#        define ACC_INFO_CCVER        "unknown"
#    elif defined(__PACIFIC__)
#        define ACC_CC_PACIFICC       1
#        define ACC_INFO_CC           "Pacific C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__PACIFIC__)
#    elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
#        define ACC_CC_PGI            1
#        define ACC_INFO_CC           "Portland Group PGI C"
#        define ACC_INFO_CCVER        "unknown"
#    elif defined(__PUREC__) && defined(__TOS__)
#        define ACC_CC_PUREC          1
#        define ACC_INFO_CC           "Pure C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__PUREC__)
#    elif defined(__SC__) && defined(__ZTC__)
#        define ACC_CC_SYMANTECC      1
#        define ACC_INFO_CC           "Symantec C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__SC__)
#    elif defined(__SUNPRO_C)
#        define ACC_INFO_CC           "SunPro C"
#        if ((__SUNPRO_C)+0 > 0)
#            define ACC_CC_SUNPROC      __SUNPRO_C
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(__SUNPRO_C)
#        else
#            define ACC_CC_SUNPROC      1
#            define ACC_INFO_CCVER      "unknown"
#        endif
#    elif defined(__SUNPRO_CC)
#        define ACC_INFO_CC           "SunPro C"
#        if ((__SUNPRO_CC)+0 > 0)
#            define ACC_CC_SUNPROC      __SUNPRO_CC
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(__SUNPRO_CC)
#        else
#            define ACC_CC_SUNPROC      1
#            define ACC_INFO_CCVER      "unknown"
#        endif
#    elif defined(__TINYC__)
#        define ACC_CC_TINYC          1
#        define ACC_INFO_CC           "Tiny C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__TINYC__)
#    elif defined(__TSC__)
#        define ACC_CC_TOPSPEEDC      1
#        define ACC_INFO_CC           "TopSpeed C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__TSC__)
#    elif defined(__WATCOMC__)
#        define ACC_CC_WATCOMC        1
#        define ACC_INFO_CC           "Watcom C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__WATCOMC__)
#    elif defined(__TURBOC__)
#        define ACC_CC_TURBOC         1
#        define ACC_INFO_CC           "Turbo C"
#        define ACC_INFO_CCVER        ACC_PP_MACRO_EXPAND(__TURBOC__)
#    elif defined(__ZTC__)
#        define ACC_CC_ZORTECHC       1
#        define ACC_INFO_CC           "Zortech C"
#        if (__ZTC__ == 0x310)
#            define ACC_INFO_CCVER      "0x310"
#        else
#            define ACC_INFO_CCVER      ACC_PP_MACRO_EXPAND(__ZTC__)
#        endif
#    else
#        define ACC_CC_UNKNOWN        1
#        define ACC_INFO_CC           "unknown"
#        define ACC_INFO_CCVER        "unknown"
#    endif
#    if 0 && (ACC_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
#        error "ACC_CC_MSC: _MSC_FULL_VER is not defined"
#    endif
#    if !defined(__ACC_ARCH_OVERRIDE) && !defined(ACC_ARCH_GENERIC) && defined(_CRAY)
#        if (UINT_MAX > ACC_0xffffffffL) && defined(_CRAY)
#            if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
#                define ACC_ARCH_CRAY_MPP     1
#            elif defined(_CRAY1)
#                define ACC_ARCH_CRAY_PVP     1
#            endif
#        endif
#    endif
#    if !defined(__ACC_ARCH_OVERRIDE)
#        if defined(ACC_ARCH_GENERIC)
#            define ACC_INFO_ARCH             "generic"
#        elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
#            define ACC_ARCH_I086             1
#            define ACC_ARCH_IA16             1
#            define ACC_INFO_ARCH             "i086"
#        elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
#            define ACC_ARCH_ALPHA            1
#            define ACC_INFO_ARCH             "alpha"
#        elif (ACC_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
#            define ACC_ARCH_ALPHA            1
#            define ACC_INFO_ARCH             "alpha"
#        elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
#            define ACC_ARCH_AMD64            1
#            define ACC_INFO_ARCH             "amd64"
#        elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB))
#            define ACC_ARCH_ARM              1
#            define ACC_ARCH_ARM_THUMB        1
#            define ACC_INFO_ARCH             "arm_thumb"
#        elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
#            define ACC_ARCH_ARM              1
#            if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1)
#                define ACC_ARCH_ARM_THUMB      1
#                define ACC_INFO_ARCH           "arm_thumb"
#            elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2)
#                define ACC_INFO_ARCH           "arm"
#            else
#                define ACC_INFO_ARCH           "arm"
#            endif
#        elif defined(__arm__) || defined(_M_ARM)
#            define ACC_ARCH_ARM              1
#            define ACC_INFO_ARCH             "arm"
#        elif (UINT_MAX <= ACC_0xffffL) && defined(__AVR__)
#            define ACC_ARCH_AVR              1
#            define ACC_INFO_ARCH             "avr"
#        elif defined(__bfin__)
#            define ACC_ARCH_BLACKFIN         1
#            define ACC_INFO_ARCH             "blackfin"
#        elif (UINT_MAX == ACC_0xffffL) && defined(__C166__)
#            define ACC_ARCH_C166             1
#            define ACC_INFO_ARCH             "c166"
#        elif defined(__cris__)
#            define ACC_ARCH_CRIS             1
#            define ACC_INFO_ARCH             "cris"
#        elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
#            define ACC_ARCH_EZ80             1
#            define ACC_INFO_ARCH             "ez80"
#        elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
#            define ACC_ARCH_H8300            1
#            define ACC_INFO_ARCH             "h8300"
#        elif defined(__hppa__) || defined(__hppa)
#            define ACC_ARCH_HPPA             1
#            define ACC_INFO_ARCH             "hppa"
#        elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
#            define ACC_ARCH_I386             1
#            define ACC_ARCH_IA32             1
#            define ACC_INFO_ARCH             "i386"
#        elif (ACC_CC_ZORTECHC && defined(__I86__))
#            define ACC_ARCH_I386             1
#            define ACC_ARCH_IA32             1
#            define ACC_INFO_ARCH             "i386"
#        elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
#            define ACC_ARCH_I386             1
#            define ACC_ARCH_IA32             1
#            define ACC_INFO_ARCH             "i386"
#        elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
#            define ACC_ARCH_IA64             1
#            define ACC_INFO_ARCH             "ia64"
#        elif (UINT_MAX == ACC_0xffffL) && defined(__m32c__)
#            define ACC_ARCH_M16C             1
#            define ACC_INFO_ARCH             "m16c"
#        elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
#            define ACC_ARCH_M16C             1
#            define ACC_INFO_ARCH             "m16c"
#        elif defined(__m32r__)
#            define ACC_ARCH_M32R             1
#            define ACC_INFO_ARCH             "m32r"
#        elif (ACC_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
#            define ACC_ARCH_M68K             1
#            define ACC_INFO_ARCH             "m68k"
#        elif (UINT_MAX == ACC_0xffffL) && defined(__C251__)
#            define ACC_ARCH_MCS251           1
#            define ACC_INFO_ARCH             "mcs251"
#        elif (UINT_MAX == ACC_0xffffL) && defined(__C51__)
#            define ACC_ARCH_MCS51            1
#            define ACC_INFO_ARCH             "mcs51"
#        elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
#            define ACC_ARCH_MCS51            1
#            define ACC_INFO_ARCH             "mcs51"
#        elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
#            define ACC_ARCH_MIPS             1
#            define ACC_INFO_ARCH             "mips"
#        elif (UINT_MAX == ACC_0xffffL) && defined(__MSP430__)
#            define ACC_ARCH_MSP430           1
#            define ACC_INFO_ARCH             "msp430"
#        elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
#            define ACC_ARCH_MSP430           1
#            define ACC_INFO_ARCH             "msp430"
#        elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
#            define ACC_ARCH_POWERPC          1
#            define ACC_INFO_ARCH             "powerpc"
#        elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
#            define ACC_ARCH_S390             1
#            define ACC_INFO_ARCH             "s390"
#        elif defined(__sh__) || defined(_M_SH)
#            define ACC_ARCH_SH               1
#            define ACC_INFO_ARCH             "sh"
#        elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
#            define ACC_ARCH_SPARC            1
#            define ACC_INFO_ARCH             "sparc"
#        elif defined(__SPU__)
#            define ACC_ARCH_SPU              1
#            define ACC_INFO_ARCH             "spu"
#        elif (UINT_MAX == ACC_0xffffL) && defined(__z80)
#            define ACC_ARCH_Z80              1
#            define ACC_INFO_ARCH             "z80"
#        elif (ACC_ARCH_CRAY_PVP)
#            if defined(_CRAYSV1)
#                define ACC_ARCH_CRAY_SV1       1
#                define ACC_INFO_ARCH           "cray_sv1"
#            elif (_ADDR64)
#                define ACC_ARCH_CRAY_T90       1
#                define ACC_INFO_ARCH           "cray_t90"
#            elif (_ADDR32)
#                define ACC_ARCH_CRAY_YMP       1
#                define ACC_INFO_ARCH           "cray_ymp"
#            else
#                define ACC_ARCH_CRAY_XMP       1
#                define ACC_INFO_ARCH           "cray_xmp"
#            endif
#        else
#            define ACC_ARCH_UNKNOWN          1
#            define ACC_INFO_ARCH             "unknown"
#        endif
#    endif
#    if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_DOS32 || ACC_OS_OS2)
#        error "FIXME - missing define for CPU architecture"
#    endif
#    if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN32)
#        error "FIXME - missing WIN32 define for CPU architecture"
#    endif
#    if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN64)
#        error "FIXME - missing WIN64 define for CPU architecture"
#    endif
#    if (ACC_OS_OS216 || ACC_OS_WIN16)
#        define ACC_ARCH_I086PM           1
#        define ACC_ARCH_IA16PM           1
#    elif 1 && (ACC_OS_DOS16 && defined(BLX286))
#        define ACC_ARCH_I086PM           1
#        define ACC_ARCH_IA16PM           1
#    elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
#        define ACC_ARCH_I086PM           1
#        define ACC_ARCH_IA16PM           1
#    elif 1 && (ACC_OS_DOS16 && ACC_CC_BORLANDC && defined(__DPMI16__))
#        define ACC_ARCH_I086PM           1
#        define ACC_ARCH_IA16PM           1
#    endif
#    if defined(ACC_ARCH_ARM_THUMB) && !defined(ACC_ARCH_ARM)
#        error "this should not happen"
#    endif
#    if defined(ACC_ARCH_I086PM) && !defined(ACC_ARCH_I086)
#        error "this should not happen"
#    endif
#    if (ACC_ARCH_I086)
#        if (UINT_MAX != ACC_0xffffL)
#            error "this should not happen"
#        endif
#        if (ULONG_MAX != ACC_0xffffffffL)
#            error "this should not happen"
#        endif
#    endif
#    if (ACC_ARCH_I386)
#        if (UINT_MAX != ACC_0xffffL) && defined(__i386_int16__)
#            error "this should not happen"
#        endif
#        if (UINT_MAX != ACC_0xffffffffL) && !defined(__i386_int16__)
#            error "this should not happen"
#        endif
#        if (ULONG_MAX != ACC_0xffffffffL)
#            error "this should not happen"
#        endif
#    endif
#    if !defined(__ACC_MM_OVERRIDE)
#        if (ACC_ARCH_I086)
#            if (UINT_MAX != ACC_0xffffL)
#                error "this should not happen"
#            endif
#            if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
#                define ACC_MM_TINY           1
#            elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
#                define ACC_MM_HUGE           1
#            elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
#                define ACC_MM_SMALL          1
#            elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
#                define ACC_MM_MEDIUM         1
#            elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
#                define ACC_MM_COMPACT        1
#            elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
#                define ACC_MM_LARGE          1
#            elif (ACC_CC_AZTECC)
#                if defined(_LARGE_CODE) && defined(_LARGE_DATA)
#                    define ACC_MM_LARGE        1
#                elif defined(_LARGE_CODE)
#                    define ACC_MM_MEDIUM       1
#                elif defined(_LARGE_DATA)
#                    define ACC_MM_COMPACT      1
#                else
#                    define ACC_MM_SMALL        1
#                endif
#            elif (ACC_CC_ZORTECHC && defined(__VCM__))
#                define ACC_MM_LARGE          1
#            else
#                error "unknown memory model"
#            endif
#            if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
#                define ACC_HAVE_MM_HUGE_PTR        1
#                define ACC_HAVE_MM_HUGE_ARRAY      1
#                if (ACC_MM_TINY)
#                    undef ACC_HAVE_MM_HUGE_ARRAY
#                endif
#                if (ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_ZORTECHC)
#                    undef ACC_HAVE_MM_HUGE_PTR
#                    undef ACC_HAVE_MM_HUGE_ARRAY
#                elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
#                    undef ACC_HAVE_MM_HUGE_ARRAY
#                elif (ACC_CC_MSC && defined(_QC))
#                    undef ACC_HAVE_MM_HUGE_ARRAY
#                    if (_MSC_VER < 600)
#                        undef ACC_HAVE_MM_HUGE_PTR
#                    endif
#                elif (ACC_CC_TURBOC && (__TURBOC__ < 0x0295))
#                    undef ACC_HAVE_MM_HUGE_ARRAY
#                endif
#                if (ACC_ARCH_I086PM) && !defined(ACC_HAVE_MM_HUGE_PTR)
#                    if (ACC_OS_DOS16)
#                        error "this should not happen"
#                    elif (ACC_CC_ZORTECHC)
#                    else
#                        error "this should not happen"
#                    endif
#                endif
#                ifdef __cplusplus
extern "C" {
#                endif
#                if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
	extern void __near __cdecl _AHSHIFT(void);
#                    define ACC_MM_AHSHIFT      ((unsigned) _AHSHIFT)
#                elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
	extern void __near __cdecl _AHSHIFT(void);
#                    define ACC_MM_AHSHIFT      ((unsigned) _AHSHIFT)
#                elif (ACC_CC_MSC || ACC_CC_TOPSPEEDC)
	extern void __near __cdecl _AHSHIFT(void);
#                    define ACC_MM_AHSHIFT      ((unsigned) _AHSHIFT)
#                elif (ACC_CC_TURBOC && (__TURBOC__ >= 0x0295))
	extern void __near __cdecl _AHSHIFT(void);
#                    define ACC_MM_AHSHIFT      ((unsigned) _AHSHIFT)
#                elif ((ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_TURBOC) && ACC_OS_DOS16)
#                    define ACC_MM_AHSHIFT      12
#                elif (ACC_CC_WATCOMC)
	extern unsigned char _HShift;
#                    define ACC_MM_AHSHIFT      ((unsigned) _HShift)
#                else
#                    error "FIXME - implement ACC_MM_AHSHIFT"
#                endif
#                ifdef __cplusplus
}
#                endif
#            endif
#        elif (ACC_ARCH_C166)
#            if !defined(__MODEL__)
#                error "FIXME - C166 __MODEL__"
#            elif ((__MODEL__) == 0)
#                define ACC_MM_SMALL          1
#            elif ((__MODEL__) == 1)
#                define ACC_MM_SMALL          1
#            elif ((__MODEL__) == 2)
#                define ACC_MM_LARGE          1
#            elif ((__MODEL__) == 3)
#                define ACC_MM_TINY           1
#            elif ((__MODEL__) == 4)
#                define ACC_MM_XTINY          1
#            elif ((__MODEL__) == 5)
#                define ACC_MM_XSMALL         1
#            else
#                error "FIXME - C166 __MODEL__"
#            endif
#        elif (ACC_ARCH_MCS251)
#            if !defined(__MODEL__)
#                error "FIXME - MCS251 __MODEL__"
#            elif ((__MODEL__) == 0)
#                define ACC_MM_SMALL          1
#            elif ((__MODEL__) == 2)
#                define ACC_MM_LARGE          1
#            elif ((__MODEL__) == 3)
#                define ACC_MM_TINY           1
#            elif ((__MODEL__) == 4)
#                define ACC_MM_XTINY          1
#            elif ((__MODEL__) == 5)
#                define ACC_MM_XSMALL         1
#            else
#                error "FIXME - MCS251 __MODEL__"
#            endif
#        elif (ACC_ARCH_MCS51)
#            if !defined(__MODEL__)
#                error "FIXME - MCS51 __MODEL__"
#            elif ((__MODEL__) == 1)
#                define ACC_MM_SMALL          1
#            elif ((__MODEL__) == 2)
#                define ACC_MM_LARGE          1
#            elif ((__MODEL__) == 3)
#                define ACC_MM_TINY           1
#            elif ((__MODEL__) == 4)
#                define ACC_MM_XTINY          1
#            elif ((__MODEL__) == 5)
#                define ACC_MM_XSMALL         1
#            else
#                error "FIXME - MCS51 __MODEL__"
#            endif
#        elif (ACC_ARCH_CRAY_PVP)
#            define ACC_MM_PVP            1
#        else
#            define ACC_MM_FLAT           1
#        endif
#        if (ACC_MM_COMPACT)
#            define ACC_INFO_MM           "compact"
#        elif (ACC_MM_FLAT)
#            define ACC_INFO_MM           "flat"
#        elif (ACC_MM_HUGE)
#            define ACC_INFO_MM           "huge"
#        elif (ACC_MM_LARGE)
#            define ACC_INFO_MM           "large"
#        elif (ACC_MM_MEDIUM)
#            define ACC_INFO_MM           "medium"
#        elif (ACC_MM_PVP)
#            define ACC_INFO_MM           "pvp"
#        elif (ACC_MM_SMALL)
#            define ACC_INFO_MM           "small"
#        elif (ACC_MM_TINY)
#            define ACC_INFO_MM           "tiny"
#        else
#            error "unknown memory model"
#        endif
#    endif
#    if defined(SIZEOF_SHORT)
#        define ACC_SIZEOF_SHORT          (SIZEOF_SHORT)
#    endif
#    if defined(SIZEOF_INT)
#        define ACC_SIZEOF_INT            (SIZEOF_INT)
#    endif
#    if defined(SIZEOF_LONG)
#        define ACC_SIZEOF_LONG           (SIZEOF_LONG)
#    endif
#    if defined(SIZEOF_LONG_LONG)
#        define ACC_SIZEOF_LONG_LONG      (SIZEOF_LONG_LONG)
#    endif
#    if defined(SIZEOF___INT16)
#        define ACC_SIZEOF___INT16        (SIZEOF___INT16)
#    endif
#    if defined(SIZEOF___INT32)
#        define ACC_SIZEOF___INT32        (SIZEOF___INT32)
#    endif
#    if defined(SIZEOF___INT64)
#        define ACC_SIZEOF___INT64        (SIZEOF___INT64)
#    endif
#    if defined(SIZEOF_VOID_P)
#        define ACC_SIZEOF_VOID_P         (SIZEOF_VOID_P)
#    endif
#    if defined(SIZEOF_SIZE_T)
#        define ACC_SIZEOF_SIZE_T         (SIZEOF_SIZE_T)
#    endif
#    if defined(SIZEOF_PTRDIFF_T)
#        define ACC_SIZEOF_PTRDIFF_T      (SIZEOF_PTRDIFF_T)
#    endif
#    define __ACC_LSR(x,b)    (((x)+0ul) >> (b))
#    if !defined(ACC_SIZEOF_SHORT)
#        if (ACC_ARCH_CRAY_PVP)
#            define ACC_SIZEOF_SHORT        8
#        elif (USHRT_MAX == ACC_0xffffL)
#            define ACC_SIZEOF_SHORT        2
#        elif (__ACC_LSR(USHRT_MAX,7) == 1)
#            define ACC_SIZEOF_SHORT        1
#        elif (__ACC_LSR(USHRT_MAX,15) == 1)
#            define ACC_SIZEOF_SHORT        2
#        elif (__ACC_LSR(USHRT_MAX,31) == 1)
#            define ACC_SIZEOF_SHORT        4
#        elif (__ACC_LSR(USHRT_MAX,63) == 1)
#            define ACC_SIZEOF_SHORT        8
#        elif (__ACC_LSR(USHRT_MAX,127) == 1)
#            define ACC_SIZEOF_SHORT        16
#        else
#            error "ACC_SIZEOF_SHORT"
#        endif
#    endif
#    if !defined(ACC_SIZEOF_INT)
#        if (ACC_ARCH_CRAY_PVP)
#            define ACC_SIZEOF_INT          8
#        elif (UINT_MAX == ACC_0xffffL)
#            define ACC_SIZEOF_INT          2
#        elif (UINT_MAX == ACC_0xffffffffL)
#            define ACC_SIZEOF_INT          4
#        elif (__ACC_LSR(UINT_MAX,7) == 1)
#            define ACC_SIZEOF_INT          1
#        elif (__ACC_LSR(UINT_MAX,15) == 1)
#            define ACC_SIZEOF_INT          2
#        elif (__ACC_LSR(UINT_MAX,31) == 1)
#            define ACC_SIZEOF_INT          4
#        elif (__ACC_LSR(UINT_MAX,63) == 1)
#            define ACC_SIZEOF_INT          8
#        elif (__ACC_LSR(UINT_MAX,127) == 1)
#            define ACC_SIZEOF_INT          16
#        else
#            error "ACC_SIZEOF_INT"
#        endif
#    endif
#    if !defined(ACC_SIZEOF_LONG)
#        if (ULONG_MAX == ACC_0xffffffffL)
#            define ACC_SIZEOF_LONG         4
#        elif (__ACC_LSR(ULONG_MAX,7) == 1)
#            define ACC_SIZEOF_LONG         1
#        elif (__ACC_LSR(ULONG_MAX,15) == 1)
#            define ACC_SIZEOF_LONG         2
#        elif (__ACC_LSR(ULONG_MAX,31) == 1)
#            define ACC_SIZEOF_LONG         4
#        elif (__ACC_LSR(ULONG_MAX,63) == 1)
#            define ACC_SIZEOF_LONG         8
#        elif (__ACC_LSR(ULONG_MAX,127) == 1)
#            define ACC_SIZEOF_LONG         16
#        else
#            error "ACC_SIZEOF_LONG"
#        endif
#    endif
#    if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
#        if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
#            if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
#                if (ACC_CC_GNUC >= 0x030300ul)
#                    if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0)
#                        define ACC_SIZEOF_LONG_LONG      ACC_SIZEOF_LONG
#                    elif (__ACC_LSR(__LONG_LONG_MAX__,30) == 1)
#                        define ACC_SIZEOF_LONG_LONG      4
#                    endif
#                endif
#            endif
#        endif
#    endif
#    if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
#        if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
#            if (ACC_ARCH_I086 && ACC_CC_DMC)
#            elif (ACC_CC_CILLY) && defined(__GNUC__)
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
#                define ACC_SIZEOF_LONG_LONG      8
#            elif ((ACC_OS_WIN32 || ACC_OS_WIN64 || defined(_WIN32)) && ACC_CC_MSC && (_MSC_VER >= 1400))
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (ACC_OS_WIN64 || defined(_WIN64))
#                define ACC_SIZEOF___INT64        8
#            elif (ACC_ARCH_I386 && (ACC_CC_DMC))
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (ACC_ARCH_I386 && (ACC_CC_SYMANTECC && (__SC__ >= 0x700)))
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (ACC_ARCH_I386 && (ACC_CC_INTELC && defined(__linux__)))
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (ACC_ARCH_I386 && (ACC_CC_MWERKS || ACC_CC_PELLESC || ACC_CC_PGI || ACC_CC_SUNPROC))
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (ACC_ARCH_I386 && (ACC_CC_INTELC || ACC_CC_MSC))
#                define ACC_SIZEOF___INT64        8
#            elif ((ACC_OS_WIN32 || defined(_WIN32)) && (ACC_CC_MSC))
#                define ACC_SIZEOF___INT64        8
#            elif (ACC_ARCH_I386 && (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
#                define ACC_SIZEOF___INT64        8
#            elif (ACC_ARCH_I386 && (ACC_CC_WATCOMC && (__WATCOMC__ >= 1100)))
#                define ACC_SIZEOF___INT64        8
#            elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
#                define ACC_SIZEOF___INT64        8
#            elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
#                define ACC_SIZEOF_LONG_LONG      8
#            elif (ACC_CC_SDCC) && (ACC_SIZEOF_INT == 2)
#            elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#                define ACC_SIZEOF_LONG_LONG      8
#            endif
#        endif
#    endif
#    if defined(__cplusplus) && defined(ACC_CC_GNUC)
#        if (ACC_CC_GNUC < 0x020800ul)
#            undef ACC_SIZEOF_LONG_LONG
#        endif
#    endif
#    if defined(ACC_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
#        undef ACC_SIZEOF_LONG_LONG
#    endif
#    if !defined(ACC_SIZEOF_VOID_P)
#        if (ACC_ARCH_I086)
#            define __ACC_WORDSIZE            2
#            if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
#                define ACC_SIZEOF_VOID_P       2
#            elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
#                define ACC_SIZEOF_VOID_P       4
#            else
#                error "ACC_MM"
#            endif
#        elif (ACC_ARCH_AVR || ACC_ARCH_Z80)
#            define __ACC_WORDSIZE            1
#            define ACC_SIZEOF_VOID_P         2
#        elif (ACC_ARCH_C166 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251 || ACC_ARCH_MSP430)
#            define ACC_SIZEOF_VOID_P         2
#        elif (ACC_ARCH_H8300)
#            if defined(__NORMAL_MODE__)
#                define __ACC_WORDSIZE          4
#                define ACC_SIZEOF_VOID_P       2
#            elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
#                define __ACC_WORDSIZE          4
#                define ACC_SIZEOF_VOID_P       4
#            else
#                define __ACC_WORDSIZE          2
#                define ACC_SIZEOF_VOID_P       2
#            endif
#            if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x040000ul)) && (ACC_SIZEOF_INT == 4)
#                define ACC_SIZEOF_SIZE_T       ACC_SIZEOF_INT
#                define ACC_SIZEOF_PTRDIFF_T    ACC_SIZEOF_INT
#            endif
#        elif (ACC_ARCH_M16C)
#            define __ACC_WORDSIZE            2
#            if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
#                define ACC_SIZEOF_VOID_P       4
#            else
#                define ACC_SIZEOF_VOID_P       2
#            endif
#        elif (ACC_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
#            define __ACC_WORDSIZE            8
#            define ACC_SIZEOF_VOID_P         4
#        elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
#            define __ACC_WORDSIZE            8
#            define ACC_SIZEOF_VOID_P         8
#        elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
#            define ACC_SIZEOF_VOID_P         ACC_SIZEOF_LONG
#            define ACC_SIZEOF_SIZE_T         ACC_SIZEOF_LONG
#            define ACC_SIZEOF_PTRDIFF_T      ACC_SIZEOF_LONG
#        elif (ACC_OS_OS400 || defined(__OS400__))
#            define __ACC_WORDSIZE            ACC_SIZEOF_LONG
#            define ACC_SIZEOF_VOID_P         16
#            define ACC_SIZEOF_SIZE_T         ACC_SIZEOF_LONG
#            define ACC_SIZEOF_PTRDIFF_T      ACC_SIZEOF_LONG
#        elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
#            define ACC_SIZEOF_VOID_P         8
#            define ACC_SIZEOF_SIZE_T         ACC_SIZEOF_LONG
#            define ACC_SIZEOF_PTRDIFF_T      ACC_SIZEOF_LONG
#        elif (ACC_ARCH_SPU)
#            if 0
#                define __ACC_WORDSIZE            16
#            endif
#            define ACC_SIZEOF_VOID_P         4
#        else
#            define ACC_SIZEOF_VOID_P         ACC_SIZEOF_LONG
#        endif
#    endif
#    if !defined(ACC_WORDSIZE)
#        if defined(__ACC_WORDSIZE)
#            define ACC_WORDSIZE            __ACC_WORDSIZE
#        else
#            define ACC_WORDSIZE            ACC_SIZEOF_VOID_P
#        endif
#    endif
#    if !defined(ACC_SIZEOF_SIZE_T)
#        if (ACC_ARCH_I086 || ACC_ARCH_M16C)
#            define ACC_SIZEOF_SIZE_T         2
#        else
#            define ACC_SIZEOF_SIZE_T         ACC_SIZEOF_VOID_P
#        endif
#    endif
#    if !defined(ACC_SIZEOF_PTRDIFF_T)
#        if (ACC_ARCH_I086)
#            if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM || ACC_MM_HUGE)
#                define ACC_SIZEOF_PTRDIFF_T    ACC_SIZEOF_VOID_P
#            elif (ACC_MM_COMPACT || ACC_MM_LARGE)
#                if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
#                    define ACC_SIZEOF_PTRDIFF_T  4
#                else
#                    define ACC_SIZEOF_PTRDIFF_T  2
#                endif
#            else
#                error "ACC_MM"
#            endif
#        else
#            define ACC_SIZEOF_PTRDIFF_T      ACC_SIZEOF_SIZE_T
#        endif
#    endif
#    if defined(ACC_ABI_NEUTRAL_ENDIAN)
#        undef ACC_ABI_BIG_ENDIAN
#        undef ACC_ABI_LITTLE_ENDIAN
#    elif !defined(ACC_ABI_BIG_ENDIAN) && !defined(ACC_ABI_LITTLE_ENDIAN)
#        if (ACC_ARCH_ALPHA) && (ACC_ARCH_CRAY_MPP)
#            define ACC_ABI_BIG_ENDIAN        1
#        elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430)
#            define ACC_ABI_LITTLE_ENDIAN     1
#        elif (ACC_ARCH_M68K || ACC_ARCH_S390)
#            define ACC_ABI_BIG_ENDIAN        1
#        elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
#            if (__LITTLE_ENDIAN__ == 1)
#                define ACC_ABI_LITTLE_ENDIAN   1
#            else
#                define ACC_ABI_BIG_ENDIAN      1
#            endif
#        elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
#            define ACC_ABI_BIG_ENDIAN        1
#        elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
#            define ACC_ABI_LITTLE_ENDIAN     1
#        elif 1 && (ACC_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
#            define ACC_ABI_BIG_ENDIAN        1
#        elif 1 && (ACC_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
#            define ACC_ABI_LITTLE_ENDIAN     1
#        elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
#            define ACC_ABI_BIG_ENDIAN        1
#        elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
#            define ACC_ABI_LITTLE_ENDIAN     1
#        endif
#    endif
#    if defined(ACC_ABI_BIG_ENDIAN) && defined(ACC_ABI_LITTLE_ENDIAN)
#        error "this should not happen"
#    endif
#    if defined(ACC_ABI_BIG_ENDIAN)
#        define ACC_INFO_ABI_ENDIAN       "be"
#    elif defined(ACC_ABI_LITTLE_ENDIAN)
#        define ACC_INFO_ABI_ENDIAN       "le"
#    elif defined(ACC_ABI_NEUTRAL_ENDIAN)
#        define ACC_INFO_ABI_ENDIAN       "neutral"
#    endif
#    if (ACC_SIZEOF_INT == 1 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
#        define ACC_ABI_I8LP16         1
#        define ACC_INFO_ABI_PM       "i8lp16"
#    elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
#        define ACC_ABI_ILP16         1
#        define ACC_INFO_ABI_PM       "ilp16"
#    elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4)
#        define ACC_ABI_ILP32         1
#        define ACC_INFO_ABI_PM       "ilp32"
#    elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 8 && ACC_SIZEOF_SIZE_T == 8)
#        define ACC_ABI_LLP64         1
#        define ACC_INFO_ABI_PM       "llp64"
#    elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
#        define ACC_ABI_LP64          1
#        define ACC_INFO_ABI_PM       "lp64"
#    elif (ACC_SIZEOF_INT == 8 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
#        define ACC_ABI_ILP64         1
#        define ACC_INFO_ABI_PM       "ilp64"
#    elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 4)
#        define ACC_ABI_IP32L64       1
#        define ACC_INFO_ABI_PM       "ip32l64"
#    endif
#    if !defined(__ACC_LIBC_OVERRIDE)
#        if defined(ACC_LIBC_NAKED)
#            define ACC_INFO_LIBC         "naked"
#        elif defined(ACC_LIBC_FREESTANDING)
#            define ACC_INFO_LIBC         "freestanding"
#        elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
#            define ACC_INFO_LIBC         "mfreestanding"
#        elif defined(ACC_LIBC_ISOC90)
#            define ACC_INFO_LIBC         "isoc90"
#        elif defined(ACC_LIBC_ISOC99)
#            define ACC_INFO_LIBC         "isoc99"
#        elif defined(__dietlibc__)
#            define ACC_LIBC_DIETLIBC     1
#            define ACC_INFO_LIBC         "dietlibc"
#        elif defined(_NEWLIB_VERSION)
#            define ACC_LIBC_NEWLIB       1
#            define ACC_INFO_LIBC         "newlib"
#        elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
#            if defined(__UCLIBC_SUBLEVEL__)
#                define ACC_LIBC_UCLIBC     (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__)
#            else
#                define ACC_LIBC_UCLIBC     0x00090bL
#            endif
#            define ACC_INFO_LIBC         "uclibc"
#        elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
#            define ACC_LIBC_GLIBC        (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100)
#            define ACC_INFO_LIBC         "glibc"
#        elif (ACC_CC_MWERKS) && defined(__MSL__)
#            define ACC_LIBC_MSL          __MSL__
#            define ACC_INFO_LIBC         "msl"
#        elif 1 && defined(__IAR_SYSTEMS_ICC__)
#            define ACC_LIBC_ISOC90       1
#            define ACC_INFO_LIBC         "isoc90"
#        else
#            define ACC_LIBC_DEFAULT      1
#            define ACC_INFO_LIBC         "default"
#        endif
#    endif
#    if !defined(__acc_gnuc_extension__)
#        if (ACC_CC_GNUC >= 0x020800ul)
#            define __acc_gnuc_extension__    __extension__
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_gnuc_extension__    __extension__
#        else
#            define __acc_gnuc_extension__
#        endif
#    endif
#    if !defined(__acc_ua_volatile)
#        define __acc_ua_volatile     volatile
#    endif
#    if !defined(__acc_alignof)
#        if (ACC_CC_CILLY || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
#            define __acc_alignof(e)      __alignof__(e)
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700))
#            define __acc_alignof(e)      __alignof__(e)
#        elif (ACC_CC_MSC && (_MSC_VER >= 1300))
#            define __acc_alignof(e)      __alignof(e)
#        endif
#    endif
#    if defined(__acc_alignof)
#        define __acc_HAVE_alignof 1
#    endif
#    if !defined(__acc_constructor)
#        if (ACC_CC_GNUC >= 0x030400ul)
#            define __acc_constructor     __attribute__((__constructor__,__used__))
#        elif (ACC_CC_GNUC >= 0x020700ul)
#            define __acc_constructor     __attribute__((__constructor__))
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_constructor     __attribute__((__constructor__))
#        endif
#    endif
#    if defined(__acc_constructor)
#        define __acc_HAVE_constructor 1
#    endif
#    if !defined(__acc_destructor)
#        if (ACC_CC_GNUC >= 0x030400ul)
#            define __acc_destructor      __attribute__((__destructor__,__used__))
#        elif (ACC_CC_GNUC >= 0x020700ul)
#            define __acc_destructor      __attribute__((__destructor__))
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_destructor      __attribute__((__destructor__))
#        endif
#    endif
#    if defined(__acc_destructor)
#        define __acc_HAVE_destructor 1
#    endif
#    if defined(__acc_HAVE_destructor) && !defined(__acc_HAVE_constructor)
#        error "this should not happen"
#    endif
#    if !defined(__acc_inline)
#        if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
#        elif defined(__cplusplus)
#            define __acc_inline          inline
#        elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
#            define __acc_inline          __inline
#        elif (ACC_CC_CILLY || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
#            define __acc_inline          __inline__
#        elif (ACC_CC_DMC)
#            define __acc_inline          __inline
#        elif (ACC_CC_INTELC)
#            define __acc_inline          __inline
#        elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x2405))
#            define __acc_inline          __inline
#        elif (ACC_CC_MSC && (_MSC_VER >= 900))
#            define __acc_inline          __inline
#        elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#            define __acc_inline          inline
#        endif
#    endif
#    if defined(__acc_inline)
#        define __acc_HAVE_inline 1
#    else
#        define __acc_inline
#    endif
#    if !defined(__acc_forceinline)
#        if (ACC_CC_GNUC >= 0x030200ul)
#            define __acc_forceinline     __inline__ __attribute__((__always_inline__))
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC)
#            define __acc_forceinline     __forceinline
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC)
#            define __acc_forceinline     __inline__ __attribute__((__always_inline__))
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_forceinline     __inline__ __attribute__((__always_inline__))
#        elif (ACC_CC_MSC && (_MSC_VER >= 1200))
#            define __acc_forceinline     __forceinline
#        endif
#    endif
#    if defined(__acc_forceinline)
#        define __acc_HAVE_forceinline 1
#    else
#        define __acc_forceinline
#    endif
#    if !defined(__acc_noinline)
#        if 1 && (ACC_ARCH_I386) && (ACC_CC_GNUC >= 0x040000ul) && (ACC_CC_GNUC < 0x040003ul)
#            define __acc_noinline        __attribute__((__noinline__,__used__))
#        elif (ACC_CC_GNUC >= 0x030200ul)
#            define __acc_noinline        __attribute__((__noinline__))
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_MSC)
#            define __acc_noinline        __declspec(noinline)
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC)
#            define __acc_noinline        __attribute__((__noinline__))
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_noinline        __attribute__((__noinline__))
#        elif (ACC_CC_MSC && (_MSC_VER >= 1300))
#            define __acc_noinline        __declspec(noinline)
#        elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3200) && (ACC_OS_WIN32 || ACC_OS_WIN64))
#            if defined(__cplusplus)
#            else
#                define __acc_noinline      __declspec(noinline)
#            endif
#        endif
#    endif
#    if defined(__acc_noinline)
#        define __acc_HAVE_noinline 1
#    else
#        define __acc_noinline
#    endif
#    if (defined(__acc_HAVE_forceinline) || defined(__acc_HAVE_noinline)) && !defined(__acc_HAVE_inline)
#        error "this should not happen"
#    endif
#    if !defined(__acc_noreturn)
#        if (ACC_CC_GNUC >= 0x020700ul)
#            define __acc_noreturn        __attribute__((__noreturn__))
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC)
#            define __acc_noreturn        __declspec(noreturn)
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_GNUC)
#            define __acc_noreturn        __attribute__((__noreturn__))
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_noreturn        __attribute__((__noreturn__))
#        elif (ACC_CC_MSC && (_MSC_VER >= 1200))
#            define __acc_noreturn        __declspec(noreturn)
#        endif
#    endif
#    if defined(__acc_noreturn)
#        define __acc_HAVE_noreturn 1
#    else
#        define __acc_noreturn
#    endif
#    if !defined(__acc_nothrow)
#        if (ACC_CC_GNUC >= 0x030300ul)
#            define __acc_nothrow         __attribute__((__nothrow__))
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC) && defined(__cplusplus)
#            define __acc_nothrow         __declspec(nothrow)
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC)
#            define __acc_nothrow         __attribute__((__nothrow__))
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_nothrow         __attribute__((__nothrow__))
#        elif (ACC_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
#            define __acc_nothrow         __declspec(nothrow)
#        endif
#    endif
#    if defined(__acc_nothrow)
#        define __acc_HAVE_nothrow 1
#    else
#        define __acc_nothrow
#    endif
#    if !defined(__acc_restrict)
#        if (ACC_CC_GNUC >= 0x030400ul)
#            define __acc_restrict        __restrict__
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_GNUC)
#            define __acc_restrict        __restrict__
#        elif (ACC_CC_LLVM)
#            define __acc_restrict        __restrict__
#        elif (ACC_CC_MSC && (_MSC_VER >= 1400))
#            define __acc_restrict        __restrict
#        endif
#    endif
#    if defined(__acc_restrict)
#        define __acc_HAVE_restrict 1
#    else
#        define __acc_restrict
#    endif
#    if !defined(__acc_likely) && !defined(__acc_unlikely)
#        if (ACC_CC_GNUC >= 0x030200ul)
#            define __acc_likely(e)       (__builtin_expect(!!(e),1))
#            define __acc_unlikely(e)     (__builtin_expect(!!(e),0))
#        elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800))
#            define __acc_likely(e)       (__builtin_expect(!!(e),1))
#            define __acc_unlikely(e)     (__builtin_expect(!!(e),0))
#        elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define __acc_likely(e)       (__builtin_expect(!!(e),1))
#            define __acc_unlikely(e)     (__builtin_expect(!!(e),0))
#        endif
#    endif
#    if defined(__acc_likely)
#        define __acc_HAVE_likely 1
#    else
#        define __acc_likely(e)       (e)
#    endif
#    if defined(__acc_unlikely)
#        define __acc_HAVE_unlikely 1
#    else
#        define __acc_unlikely(e)     (e)
#    endif
#    if !defined(ACC_UNUSED)
#        if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
#            define ACC_UNUSED(var)         ((void) &var)
#        elif (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PELLESC || ACC_CC_TURBOC)
#            define ACC_UNUSED(var)         if (&var) ; else
#        elif (ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
#            define ACC_UNUSED(var)         ((void) var)
#        elif (ACC_CC_MSC && (_MSC_VER < 900))
#            define ACC_UNUSED(var)         if (&var) ; else
#        elif (ACC_CC_KEILC)
#            define ACC_UNUSED(var)         {extern int __acc_unused[1-2*!(sizeof(var)>0)];}
#        elif (ACC_CC_PACIFICC)
#            define ACC_UNUSED(var)         ((void) sizeof(var))
#        elif (ACC_CC_WATCOMC) && defined(__cplusplus)
#            define ACC_UNUSED(var)         ((void) var)
#        else
#            define ACC_UNUSED(var)         ((void) &var)
#        endif
#    endif
#    if !defined(ACC_UNUSED_FUNC)
#        if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
#            define ACC_UNUSED_FUNC(func)   ((void) func)
#        elif (ACC_CC_BORLANDC || ACC_CC_NDPC || ACC_CC_TURBOC)
#            define ACC_UNUSED_FUNC(func)   if (func) ; else
#        elif (ACC_CC_LLVM)
#            define ACC_UNUSED_FUNC(func)   ((void) &func)
#        elif (ACC_CC_MSC && (_MSC_VER < 900))
#            define ACC_UNUSED_FUNC(func)   if (func) ; else
#        elif (ACC_CC_MSC)
#            define ACC_UNUSED_FUNC(func)   ((void) &func)
#        elif (ACC_CC_KEILC || ACC_CC_PELLESC)
#            define ACC_UNUSED_FUNC(func)   {extern int __acc_unused[1-2*!(sizeof((int)func)>0)];}
#        else
#            define ACC_UNUSED_FUNC(func)   ((void) func)
#        endif
#    endif
#    if !defined(ACC_UNUSED_LABEL)
#        if (ACC_CC_WATCOMC) && defined(__cplusplus)
#            define ACC_UNUSED_LABEL(l)     switch(0) case 1:goto l
#        elif (ACC_CC_INTELC || ACC_CC_WATCOMC)
#            define ACC_UNUSED_LABEL(l)     if (0) goto l
#        else
#            define ACC_UNUSED_LABEL(l)     switch(0) case 1:goto l
#        endif
#    endif
#    if !defined(ACC_DEFINE_UNINITIALIZED_VAR)
#        if 0
#            define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init)  type var
#        elif 0 && (ACC_CC_GNUC)
#            define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init)  type var = var
#        else
#            define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init)  type var = init
#        endif
#    endif
#    if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
#        if (ACC_CC_AZTECC || ACC_CC_ZORTECHC)
#            define ACC_COMPILE_TIME_ASSERT_HEADER(e)  extern int __acc_cta[1-!(e)];
#        elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
#            define ACC_COMPILE_TIME_ASSERT_HEADER(e)  extern int __acc_cta[1u-2*!(e)];
#        elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
#            define ACC_COMPILE_TIME_ASSERT_HEADER(e)  extern int __acc_cta[1-!(e)];
#        else
#            define ACC_COMPILE_TIME_ASSERT_HEADER(e)  extern int __acc_cta[1-2*!(e)];
#        endif
#    endif
#    if !defined(ACC_COMPILE_TIME_ASSERT)
#        if (ACC_CC_AZTECC)
#            define ACC_COMPILE_TIME_ASSERT(e)  {typedef int __acc_cta_t[1-!(e)];}
#        elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
#            define ACC_COMPILE_TIME_ASSERT(e)  switch(0) case 1:case !(e):break;
#        elif (ACC_CC_MSC && (_MSC_VER < 900))
#            define ACC_COMPILE_TIME_ASSERT(e)  switch(0) case 1:case !(e):break;
#        elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
#            define ACC_COMPILE_TIME_ASSERT(e)  switch(0) case 1:case !(e):break;
#        else
#            define ACC_COMPILE_TIME_ASSERT(e)  {typedef int __acc_cta_t[1-2*!(e)];}
#        endif
#    endif
#    if (ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#        if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC)
#        elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
#            define __acc_cdecl                 __cdecl
#            define __acc_cdecl_atexit
#            define __acc_cdecl_main            __cdecl
#            if (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
#                define __acc_cdecl_qsort         __pascal
#            elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
#                define __acc_cdecl_qsort         _stdcall
#            else
#                define __acc_cdecl_qsort         __cdecl
#            endif
#        elif (ACC_CC_WATCOMC)
#            define __acc_cdecl                 __cdecl
#        else
#            define __acc_cdecl                 __cdecl
#            define __acc_cdecl_atexit          __cdecl
#            define __acc_cdecl_main            __cdecl
#            define __acc_cdecl_qsort           __cdecl
#        endif
#        if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC || ACC_CC_WATCOMC)
#        elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
#            define __acc_cdecl_sighandler      __pascal
#        elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
#            define __acc_cdecl_sighandler      _stdcall
#        elif (ACC_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
#            define __acc_cdecl_sighandler      __clrcall
#        elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
#            if defined(_DLL)
#                define __acc_cdecl_sighandler    _far _cdecl _loadds
#            elif defined(_MT)
#                define __acc_cdecl_sighandler    _far _cdecl
#            else
#                define __acc_cdecl_sighandler    _cdecl
#            endif
#        else
#            define __acc_cdecl_sighandler      __cdecl
#        endif
#    elif (ACC_ARCH_I386) && (ACC_CC_WATCOMC)
#        define __acc_cdecl                   __cdecl
#    elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
#        define __acc_cdecl                   cdecl
#    endif
#    if !defined(__acc_cdecl)
#        define __acc_cdecl
#    endif
#    if !defined(__acc_cdecl_atexit)
#        define __acc_cdecl_atexit
#    endif
#    if !defined(__acc_cdecl_main)
#        define __acc_cdecl_main
#    endif
#    if !defined(__acc_cdecl_qsort)
#        define __acc_cdecl_qsort
#    endif
#    if !defined(__acc_cdecl_sighandler)
#        define __acc_cdecl_sighandler
#    endif
#    if !defined(__acc_cdecl_va)
#        define __acc_cdecl_va                __acc_cdecl
#    endif
#    if !defined(ACC_CFG_NO_WINDOWS_H)
#        if (ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)) || ACC_OS_WIN32 || ACC_OS_WIN64)
#            if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
#            elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
#            elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul)))
#            else
#                define ACC_HAVE_WINDOWS_H 1
#            endif
#        endif
#    endif
#    if (ACC_ARCH_ALPHA)
#        define ACC_OPT_AVOID_UINT_INDEX  1
#        define ACC_OPT_AVOID_SHORT       1
#        define ACC_OPT_AVOID_USHORT      1
#    elif (ACC_ARCH_AMD64)
#        define ACC_OPT_AVOID_INT_INDEX   1
#        define ACC_OPT_AVOID_UINT_INDEX  1
#        define ACC_OPT_UNALIGNED16       1
#        define ACC_OPT_UNALIGNED32       1
#        define ACC_OPT_UNALIGNED64       1
#    elif (ACC_ARCH_ARM && ACC_ARCH_ARM_THUMB)
#    elif (ACC_ARCH_ARM)
#        define ACC_OPT_AVOID_SHORT       1
#        define ACC_OPT_AVOID_USHORT      1
#    elif (ACC_ARCH_CRIS)
#        define ACC_OPT_UNALIGNED16       1
#        define ACC_OPT_UNALIGNED32       1
#    elif (ACC_ARCH_I386)
#        define ACC_OPT_UNALIGNED16       1
#        define ACC_OPT_UNALIGNED32       1
#    elif (ACC_ARCH_IA64)
#        define ACC_OPT_AVOID_INT_INDEX   1
#        define ACC_OPT_AVOID_UINT_INDEX  1
#        define ACC_OPT_PREFER_POSTINC    1
#    elif (ACC_ARCH_M68K)
#        define ACC_OPT_PREFER_POSTINC    1
#        define ACC_OPT_PREFER_PREDEC     1
#        if defined(__mc68020__) && !defined(__mcoldfire__)
#            define ACC_OPT_UNALIGNED16     1
#            define ACC_OPT_UNALIGNED32     1
#        endif
#    elif (ACC_ARCH_MIPS)
#        define ACC_OPT_AVOID_UINT_INDEX  1
#    elif (ACC_ARCH_POWERPC)
#        define ACC_OPT_PREFER_PREINC     1
#        define ACC_OPT_PREFER_PREDEC     1
#        if defined(ACC_ABI_BIG_ENDIAN)
#            define ACC_OPT_UNALIGNED16     1
#            define ACC_OPT_UNALIGNED32     1
#        endif
#    elif (ACC_ARCH_S390)
#        define ACC_OPT_UNALIGNED16       1
#        define ACC_OPT_UNALIGNED32       1
#        if (ACC_SIZEOF_SIZE_T == 8)
#            define ACC_OPT_UNALIGNED64     1
#        endif
#    elif (ACC_ARCH_SH)
#        define ACC_OPT_PREFER_POSTINC    1
#        define ACC_OPT_PREFER_PREDEC     1
#    endif
#    if !defined(ACC_CFG_NO_INLINE_ASM)
#        if defined(ACC_CC_LLVM)
#            define ACC_CFG_NO_INLINE_ASM 1
#        endif
#    endif
#    if !defined(ACC_CFG_NO_UNALIGNED)
#        if defined(ACC_ABI_NEUTRAL_ENDIAN) || defined(ACC_ARCH_GENERIC)
#            define ACC_CFG_NO_UNALIGNED 1
#        endif
#    endif
#    if defined(ACC_CFG_NO_UNALIGNED)
#        undef ACC_OPT_UNALIGNED16
#        undef ACC_OPT_UNALIGNED32
#        undef ACC_OPT_UNALIGNED64
#    endif
#    if defined(ACC_CFG_NO_INLINE_ASM)
#    elif (ACC_ARCH_I386 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
#        define ACC_ASM_SYNTAX_MSC 1
#    elif (ACC_OS_WIN64 && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
#    elif (ACC_ARCH_I386 && (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
#        define ACC_ASM_SYNTAX_GNUC 1
#    elif (ACC_ARCH_AMD64 && (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
#        define ACC_ASM_SYNTAX_GNUC 1
#    endif
#    if (ACC_ASM_SYNTAX_GNUC)
#        if (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
#            define __ACC_ASM_CLOBBER         "ax"
#        elif (ACC_CC_INTELC)
#            define __ACC_ASM_CLOBBER         "memory"
#        else
#            define __ACC_ASM_CLOBBER         "cc", "memory"
#        endif
#    endif
#    if defined(__ACC_INFOSTR_MM)
#    elif (ACC_MM_FLAT) && (defined(__ACC_INFOSTR_PM) || defined(ACC_INFO_ABI_PM))
#        define __ACC_INFOSTR_MM          ""
#    elif defined(ACC_INFO_MM)
#        define __ACC_INFOSTR_MM          "." ACC_INFO_MM
#    else
#        define __ACC_INFOSTR_MM          ""
#    endif
#    if defined(__ACC_INFOSTR_PM)
#    elif defined(ACC_INFO_ABI_PM)
#        define __ACC_INFOSTR_PM          "." ACC_INFO_ABI_PM
#    else
#        define __ACC_INFOSTR_PM          ""
#    endif
#    if defined(__ACC_INFOSTR_ENDIAN)
#    elif defined(ACC_INFO_ABI_ENDIAN)
#        define __ACC_INFOSTR_ENDIAN      "." ACC_INFO_ABI_ENDIAN
#    else
#        define __ACC_INFOSTR_ENDIAN      ""
#    endif
#    if defined(__ACC_INFOSTR_OSNAME)
#    elif defined(ACC_INFO_OS_CONSOLE)
#        define __ACC_INFOSTR_OSNAME      ACC_INFO_OS "." ACC_INFO_OS_CONSOLE
#    elif defined(ACC_INFO_OS_POSIX)
#        define __ACC_INFOSTR_OSNAME      ACC_INFO_OS "." ACC_INFO_OS_POSIX
#    else
#        define __ACC_INFOSTR_OSNAME      ACC_INFO_OS
#    endif
#    if defined(__ACC_INFOSTR_LIBC)
#    elif defined(ACC_INFO_LIBC)
#        define __ACC_INFOSTR_LIBC        "." ACC_INFO_LIBC
#    else
#        define __ACC_INFOSTR_LIBC        ""
#    endif
#    if defined(__ACC_INFOSTR_CCVER)
#    elif defined(ACC_INFO_CCVER)
#        define __ACC_INFOSTR_CCVER       " " ACC_INFO_CCVER
#    else
#        define __ACC_INFOSTR_CCVER       ""
#    endif
#    define ACC_INFO_STRING \
    ACC_INFO_ARCH __ACC_INFOSTR_MM __ACC_INFOSTR_PM __ACC_INFOSTR_ENDIAN \
    " " __ACC_INFOSTR_OSNAME __ACC_INFOSTR_LIBC " " ACC_INFO_CC __ACC_INFOSTR_CCVER
#    if defined(ACC_CFG_NO_CONFIG_HEADER)
#    elif defined(ACC_CFG_CONFIG_HEADER)
#    else
#        if !defined(ACC_CFG_AUTO_NO_HEADERS)
#            if defined(ACC_LIBC_NAKED)
#            elif defined(ACC_LIBC_FREESTANDING)
#                define HAVE_LIMITS_H 1
#                define HAVE_STDARG_H 1
#                define HAVE_STDDEF_H 1
#            elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
#                define HAVE_LIMITS_H 1
#                define HAVE_SETJMP_H 1
#                define HAVE_STDARG_H 1
#                define HAVE_STDDEF_H 1
#                define HAVE_STDIO_H 1
#                define HAVE_STRING_H 1
#            else
#                define STDC_HEADERS 1
#                define HAVE_ASSERT_H 1
#                define HAVE_CTYPE_H 1
#                define HAVE_DIRENT_H 1
#                define HAVE_ERRNO_H 1
#                define HAVE_FCNTL_H 1
#                define HAVE_FLOAT_H 1
#                define HAVE_LIMITS_H 1
#                define HAVE_MALLOC_H 1
#                define HAVE_MEMORY_H 1
#                define HAVE_SETJMP_H 1
#                define HAVE_SIGNAL_H 1
#                define HAVE_STDARG_H 1
#                define HAVE_STDDEF_H 1
#                define HAVE_STDIO_H 1
#                define HAVE_STDLIB_H 1
#                define HAVE_STRING_H 1
#                define HAVE_TIME_H 1
#                define HAVE_UNISTD_H 1
#                define HAVE_UTIME_H 1
#                define HAVE_SYS_STAT_H 1
#                define HAVE_SYS_TIME_H 1
#                define HAVE_SYS_TYPES_H 1
#                if (ACC_OS_POSIX)
#                    if (ACC_OS_POSIX_AIX)
#                        define HAVE_SYS_RESOURCE_H 1
#                    elif (ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_MACOSX || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD)
#                        define HAVE_STRINGS_H 1
#                        undef HAVE_MALLOC_H
#                    elif (ACC_OS_POSIX_HPUX || ACC_OS_POSIX_INTERIX)
#                        define HAVE_ALLOCA_H 1
#                    elif (ACC_OS_POSIX_MACOSX && ACC_LIBC_MSL)
#                        undef HAVE_SYS_TIME_H
#                        undef HAVE_SYS_TYPES_H
#                    elif (ACC_OS_POSIX_SOLARIS || ACC_OS_POSIX_SUNOS)
#                        define HAVE_ALLOCA_H 1
#                    endif
#                    if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
#                        define HAVE_STRINGS_H 1
#                        define HAVE_SYS_MMAN_H 1
#                        define HAVE_SYS_RESOURCE_H 1
#                        define HAVE_SYS_WAIT_H 1
#                    endif
#                    if (ACC_LIBC_NEWLIB)
#                        undef HAVE_STRINGS_H
#                    endif
#                elif (ACC_OS_CYGWIN)
#                    define HAVE_IO_H 1
#                elif (ACC_OS_EMX)
#                    define HAVE_ALLOCA_H 1
#                    define HAVE_IO_H 1
#                elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
#                    if !defined(__MINT__)
#                        undef HAVE_MALLOC_H
#                    endif
#                elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
#                    undef HAVE_DIRENT_H
#                    undef HAVE_FCNTL_H
#                    undef HAVE_MALLOC_H
#                    undef HAVE_MEMORY_H
#                    undef HAVE_UNISTD_H
#                    undef HAVE_UTIME_H
#                    undef HAVE_SYS_STAT_H
#                    undef HAVE_SYS_TIME_H
#                    undef HAVE_SYS_TYPES_H
#                endif
#                if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
#                    define HAVE_CONIO_H 1
#                    define HAVE_DIRECT_H 1
#                    define HAVE_DOS_H 1
#                    define HAVE_IO_H 1
#                    define HAVE_SHARE_H 1
#                    if (ACC_CC_AZTECC)
#                        undef HAVE_CONIO_H
#                        undef HAVE_DIRECT_H
#                        undef HAVE_DIRENT_H
#                        undef HAVE_MALLOC_H
#                        undef HAVE_SHARE_H
#                        undef HAVE_UNISTD_H
#                        undef HAVE_UTIME_H
#                        undef HAVE_SYS_STAT_H
#                        undef HAVE_SYS_TIME_H
#                        undef HAVE_SYS_TYPES_H
#                    elif (ACC_CC_BORLANDC)
#                        undef HAVE_UNISTD_H
#                        undef HAVE_SYS_TIME_H
#                        if (ACC_OS_WIN32 || ACC_OS_WIN64)
#                            undef HAVE_DIRENT_H
#                        endif
#                        if (__BORLANDC__ < 0x0400)
#                            undef HAVE_DIRENT_H
#                            undef HAVE_UTIME_H
#                        endif
#                    elif (ACC_CC_DMC)
#                        undef HAVE_DIRENT_H
#                        undef HAVE_UNISTD_H
#                        define HAVE_SYS_DIRENT_H 1
#                    elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
#                    elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
#                        define HAVE_ALLOCA_H 1
#                        undef HAVE_DIRENT_H
#                        undef HAVE_UNISTD_H
#                    elif (ACC_CC_IBMC && ACC_OS_OS2)
#                        undef HAVE_DOS_H
#                        undef HAVE_DIRENT_H
#                        undef HAVE_UNISTD_H
#                        undef HAVE_UTIME_H
#                        undef HAVE_SYS_TIME_H
#                        define HAVE_SYS_UTIME_H 1
#                    elif (ACC_CC_INTELC || ACC_CC_MSC)
#                        undef HAVE_DIRENT_H
#                        undef HAVE_UNISTD_H
#                        undef HAVE_UTIME_H
#                        undef HAVE_SYS_TIME_H
#                        define HAVE_SYS_UTIME_H 1
#                    elif (ACC_CC_LCCWIN32)
#                        undef HAVE_DIRENT_H
#                        undef HAVE_DOS_H
#                        undef HAVE_UNISTD_H
#                        undef HAVE_SYS_TIME_H
#                    elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
#                        undef HAVE_UTIME_H
#                        define HAVE_SYS_UTIME_H 1
#                    elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
#                        define HAVE_ALLOCA_H 1
#                        undef HAVE_DOS_H
#                        undef HAVE_SHARE_H
#                        undef HAVE_SYS_TIME_H
#                    elif (ACC_CC_NDPC)
#                        undef HAVE_DIRENT_H
#                        undef HAVE_DOS_H
#                        undef HAVE_UNISTD_H
#                        undef HAVE_UTIME_H
#                        undef HAVE_SYS_TIME_H
#                    elif (ACC_CC_PACIFICC)
#                        undef HAVE_DIRECT_H
#                        undef HAVE_DIRENT_H
#                        undef HAVE_FCNTL_H
#                        undef HAVE_IO_H
#                        undef HAVE_MALLOC_H
#                        undef HAVE_MEMORY_H
#                        undef HAVE_SHARE_H
#                        undef HAVE_UNISTD_H
#                        undef HAVE_UTIME_H
#                        undef HAVE_SYS_STAT_H
#                        undef HAVE_SYS_TIME_H
#                        undef HAVE_SYS_TYPES_H
#                    elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
#                        undef HAVE_DIRENT_H
#                        undef HAVE_DOS_H
#                        undef HAVE_MALLOC_H
#                        undef HAVE_SHARE_H
#                        undef HAVE_UNISTD_H
#                        undef HAVE_UTIME_H
#                        undef HAVE_SYS_TIME_H
#                        if (__POCC__ < 280)
#                        else
#                            defi
Download .txt
gitextract_meo9h1xu/

├── .cirrus.yml
├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .sonarcloud_gen.sh
├── AUTHORS
├── CMakeLists.txt
├── COPYING
├── README.md
├── build.sh
├── cmake-modules/
│   └── FindLZO.cmake
├── code_format.sh
├── include/
│   ├── common.h
│   ├── config.h
│   ├── cramfs/
│   │   ├── cramfs.h
│   │   ├── cramfs_fs.h
│   │   └── cramfsswap.h
│   ├── crc.h
│   ├── epk.h
│   ├── epk1.h
│   ├── epk2.h
│   ├── epk3.h
│   ├── jffs2/
│   │   ├── jffs2.h
│   │   └── mini_inflate.h
│   ├── log.h
│   ├── lz4/
│   │   ├── bench.h
│   │   ├── lz4.h
│   │   └── lz4hc.h
│   ├── lzhs/
│   │   ├── lzhs.h
│   │   └── tables.h
│   ├── lzma/
│   │   ├── LzFind.h
│   │   ├── LzHash.h
│   │   ├── LzmaDec.h
│   │   ├── LzmaEnc.h
│   │   └── Types.h
│   ├── lzma.h
│   ├── lzo/
│   │   ├── lzo.h
│   │   ├── miniacc.h
│   │   ├── portab.h
│   │   └── portab_a.h
│   ├── main.h
│   ├── mediatek.h
│   ├── mediatek_pkg.h
│   ├── mfile.h
│   ├── minigzip.h
│   ├── os_byteswap.h
│   ├── osx/
│   │   └── elf.h
│   ├── philips.h
│   ├── realtek/
│   │   └── rtsplit.h
│   ├── realtek.h
│   ├── sniptype.h
│   ├── squashfs/
│   │   ├── action.h
│   │   ├── caches-queues-lists.h
│   │   ├── compressor.h
│   │   ├── error.h
│   │   ├── gzip_wrapper.h
│   │   ├── info.h
│   │   ├── lz4_wrapper.h
│   │   ├── lzo_wrapper.h
│   │   ├── mksquashfs.h
│   │   ├── process_fragments.h
│   │   ├── progressbar.h
│   │   ├── pseudo.h
│   │   ├── read_fs.h
│   │   ├── restore.h
│   │   ├── sort.h
│   │   ├── squashfs_compat.h
│   │   ├── squashfs_fs.h
│   │   ├── squashfs_swap.h
│   │   ├── unsquashfs.h
│   │   ├── unsquashfs_info.h
│   │   ├── xattr.h
│   │   └── xz_wrapper.h
│   ├── stream/
│   │   ├── crc32.h
│   │   └── tsfile.h
│   ├── symfile.h
│   ├── thpool.h
│   ├── u-boot/
│   │   ├── image.h
│   │   ├── mtdinfo.h
│   │   ├── partcommon.h
│   │   ├── partinfo.h
│   │   ├── partinfov1.h
│   │   └── partinfov2.h
│   ├── util.h
│   └── util_crypto.h
├── keys/
│   ├── AES.key
│   ├── MTK.key
│   ├── README.md
│   ├── e60.pem
│   ├── e60n.pem
│   ├── general_pub.pem
│   ├── h15.pem
│   ├── k24.pem
│   ├── k24n.pem
│   ├── k24t.pem
│   ├── k25lp.pem
│   ├── k2l.pem
│   ├── k2lp.pem
│   ├── k3lp.pem
│   ├── k5lp.pem
│   ├── k6hp.pem
│   ├── k6lp.pem
│   ├── k6lpfhd.pem
│   ├── k6lpwee.pem
│   ├── k7lp.pem
│   ├── k8ap.pem
│   ├── k8apwee.pem
│   ├── k8hp-hotel.pem
│   ├── k8hp.pem
│   ├── k8hpp.pem
│   ├── k8hpt.pem
│   ├── k8hpwee.pem
│   ├── k8lp-hotel.pem
│   ├── k8lp.pem
│   ├── k8lpn-hotel.pem
│   ├── k8lpn.pem
│   ├── k8lpn2.pem
│   ├── k8lpwee.pem
│   ├── kf23f-mnt.pem
│   ├── kf23f.pem
│   ├── kf23fwee.pem
│   ├── kid23q.pem
│   ├── lg1152.pem
│   ├── lg1154_netcast.pem
│   ├── lg1154_webos.pem
│   ├── lm14.pem
│   ├── lm15u.pem
│   ├── lm18a.pem
│   ├── lm21a.pem
│   ├── lm21an.pem
│   ├── lm21ann.pem
│   ├── lm21u.pem
│   ├── lm21ut.pem
│   ├── m14.pem
│   ├── m16.pem
│   ├── m16p.pem
│   ├── m16p3.pem
│   ├── m16pp.pem
│   ├── m23.pem
│   ├── m2_sspm.pem
│   ├── m3.pem
│   ├── mtk5369.pem
│   ├── mtk5398.pem
│   ├── netflix_pub.pem
│   ├── o18.pem
│   ├── o18_2019.pem
│   ├── o18k.pem
│   ├── o20.pem
│   ├── o208k.pem
│   ├── o20n.pem
│   ├── o22.pem
│   ├── o22n.pem
│   ├── o22n2.pem
│   ├── o22n28k.pem
│   ├── o22n3.pem
│   ├── o24.pem
│   └── o24n.pem
├── partinfo.py
├── sonar-project.properties
└── src/
    ├── CMakeLists.txt
    ├── cramfs/
    │   ├── CMakeLists.txt
    │   ├── cramfsswap.c
    │   └── uncramfs.c
    ├── crc32.c
    ├── epk.c
    ├── epk1.c
    ├── epk2.c
    ├── epk3.c
    ├── jffs2/
    │   ├── CMakeLists.txt
    │   ├── crc32.cpp
    │   ├── jffs2extract.cpp
    │   └── mini_inflate.cpp
    ├── lz4/
    │   ├── CMakeLists.txt
    │   ├── bench.c
    │   ├── lz4.c
    │   ├── lz4_format_description.txt
    │   ├── lz4demo.c
    │   └── lz4hc.c
    ├── lzhs/
    │   ├── CMakeLists.txt
    │   ├── lzhs.c
    │   └── lzhs_lib.c
    ├── lzma/
    │   ├── CMakeLists.txt
    │   ├── LzFind.c
    │   ├── LzmaDec.c
    │   └── LzmaEnc.c
    ├── lzo-lg.c
    ├── main.c
    ├── mediatek.c
    ├── mediatek_pkg.c
    ├── mfile.c
    ├── minigzip.c
    ├── partinfo.c
    ├── philips.c
    ├── realtek.c
    ├── squashfs/
    │   ├── CMakeLists.txt
    │   ├── action.c
    │   ├── caches-queues-lists.c
    │   ├── compressor.c
    │   ├── gzip_wrapper.c
    │   ├── info.c
    │   ├── lz4_wrapper.c
    │   ├── lzma_wrapper.c
    │   ├── lzma_xz_wrapper.c
    │   ├── lzo_wrapper.c
    │   ├── mksquashfs.c
    │   ├── process_fragments.c
    │   ├── progressbar.c
    │   ├── pseudo.c
    │   ├── read_file.c
    │   ├── read_fs.c
    │   ├── read_xattrs.c
    │   ├── restore.c
    │   ├── sort.c
    │   ├── swap.c
    │   ├── unsquash-1.c
    │   ├── unsquash-2.c
    │   ├── unsquash-3.c
    │   ├── unsquash-4.c
    │   ├── unsquashfs.c
    │   ├── unsquashfs_info.c
    │   ├── unsquashfs_xattr.c
    │   ├── xattr.c
    │   └── xz_wrapper.c
    ├── stream/
    │   ├── CMakeLists.txt
    │   ├── crc32.c
    │   └── tsfile.c
    ├── symfile.c
    ├── thpool.c
    ├── tools/
    │   ├── CMakeLists.txt
    │   ├── idb_extract.c
    │   ├── jffs2extract.c
    │   ├── lzhs_scanner.c
    │   ├── lzhsenc.c
    │   └── tsfile.c
    ├── util.c
    └── util_crypto.c
Download .txt
SYMBOL INDEX (1774 symbols across 116 files)

FILE: include/config.h
  type config_opts_t (line 10) | typedef struct {

FILE: include/cramfs/cramfs.h
  type u8 (line 9) | typedef unsigned char u8;
  type u16 (line 10) | typedef unsigned short u16;
  type u32 (line 11) | typedef unsigned int u32;
  type cramfs_inode (line 16) | struct cramfs_inode {
  type cramfs_super (line 34) | struct cramfs_super {

FILE: include/cramfs/cramfs_fs.h
  type u8 (line 10) | typedef unsigned char u8;
  type u16 (line 11) | typedef unsigned short u16;
  type u32 (line 12) | typedef unsigned int u32;
  type cramfs_inode (line 34) | struct cramfs_inode {
  type cramfs_info (line 49) | struct cramfs_info {
  type cramfs_super (line 59) | struct cramfs_super {

FILE: include/epk.h
  type BUILD_TYPE_T (line 17) | typedef enum {
  type FILE_TYPE_T (line 24) | typedef enum {
  type SIG_TYPE_T (line 33) | typedef enum {

FILE: include/epk1.h
  type pakRec_t (line 18) | struct pakRec_t {
  type epk1BEHeader_t (line 23) | struct epk1BEHeader_t {
  type epk1BEVersion_t (line 31) | struct epk1BEVersion_t {
  type epk1Header_t (line 38) | struct epk1Header_t {
  type epk1NewHeader_t (line 47) | struct epk1NewHeader_t {
  type pakHeader_t (line 56) | struct pakHeader_t {

FILE: include/epk2.h
  type PAK_V2_HEADER_T (line 20) | typedef struct {
  type PAK_V2_LOCATION_T (line 35) | typedef struct {
  type EPK_V2_HEADER_T (line 49) | typedef struct {
  type epk2_structure (line 59) | struct epk2_structure {
  type pak2_structure (line 68) | struct pak2_structure {

FILE: include/epk3.h
  type EPK_V3_HEADER_T (line 18) | typedef struct __attribute__((packed)) {
  type EPK_V3_NEW_HEADER_T (line 26) | typedef struct __attribute__((packed)) {
  type PACKAGE_SEGMENT_INFO_T (line 47) | typedef struct __attribute__((packed)) {
  type PACKAGE_INFO_DATA_T (line 55) | typedef struct __attribute__((packed)) {
  type PAK_V3_HEADER_T (line 61) | typedef struct __attribute__((packed)) {
  type PAK_V3_LISTHEADER_T (line 75) | typedef struct __attribute__((packed)) {
  type PAK_V3_NEW_LISTHEADER_T (line 82) | typedef struct __attribute__((packed)) {
  type epk3_head_structure (line 94) | struct __attribute__((packed)) epk3_head_structure {
  type epk3_new_head_structure (line 103) | struct __attribute__((packed)) epk3_new_head_structure {
  type epk3_structure (line 110) | struct  __attribute__((packed)) epk3_structure {
  type epk3_new_structure (line 116) | struct __attribute__((packed)) epk3_new_structure {
  type epk3_structure (line 123) | struct epk3_structure
  type epk3_new_structure (line 124) | struct epk3_new_structure
  type pak3_structure (line 127) | struct __attribute__((packed)) pak3_structure {

FILE: include/jffs2/jffs2.h
  type __signed__ (line 17) | typedef __signed__ char __s8;
  type __u8 (line 18) | typedef unsigned char __u8;
  type __s16 (line 20) | typedef __signed__ short __s16;
  type __u16 (line 21) | typedef unsigned short __u16;
  type __signed__ (line 23) | typedef __signed__ int __s32;
  type __u32 (line 24) | typedef unsigned int __u32;
  type __s64 (line 27) | __extension__ typedef __signed__ long long __s64;
  type __u64 (line 28) | __extension__ typedef unsigned long long __u64;
  type __s64 (line 30) | typedef __signed__ long long __s64;
  type __u64 (line 31) | typedef unsigned long long __u64;
  type jffs2_unknown_node (line 107) | struct jffs2_unknown_node
  type jffs2_raw_dirent (line 116) | struct jffs2_raw_dirent
  type jffs2_raw_inode (line 140) | struct jffs2_raw_inode
  type jffs2_raw_xattr (line 166) | struct jffs2_raw_xattr {
  type jffs2_raw_xref (line 181) | struct jffs2_raw_xref
  type jffs2_raw_summary (line 193) | struct jffs2_raw_summary
  type jffs2_raw_inode (line 209) | struct jffs2_raw_inode
  type jffs2_raw_dirent (line 210) | struct jffs2_raw_dirent
  type jffs2_raw_xattr (line 211) | struct jffs2_raw_xattr
  type jffs2_raw_xref (line 212) | struct jffs2_raw_xref
  type jffs2_raw_summary (line 213) | struct jffs2_raw_summary
  type jffs2_unknown_node (line 214) | struct jffs2_unknown_node
  type jffs2_main_args (line 229) | struct jffs2_main_args {
  type jffs2_main_args (line 235) | struct jffs2_main_args

FILE: include/jffs2/mini_inflate.h
  type __SIZE_TYPE__ (line 26) | typedef __SIZE_TYPE__ size;
  type huffman_set (line 36) | struct huffman_set {
  type bitstream (line 47) | struct bitstream {

FILE: include/lzhs/lzhs.h
  type lzhs_header (line 14) | struct lzhs_header {
  type lzhs_ctx (line 25) | struct lzhs_ctx {
  type t_code (line 39) | typedef struct __attribute__ ((__packed__)) {
  type lzhs_ctx (line 44) | struct lzhs_ctx
  type lzhs_ctx (line 46) | struct lzhs_ctx
  type lzhs_ctx (line 47) | struct lzhs_ctx
  type lzhs_header (line 50) | struct lzhs_header
  type lzhs_ctx (line 53) | struct lzhs_ctx
  type lzhs_ctx (line 54) | struct lzhs_ctx

FILE: include/lzma.h
  function p_lzma_free (line 43) | static void p_lzma_free(void *p, void *address)

FILE: include/lzma/LzFind.h
  type UInt32 (line 13) | typedef UInt32 CLzRef;
  type CMatchFinder (line 15) | typedef struct _CMatchFinder
  type Byte (line 87) | typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index);
  type UInt32 (line 88) | typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
  type Byte (line 89) | typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
  type UInt32 (line 90) | typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
  type IMatchFinder (line 93) | typedef struct _IMatchFinder

FILE: include/lzma/LzmaDec.h
  type CLzmaProps (line 28) | typedef struct _CLzmaProps
  type CLzmaDec (line 50) | typedef struct
  type ELzmaFinishMode (line 79) | typedef enum
  type ELzmaStatus (line 100) | typedef enum

FILE: include/lzma/LzmaEnc.h
  type CLzmaEncProps (line 15) | typedef struct _CLzmaEncProps

FILE: include/lzma/Types.h
  type SRes (line 43) | typedef int SRes;
  type DWORD (line 46) | typedef DWORD WRes;
  type WRes (line 48) | typedef int WRes;
  type Byte (line 55) | typedef unsigned char Byte;
  type Int16 (line 56) | typedef short Int16;
  type UInt16 (line 57) | typedef unsigned short UInt16;
  type Int32 (line 60) | typedef long Int32;
  type UInt32 (line 61) | typedef unsigned long UInt32;
  type Int32 (line 63) | typedef int Int32;
  type UInt32 (line 64) | typedef unsigned int UInt32;
  type Int64 (line 72) | typedef long Int64;
  type UInt64 (line 73) | typedef unsigned long UInt64;
  type __int64 (line 78) | typedef __int64 Int64;
  type UInt64 (line 79) | typedef unsigned __int64 UInt64;
  type Int64 (line 81) | typedef long long int Int64;
  type UInt64 (line 82) | typedef unsigned long long int UInt64;
  type UInt32 (line 88) | typedef UInt32 SizeT;
  type SizeT (line 90) | typedef size_t SizeT;
  type Bool (line 93) | typedef int Bool;
  type ISeqInStream (line 125) | typedef struct
  type ISeqOutStream (line 137) | typedef struct
  type ESzSeek (line 144) | typedef enum
  type ISeekInStream (line 151) | typedef struct
  type ILookInStream (line 157) | typedef struct
  type CLookToRead (line 180) | typedef struct
  type CSecToLook (line 192) | typedef struct
  type CSecToRead (line 200) | typedef struct
  type ICompressProgress (line 208) | typedef struct
  type ISzAlloc (line 215) | typedef struct

FILE: include/lzo/miniacc.h
  type __acc_int16e_hi_t (line 2497) | typedef int __acc_int16e_hi_t __attribute__ ((__mode__(__HI__)));
  type __acc_uint16e_hi_t (line 2498) | typedef unsigned int __acc_uint16e_hi_t __attribute__ ((__mode__(__HI__)));
  type __acc_int32e_si_t (line 2524) | typedef int __acc_int32e_si_t __attribute__ ((__mode__(__SI__)));
  type __acc_uint32e_si_t (line 2525) | typedef unsigned int __acc_uint32e_si_t __attribute__ ((__mode__(__SI__)));
  type __acc_int32e_si_t (line 2529) | typedef int __acc_int32e_si_t __attribute__ ((__mode__(__SI__)));
  type __acc_uint32e_si_t (line 2530) | typedef unsigned int __acc_uint32e_si_t __attribute__ ((__mode__(__SI__)));
  type __w64 (line 2628) | typedef __w64 int acc_intptr_t;
  type acc_uintptr_t (line 2629) | typedef __w64 unsigned int acc_uintptr_t;
  type acc_word_t (line 2681) | typedef unsigned acc_word_t __attribute__ ((__mode__(__V16QI__)));
  type acc_sword_t (line 2682) | typedef int acc_sword_t __attribute__ ((__mode__(__V16QI__)));
  type __acc_ua16_t (line 2798) | typedef struct {
  type __acc_ua32_t (line 2804) | typedef struct {
  type __acc_ua64_t (line 2810) | typedef struct {
  function __ACC_UA_GET_LE16 (line 2830) | extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volati...
  function __acc_forceinline (line 2841) | extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void *...
  function __ACC_UA_GET_LE32 (line 2868) | extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volati...
  function __acc_forceinline (line 2879) | extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void *...
  type __acc_int16e_hi_t (line 2935) | typedef int __acc_int16e_hi_t __attribute__ ((__mode__(__HI__)));
  type __acc_uint16e_hi_t (line 2936) | typedef unsigned int __acc_uint16e_hi_t __attribute__ ((__mode__(__HI__)));
  type __acc_int32e_si_t (line 2962) | typedef int __acc_int32e_si_t __attribute__ ((__mode__(__SI__)));
  type __acc_uint32e_si_t (line 2963) | typedef unsigned int __acc_uint32e_si_t __attribute__ ((__mode__(__SI__)));
  type __acc_int32e_si_t (line 2967) | typedef int __acc_int32e_si_t __attribute__ ((__mode__(__SI__)));
  type __acc_uint32e_si_t (line 2968) | typedef unsigned int __acc_uint32e_si_t __attribute__ ((__mode__(__SI__)));
  type __w64 (line 3066) | typedef __w64 int acc_intptr_t;
  type acc_uintptr_t (line 3067) | typedef __w64 unsigned int acc_uintptr_t;
  type acc_word_t (line 3119) | typedef unsigned acc_word_t __attribute__ ((__mode__(__V16QI__)));
  type acc_sword_t (line 3120) | typedef int acc_sword_t __attribute__ ((__mode__(__V16QI__)));
  type __acc_ua16_t (line 3235) | typedef struct {
  type __acc_ua32_t (line 3241) | typedef struct {
  type __acc_ua64_t (line 3247) | typedef struct {
  function __ACC_UA_GET_LE16 (line 3267) | extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volati...
  function __acc_forceinline (line 3278) | extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void *...
  function __ACC_UA_GET_LE32 (line 3305) | extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volati...
  function __acc_forceinline (line 3316) | extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void *...
  type __PTRDIFF_TYPE__ (line 3353) | typedef __PTRDIFF_TYPE__ acc_fallback_ptrdiff_t;
  type acc_fallback_ptrdiff_t (line 3355) | typedef int acc_fallback_ptrdiff_t;
  type acc_fallback_ptrdiff_t (line 3357) | typedef long acc_fallback_ptrdiff_t;
  type __SIZE_TYPE__ (line 3360) | typedef __SIZE_TYPE__ acc_fallback_size_t;
  type acc_fallback_size_t (line 3362) | typedef unsigned int acc_fallback_size_t;
  type acc_fallback_size_t (line 3364) | typedef unsigned long acc_fallback_size_t;
  type acc_fallback_ptrdiff_t (line 3367) | typedef acc_fallback_ptrdiff_t ptrdiff_t;
  type acc_fallback_size_t (line 3373) | typedef acc_fallback_size_t size_t;
  type wchar_t (line 3379) | typedef unsigned short wchar_t;
  type acclib_handle_t (line 3638) | typedef __w64 long acclib_handle_t;
  type acclib_uhandle_t (line 3639) | typedef __w64 unsigned long acclib_uhandle_t;
  type acc_dir_t (line 3809) | typedef struct {
  type acc_perfctr_handle_t (line 3901) | typedef struct {
  type acc_perfctr_clock_t (line 3908) | typedef struct {
  type acc_pclock_handle_t (line 3937) | struct acc_pclock_handle_t
  type acc_pclock_t (line 3938) | struct acc_pclock_t
  type acc_pclock_handle_t (line 3939) | typedef struct acc_pclock_handle_t acc_pclock_handle_t;
  type acc_pclock_t (line 3940) | typedef struct acc_pclock_t acc_pclock_t;
  type acc_pclock_handle_t (line 3953) | struct acc_pclock_handle_t {
  type acc_pclock_t (line 3965) | struct acc_pclock_t {
  type acc_uclock_handle_t (line 3989) | typedef struct {
  type acc_uclock_t (line 4000) | typedef struct {
  type acc_getopt_t (line 4035) | struct acc_getopt_t
  type acc_getopt_t (line 4036) | typedef struct acc_getopt_t acc_getopt_t;
  type acc_getopt_longopt_t (line 4040) | struct acc_getopt_longopt_t
  type acc_getopt_longopt_t (line 4041) | typedef struct acc_getopt_longopt_t acc_getopt_longopt_t;
  type acc_getopt_longopt_t (line 4045) | struct acc_getopt_longopt_t {
  type acc_getopt_t (line 4051) | struct acc_getopt_t {
  type acc_rand31_t (line 4069) | typedef struct {
  type acc_rand48_t (line 4078) | typedef struct {
  type acc_rand64_t (line 4089) | typedef struct {
  type acc_randmt_t (line 4099) | typedef struct {
  type acc_randmt64_t (line 4110) | typedef struct {
  type SREGS (line 5265) | struct SREGS
  function acc_pclock_read_gettimeofday (line 5605) | static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h, acc_pcloc...
  function acc_pclock_read_clock (line 5624) | static int acc_pclock_read_clock(acc_pclock_handle_p h, acc_pclock_p c) {
  function acc_pclock_read_uclock (line 5649) | static int acc_pclock_read_uclock(acc_pclock_handle_p h, acc_pclock_p c) {
  function acc_pclock_read_clock_gettime_p (line 5666) | static int acc_pclock_read_clock_gettime_p(acc_pclock_handle_p h, acc_pc...
  function acc_pclock_read_getprocesstimes (line 5680) | static int acc_pclock_read_getprocesstimes(acc_pclock_handle_p h, acc_pc...
  function acc_pclock_read_getrusage (line 5701) | static int acc_pclock_read_getrusage(acc_pclock_handle_p h, acc_pclock_p...
  function acc_pclock_read_perfctr (line 5720) | static int acc_pclock_read_perfctr(acc_pclock_handle_p h, acc_pclock_p c) {
  function acc_pclock_read_clock_gettime_t (line 5742) | static int acc_pclock_read_clock_gettime_t(acc_pclock_handle_p h, acc_pc...
  function acc_pclock_read_getthreadtimes (line 5756) | static int acc_pclock_read_getthreadtimes(acc_pclock_handle_p h, acc_pcl...
  type rusage (line 6091) | struct rusage
  type timeval (line 6097) | struct timeval
  function __acc_cdecl (line 6568) | __acc_cdecl _setargv(void) {
  function __acc_cdecl (line 6577) | __acc_cdecl _setargv(void) {

FILE: include/mediatek_pkg.h
  type mtkupg_header (line 34) | struct __attribute__((packed)) mtkupg_header {
  type mtkpkg_plat (line 46) | struct mtkpkg_plat {
  type mtkpkg_pad (line 52) | struct mtkpkg_pad {
  type mtkpkg_crypted_header (line 57) | struct __attribute__((packed)) mtkpkg_crypted_header {
  type mtkpkg_data (line 63) | struct __attribute__((packed)) mtkpkg_data {
  type mtkpkg_header (line 71) | struct __attribute__((packed)) mtkpkg_header {
  type mtkpkg (line 77) | struct __attribute__((packed)) mtkpkg {

FILE: include/mfile.h
  type cursor_t (line 48) | typedef struct {
  type MFILE (line 54) | typedef struct {

FILE: include/osx/elf.h
  type Elf32_Half (line 38) | typedef uint16_t Elf32_Half;
  type Elf64_Half (line 39) | typedef uint16_t Elf64_Half;
  type Elf32_Word (line 42) | typedef uint32_t Elf32_Word;
  type Elf32_Sword (line 43) | typedef	int32_t  Elf32_Sword;
  type Elf64_Word (line 44) | typedef uint32_t Elf64_Word;
  type Elf64_Sword (line 45) | typedef	int32_t  Elf64_Sword;
  type Elf32_Xword (line 48) | typedef uint64_t Elf32_Xword;
  type Elf32_Sxword (line 49) | typedef	int64_t  Elf32_Sxword;
  type Elf64_Xword (line 50) | typedef uint64_t Elf64_Xword;
  type Elf64_Sxword (line 51) | typedef	int64_t  Elf64_Sxword;
  type Elf32_Addr (line 54) | typedef uint32_t Elf32_Addr;
  type Elf64_Addr (line 55) | typedef uint64_t Elf64_Addr;
  type Elf32_Off (line 58) | typedef uint32_t Elf32_Off;
  type Elf64_Off (line 59) | typedef uint64_t Elf64_Off;
  type Elf32_Section (line 62) | typedef uint16_t Elf32_Section;
  type Elf64_Section (line 63) | typedef uint16_t Elf64_Section;
  type Elf32_Half (line 66) | typedef Elf32_Half Elf32_Versym;
  type Elf64_Half (line 67) | typedef Elf64_Half Elf64_Versym;
  type Elf32_Ehdr (line 74) | typedef struct
  type Elf64_Ehdr (line 92) | typedef struct
  type Elf32_Shdr (line 275) | typedef struct
  type Elf64_Shdr (line 289) | typedef struct
  type Elf32_Sym (line 384) | typedef struct
  type Elf64_Sym (line 394) | typedef struct
  type Elf32_Syminfo (line 407) | typedef struct
  type Elf64_Syminfo (line 413) | typedef struct
  type Elf32_Rel (line 499) | typedef struct
  type Elf64_Rel (line 510) | typedef struct
  type Elf32_Rela (line 518) | typedef struct
  type Elf64_Rela (line 525) | typedef struct
  type Elf32_Phdr (line 544) | typedef struct
  type Elf64_Phdr (line 556) | typedef struct
  type Elf32_Dyn (line 638) | typedef struct
  type Elf64_Dyn (line 648) | typedef struct
  type Elf32_Verdef (line 805) | typedef struct
  type Elf64_Verdef (line 817) | typedef struct
  type Elf32_Verdaux (line 847) | typedef struct
  type Elf64_Verdaux (line 854) | typedef struct
  type Elf32_Verneed (line 864) | typedef struct
  type Elf64_Verneed (line 875) | typedef struct
  type Elf32_Vernaux (line 894) | typedef struct
  type Elf64_Vernaux (line 904) | typedef struct
  type Elf32_auxv_t (line 928) | typedef struct
  type Elf64_auxv_t (line 940) | typedef struct
  type Elf32_Nhdr (line 1012) | typedef struct
  type Elf64_Nhdr (line 1019) | typedef struct
  type Elf32_Move (line 1076) | typedef struct
  type Elf64_Move (line 1085) | typedef struct
  type Elf32_gptab (line 1458) | typedef union
  type Elf32_RegInfo (line 1474) | typedef struct
  type Elf_Options (line 1483) | typedef struct
  type Elf_Options_Hw (line 1534) | typedef struct
  type Elf32_Lib (line 1695) | typedef struct
  type Elf64_Lib (line 1704) | typedef struct
  type Elf32_Addr (line 1726) | typedef Elf32_Addr Elf32_Conflict;

FILE: include/philips.h
  type philips_fusion1_part (line 15) | struct philips_fusion1_part {
  type philips_fusion1_upg (line 25) | struct philips_fusion1_upg {

FILE: include/realtek/rtsplit.h
  type kernel_image_header (line 9) | typedef struct _kernel_image_header {

FILE: include/sniptype.h
  type Boolean_T (line 11) | typedef enum { Error_ = -1, Success_, False_ = 0, True_ } Boolean_T;
  type BYTE (line 14) | typedef unsigned char BYTE;
  type DWORD (line 15) | typedef unsigned long DWORD;
  type WORD (line 16) | typedef unsigned short WORD;
  type BYTE (line 38) | typedef unsigned char BYTE;
  type DWORD (line 39) | typedef unsigned long DWORD;
  type WORD (line 41) | typedef unsigned short WORD;
  type VAR8_ (line 52) | typedef union {
  type VAR16_ (line 57) | typedef union {
  type VAR32_ (line 63) | typedef union {
  type VAR64_ (line 71) | typedef union {

FILE: include/squashfs/action.h
  type token_entry (line 57) | struct token_entry {
  type expr (line 89) | struct expr
  type expr_op (line 91) | struct expr_op {
  type atom (line 97) | struct atom {
  type unary_op (line 103) | struct unary_op {
  type expr (line 108) | struct expr {
  type test_number_arg (line 124) | struct test_number_arg {
  type test_range_args (line 129) | struct test_range_args {
  type action (line 134) | struct action
  type action_data (line 135) | struct action_data
  type test_entry (line 137) | struct test_entry {
  type type_entry (line 147) | struct type_entry {
  type action_entry (line 179) | struct action_entry {
  type action_data (line 188) | struct action_data {
  type action (line 196) | struct action {
  type uid_info (line 208) | struct uid_info {
  type gid_info (line 212) | struct gid_info {
  type guid_info (line 216) | struct guid_info {
  type mode_data (line 229) | struct mode_data {
  type empty_data (line 244) | struct empty_data {
  type move_ent (line 254) | struct move_ent {
  type dir_ent (line 267) | struct dir_ent
  type stat (line 269) | struct stat
  type dir_ent (line 270) | struct dir_ent
  type dir_ent (line 271) | struct dir_ent
  type dir_info (line 272) | struct dir_info
  type dir_ent (line 272) | struct dir_ent

FILE: include/squashfs/caches-queues-lists.h
  type file_buffer (line 85) | struct file_buffer {
  type queue (line 126) | struct queue {
  type seq_queue (line 140) | struct seq_queue {
  type cache (line 150) | struct cache {
  type queue (line 167) | struct queue
  type queue (line 168) | struct queue
  type queue (line 169) | struct queue
  type queue (line 170) | struct queue
  type queue (line 171) | struct queue
  type queue (line 172) | struct queue
  type seq_queue (line 173) | struct seq_queue
  type seq_queue (line 174) | struct seq_queue
  type file_buffer (line 174) | struct file_buffer
  type seq_queue (line 175) | struct seq_queue
  type file_buffer (line 176) | struct file_buffer
  type seq_queue (line 176) | struct seq_queue
  type seq_queue (line 177) | struct seq_queue
  type cache (line 178) | struct cache
  type file_buffer (line 179) | struct file_buffer
  type cache (line 179) | struct cache
  type file_buffer (line 180) | struct file_buffer
  type cache (line 180) | struct cache
  type file_buffer (line 181) | struct file_buffer
  type cache (line 181) | struct cache
  type file_buffer (line 182) | struct file_buffer
  type file_buffer (line 183) | struct file_buffer
  type cache (line 184) | struct cache
  type file_buffer (line 185) | struct file_buffer
  type cache (line 185) | struct cache
  type file_buffer (line 186) | struct file_buffer
  type cache (line 186) | struct cache
  type file_buffer (line 187) | struct file_buffer
  type file_buffer (line 188) | struct file_buffer

FILE: include/squashfs/compressor.h
  type compressor (line 25) | struct compressor {
  type compressor (line 41) | struct compressor
  type compressor (line 42) | struct compressor
  function compressor_init (line 46) | static inline int compressor_init(struct compressor *comp, void **stream...
  function compressor_compress (line 52) | static inline int compressor_compress(struct compressor *comp, void *str...
  function compressor_uncompress (line 56) | static inline int compressor_uncompress(struct compressor *comp, void *d...
  function compressor_options (line 64) | static inline int compressor_options(struct compressor *comp, char *argv...
  function compressor_options_post (line 71) | static inline int compressor_options_post(struct compressor *comp, int b...
  type compressor (line 77) | struct compressor
  function compressor_extract_options (line 83) | static inline int compressor_extract_options(struct compressor *comp, in...
  function compressor_check_options (line 89) | static inline int compressor_check_options(struct compressor *comp, int ...
  function compressor_display_options (line 95) | static inline void compressor_display_options(struct compressor *comp, v...

FILE: include/squashfs/gzip_wrapper.h
  type gzip_comp_opts (line 52) | struct gzip_comp_opts {
  type strategy (line 58) | struct strategy {
  type gzip_strategy (line 64) | struct gzip_strategy {
  type gzip_stream (line 70) | struct gzip_stream {

FILE: include/squashfs/info.h
  type dir_ent (line 28) | struct dir_ent

FILE: include/squashfs/lz4_wrapper.h
  type lz4_comp_opts (line 57) | struct lz4_comp_opts {

FILE: include/squashfs/lzo_wrapper.h
  type lzo_comp_opts (line 56) | struct lzo_comp_opts {
  type lzo_algorithm (line 61) | struct lzo_algorithm {
  type lzo_stream (line 67) | struct lzo_stream {

FILE: include/squashfs/mksquashfs.h
  type dir_info (line 28) | struct dir_info {
  type dir_ent (line 41) | struct dir_ent {
  type inode_info (line 51) | struct inode_info {
  type file_info (line 69) | struct file_info {
  type fragment (line 83) | struct fragment {
  type id (line 95) | struct id {
  type append_file (line 103) | struct append_file {
  type cache (line 134) | struct cache
  type cache (line 135) | struct cache
  type queue (line 136) | struct queue
  type append_file (line 137) | struct append_file
  type seq_queue (line 138) | struct seq_queue
  type squashfs_fragment_entry (line 140) | struct squashfs_fragment_entry
  type compressor (line 141) | struct compressor
  type file_info (line 143) | struct file_info
  type id (line 146) | struct id

FILE: include/squashfs/pseudo.h
  type pseudo_dev (line 26) | struct pseudo_dev {
  type pseudo_entry (line 37) | struct pseudo_entry {
  type pseudo (line 44) | struct pseudo {
  type pseudo (line 52) | struct pseudo
  type pseudo (line 52) | struct pseudo
  type pseudo_entry (line 53) | struct pseudo_entry
  type pseudo (line 53) | struct pseudo
  type pseudo_dev (line 54) | struct pseudo_dev
  type pseudo_dev (line 55) | struct pseudo_dev
  type pseudo (line 56) | struct pseudo

FILE: include/squashfs/read_fs.h
  type compressor (line 26) | struct compressor
  type squashfs_super_block (line 26) | struct squashfs_super_block
  type squashfs_super_block (line 27) | struct squashfs_super_block
  type squashfs_fragment_entry (line 27) | struct squashfs_fragment_entry

FILE: include/squashfs/sort.h
  type priority_entry (line 27) | struct priority_entry {
  type dir_info (line 33) | struct dir_info
  type dir_info (line 34) | struct dir_info
  type stat (line 34) | struct stat
  type priority_entry (line 35) | struct priority_entry

FILE: include/squashfs/squashfs_compat.h
  type squashfs_super_block_3 (line 38) | struct squashfs_super_block_3 {
  type squashfs_dir_index_3 (line 67) | struct squashfs_dir_index_3 {
  type squashfs_base_inode_header_3 (line 74) | struct squashfs_base_inode_header_3 {
  type squashfs_ipc_inode_header_3 (line 83) | struct squashfs_ipc_inode_header_3 {
  type squashfs_dev_inode_header_3 (line 93) | struct squashfs_dev_inode_header_3 {
  type squashfs_symlink_inode_header_3 (line 104) | struct squashfs_symlink_inode_header_3 {
  type squashfs_reg_inode_header_3 (line 116) | struct squashfs_reg_inode_header_3 {
  type squashfs_lreg_inode_header_3 (line 130) | struct squashfs_lreg_inode_header_3 {
  type squashfs_dir_inode_header_3 (line 145) | struct squashfs_dir_inode_header_3 {
  type squashfs_ldir_inode_header_3 (line 159) | struct squashfs_ldir_inode_header_3 {
  type squashfs_base_inode_header_3 (line 176) | struct squashfs_base_inode_header_3
  type squashfs_dev_inode_header_3 (line 177) | struct squashfs_dev_inode_header_3
  type squashfs_symlink_inode_header_3 (line 178) | struct squashfs_symlink_inode_header_3
  type squashfs_reg_inode_header_3 (line 179) | struct squashfs_reg_inode_header_3
  type squashfs_lreg_inode_header_3 (line 180) | struct squashfs_lreg_inode_header_3
  type squashfs_dir_inode_header_3 (line 181) | struct squashfs_dir_inode_header_3
  type squashfs_ldir_inode_header_3 (line 182) | struct squashfs_ldir_inode_header_3
  type squashfs_ipc_inode_header_3 (line 183) | struct squashfs_ipc_inode_header_3
  type squashfs_dir_entry_3 (line 186) | struct squashfs_dir_entry_3 {
  type squashfs_dir_header_3 (line 194) | struct squashfs_dir_header_3 {
  type squashfs_fragment_entry_3 (line 200) | struct squashfs_fragment_entry_3 {
  type squashfs_super_block_3 (line 206) | typedef struct squashfs_super_block_3 squashfs_super_block_3;
  type squashfs_dir_index_3 (line 207) | typedef struct squashfs_dir_index_3 squashfs_dir_index_3;
  type squashfs_base_inode_header_3 (line 208) | typedef struct squashfs_base_inode_header_3 squashfs_base_inode_header_3;
  type squashfs_ipc_inode_header_3 (line 209) | typedef struct squashfs_ipc_inode_header_3 squashfs_ipc_inode_header_3;
  type squashfs_dev_inode_header_3 (line 210) | typedef struct squashfs_dev_inode_header_3 squashfs_dev_inode_header_3;
  type squashfs_symlink_inode_header_3 (line 211) | typedef struct squashfs_symlink_inode_header_3 squashfs_symlink_inode_he...
  type squashfs_reg_inode_header_3 (line 212) | typedef struct squashfs_reg_inode_header_3 squashfs_reg_inode_header_3;
  type squashfs_lreg_inode_header_3 (line 213) | typedef struct squashfs_lreg_inode_header_3 squashfs_lreg_inode_header_3;
  type squashfs_dir_inode_header_3 (line 214) | typedef struct squashfs_dir_inode_header_3 squashfs_dir_inode_header_3;
  type squashfs_ldir_inode_header_3 (line 215) | typedef struct squashfs_ldir_inode_header_3 squashfs_ldir_inode_header_3;
  type squashfs_dir_entry_3 (line 216) | typedef struct squashfs_dir_entry_3 squashfs_dir_entry_3;
  type squashfs_dir_header_3 (line 217) | typedef struct squashfs_dir_header_3 squashfs_dir_header_3;
  type squashfs_fragment_entry_3 (line 218) | typedef struct squashfs_fragment_entry_3 squashfs_fragment_entry_3;
  type squashfs_base_inode_header_1 (line 445) | struct squashfs_base_inode_header_1 {
  type squashfs_ipc_inode_header_1 (line 452) | struct squashfs_ipc_inode_header_1 {
  type squashfs_dev_inode_header_1 (line 461) | struct squashfs_dev_inode_header_1 {
  type squashfs_symlink_inode_header_1 (line 469) | struct squashfs_symlink_inode_header_1 {
  type squashfs_reg_inode_header_1 (line 478) | struct squashfs_reg_inode_header_1 {
  type squashfs_dir_inode_header_1 (line 489) | struct squashfs_dir_inode_header_1 {
  type squashfs_base_inode_header_1 (line 501) | struct squashfs_base_inode_header_1
  type squashfs_dev_inode_header_1 (line 502) | struct squashfs_dev_inode_header_1
  type squashfs_symlink_inode_header_1 (line 503) | struct squashfs_symlink_inode_header_1
  type squashfs_reg_inode_header_1 (line 504) | struct squashfs_reg_inode_header_1
  type squashfs_dir_inode_header_1 (line 505) | struct squashfs_dir_inode_header_1
  type squashfs_ipc_inode_header_1 (line 506) | struct squashfs_ipc_inode_header_1
  type squashfs_dir_index_1 (line 509) | typedef struct squashfs_dir_index_1 squashfs_dir_index_1;
  type squashfs_base_inode_header_1 (line 510) | typedef struct squashfs_base_inode_header_1 squashfs_base_inode_header_1;
  type squashfs_ipc_inode_header_1 (line 511) | typedef struct squashfs_ipc_inode_header_1 squashfs_ipc_inode_header_1;
  type squashfs_dev_inode_header_1 (line 512) | typedef struct squashfs_dev_inode_header_1 squashfs_dev_inode_header_1;
  type squashfs_symlink_inode_header_1 (line 513) | typedef struct squashfs_symlink_inode_header_1 squashfs_symlink_inode_he...
  type squashfs_reg_inode_header_1 (line 514) | typedef struct squashfs_reg_inode_header_1 squashfs_reg_inode_header_1;
  type squashfs_dir_inode_header_1 (line 515) | typedef struct squashfs_dir_inode_header_1 squashfs_dir_inode_header_1;
  type squashfs_dir_index_2 (line 573) | struct squashfs_dir_index_2 {
  type squashfs_base_inode_header_2 (line 580) | struct squashfs_base_inode_header_2 {
  type squashfs_ipc_inode_header_2 (line 587) | struct squashfs_ipc_inode_header_2 {
  type squashfs_dev_inode_header_2 (line 594) | struct squashfs_dev_inode_header_2 {
  type squashfs_symlink_inode_header_2 (line 602) | struct squashfs_symlink_inode_header_2 {
  type squashfs_reg_inode_header_2 (line 611) | struct squashfs_reg_inode_header_2 {
  type squashfs_dir_inode_header_2 (line 624) | struct squashfs_dir_inode_header_2 {
  type squashfs_ldir_inode_header_2 (line 635) | struct squashfs_ldir_inode_header_2 {
  type squashfs_base_inode_header_2 (line 649) | struct squashfs_base_inode_header_2
  type squashfs_dev_inode_header_2 (line 650) | struct squashfs_dev_inode_header_2
  type squashfs_symlink_inode_header_2 (line 651) | struct squashfs_symlink_inode_header_2
  type squashfs_reg_inode_header_2 (line 652) | struct squashfs_reg_inode_header_2
  type squashfs_dir_inode_header_2 (line 653) | struct squashfs_dir_inode_header_2
  type squashfs_ldir_inode_header_2 (line 654) | struct squashfs_ldir_inode_header_2
  type squashfs_ipc_inode_header_2 (line 655) | struct squashfs_ipc_inode_header_2
  type squashfs_dir_header_2 (line 658) | struct squashfs_dir_header_2 {
  type squashfs_dir_entry_2 (line 663) | struct squashfs_dir_entry_2 {
  type squashfs_fragment_entry_2 (line 670) | struct squashfs_fragment_entry_2 {
  type squashfs_dir_index_2 (line 675) | typedef struct squashfs_dir_index_2 squashfs_dir_index_2;
  type squashfs_base_inode_header_2 (line 676) | typedef struct squashfs_base_inode_header_2 squashfs_base_inode_header_2;
  type squashfs_ipc_inode_header_2 (line 677) | typedef struct squashfs_ipc_inode_header_2 squashfs_ipc_inode_header_2;
  type squashfs_dev_inode_header_2 (line 678) | typedef struct squashfs_dev_inode_header_2 squashfs_dev_inode_header_2;
  type squashfs_symlink_inode_header_2 (line 679) | typedef struct squashfs_symlink_inode_header_2 squashfs_symlink_inode_he...
  type squashfs_reg_inode_header_2 (line 680) | typedef struct squashfs_reg_inode_header_2 squashfs_reg_inode_header_2;
  type squashfs_lreg_inode_header_2 (line 681) | typedef struct squashfs_lreg_inode_header_2 squashfs_lreg_inode_header_2;
  type squashfs_dir_inode_header_2 (line 682) | typedef struct squashfs_dir_inode_header_2 squashfs_dir_inode_header_2;
  type squashfs_ldir_inode_header_2 (line 683) | typedef struct squashfs_ldir_inode_header_2 squashfs_ldir_inode_header_2;
  type squashfs_dir_entry_2 (line 684) | typedef struct squashfs_dir_entry_2 squashfs_dir_entry_2;
  type squashfs_dir_header_2 (line 685) | typedef struct squashfs_dir_header_2 squashfs_dir_header_2;
  type squashfs_fragment_entry_2 (line 686) | typedef struct squashfs_fragment_entry_2 squashfs_fragment_entry_2;

FILE: include/squashfs/squashfs_fs.h
  type meta_entry (line 250) | struct meta_entry {
  type meta_index (line 257) | struct meta_index {
  type squashfs_block (line 271) | typedef long long squashfs_block;
  type squashfs_inode (line 272) | typedef long long squashfs_inode;
  type squashfs_super_block (line 280) | struct squashfs_super_block {
  type squashfs_dir_index (line 302) | struct squashfs_dir_index {
  type squashfs_base_inode_header (line 309) | struct squashfs_base_inode_header {
  type squashfs_ipc_inode_header (line 318) | struct squashfs_ipc_inode_header {
  type squashfs_lipc_inode_header (line 328) | struct squashfs_lipc_inode_header {
  type squashfs_dev_inode_header (line 339) | struct squashfs_dev_inode_header {
  type squashfs_ldev_inode_header (line 350) | struct squashfs_ldev_inode_header {
  type squashfs_symlink_inode_header (line 362) | struct squashfs_symlink_inode_header {
  type squashfs_reg_inode_header (line 374) | struct squashfs_reg_inode_header {
  type squashfs_lreg_inode_header (line 388) | struct squashfs_lreg_inode_header {
  type squashfs_dir_inode_header (line 405) | struct squashfs_dir_inode_header {
  type squashfs_ldir_inode_header (line 419) | struct squashfs_ldir_inode_header {
  type squashfs_base_inode_header (line 437) | struct squashfs_base_inode_header
  type squashfs_dev_inode_header (line 438) | struct squashfs_dev_inode_header
  type squashfs_ldev_inode_header (line 439) | struct squashfs_ldev_inode_header
  type squashfs_symlink_inode_header (line 440) | struct squashfs_symlink_inode_header
  type squashfs_reg_inode_header (line 441) | struct squashfs_reg_inode_header
  type squashfs_lreg_inode_header (line 442) | struct squashfs_lreg_inode_header
  type squashfs_dir_inode_header (line 443) | struct squashfs_dir_inode_header
  type squashfs_ldir_inode_header (line 444) | struct squashfs_ldir_inode_header
  type squashfs_ipc_inode_header (line 445) | struct squashfs_ipc_inode_header
  type squashfs_lipc_inode_header (line 446) | struct squashfs_lipc_inode_header
  type squashfs_dir_entry (line 449) | struct squashfs_dir_entry {
  type squashfs_dir_header (line 457) | struct squashfs_dir_header {
  type squashfs_fragment_entry (line 463) | struct squashfs_fragment_entry {
  type squashfs_xattr_entry (line 469) | struct squashfs_xattr_entry {
  type squashfs_xattr_val (line 474) | struct squashfs_xattr_val {
  type squashfs_xattr_id (line 478) | struct squashfs_xattr_id {
  type squashfs_xattr_table (line 484) | struct squashfs_xattr_table {

FILE: include/squashfs/unsquashfs.h
  type super_block (line 74) | struct super_block {
  type hash_table_entry (line 83) | struct hash_table_entry {
  type inode (line 89) | struct inode {
  type squashfs_operations (line 108) | typedef struct squashfs_operations {
  type test (line 117) | struct test {
  type cache (line 126) | struct cache {
  type cache_entry (line 141) | struct cache_entry {
  type queue (line 156) | struct queue {
  type dir_ent (line 173) | struct dir_ent {
  type dir (line 180) | struct dir {
  type file_entry (line 191) | struct file_entry {
  type squashfs_file (line 197) | struct squashfs_file {
  type path_entry (line 210) | struct path_entry {
  type pathname (line 216) | struct pathname {
  type pathnames (line 221) | struct pathnames {
  type super_block (line 228) | struct super_block
  type hash_table_entry (line 232) | struct hash_table_entry
  type queue (line 239) | struct queue
  type cache (line 240) | struct cache
  type hash_table_entry (line 243) | struct hash_table_entry
  type queue (line 248) | struct queue
  type cache (line 249) | struct cache
  type inode (line 256) | struct inode
  type dir (line 257) | struct dir
  type inode (line 257) | struct inode
  type inode (line 264) | struct inode
  type inode (line 269) | struct inode
  type dir (line 270) | struct dir
  type inode (line 270) | struct inode
  type inode (line 275) | struct inode
  type dir (line 276) | struct dir
  type inode (line 276) | struct inode

FILE: include/squashfs/xattr.h
  type xattr_list (line 42) | struct xattr_list {
  type dupl_id (line 54) | struct dupl_id {
  type prefix (line 61) | struct prefix {
  type xattr_list (line 66) | struct xattr_list
  type squashfs_super_block (line 69) | struct squashfs_super_block
  type squashfs_super_block (line 76) | struct squashfs_super_block
  type xattr_list (line 77) | struct xattr_list
  type xattr_list (line 78) | struct xattr_list
  function get_xattrs (line 80) | static inline int get_xattrs(int fd, struct squashfs_super_block *sBlk) {
  function read_xattrs (line 88) | static inline int read_xattrs(void *dir_ent) {
  function write_xattrs (line 92) | static inline long long write_xattrs() {
  function save_xattrs (line 96) | static inline void save_xattrs() {
  function restore_xattrs (line 99) | static inline void restore_xattrs() {
  function write_xattr (line 102) | static inline void write_xattr(char *pathname, unsigned int xattr) {
  function read_xattrs_from_disk (line 105) | static inline int read_xattrs_from_disk(int fd, struct squashfs_super_bl...
  type xattr_list (line 113) | struct xattr_list

FILE: include/squashfs/xz_wrapper.h
  type bcj (line 48) | struct bcj {
  type filter (line 54) | struct filter {
  type xz_stream (line 60) | struct xz_stream {
  type comp_opts (line 67) | struct comp_opts {

FILE: include/stream/tsfile.h
  type tsfile_options (line 9) | struct tsfile_options {
  type tsfile_options (line 15) | struct tsfile_options

FILE: include/symfile.h
  type sym_entry (line 35) | struct sym_entry {
  type sym_table (line 41) | struct sym_table {
  type sym_table (line 54) | struct sym_table

FILE: include/thpool.h
  type thpool_ (line 17) | struct thpool_

FILE: include/u-boot/image.h
  type image_header_t (line 175) | typedef struct image_header {

FILE: include/u-boot/mtdinfo.h
  type m_device_info (line 7) | struct m_device_info {
  type m_partition_info (line 22) | struct m_partition_info {
  type m_partmap_info (line 34) | struct m_partmap_info {
  type m_partmap_info (line 47) | struct m_partmap_info

FILE: include/u-boot/partcommon.h
  type PART_INFO_TYPE (line 27) | typedef enum PART_INFO {
  type part_struct_type (line 34) | typedef enum {

FILE: include/u-boot/partinfov1.h
  type p1_device_info (line 4) | struct p1_device_info {
  type p1_partition_info (line 19) | struct p1_partition_info {
  type p1_partmap_info (line 31) | struct p1_partmap_info {
  type p1_partmap_info (line 43) | struct p1_partmap_info

FILE: include/u-boot/partinfov2.h
  type p2_device_info (line 6) | struct p2_device_info {
  type p2_partition_info (line 21) | struct p2_partition_info {
  type p2_partmap_info (line 33) | struct p2_partmap_info {
  type p2_partmap_info (line 45) | struct p2_partmap_info

FILE: include/util.h
  type uint (line 26) | typedef    unsigned int    uint;

FILE: include/util_crypto.h
  type KeyPair (line 29) | typedef struct {

FILE: partinfo.py
  function allzero (line 3) | def allzero(string):
  function allFF (line 9) | def allFF(string):
  function validate (line 15) | def validate(date_text):
  function fancyprint (line 22) | def fancyprint(str, pad):

FILE: src/cramfs/cramfsswap.c
  function cramswap (line 26) | int cramswap(char *sinfile, char *soutfile) {

FILE: src/cramfs/uncramfs.c
  type cramfs_inode (line 46) | struct cramfs_inode
  type cramfs_inode (line 48) | struct cramfs_inode
  function u32 (line 52) | u32 compressed_size(const u8 * base, const u8 * data, u32 size) {
  function uncompress_data (line 63) | void uncompress_data(const u8 * base, const u8 * data, u32 size, u8 * ds...
  function clearstats (line 93) | void clearstats() {
  function updatestats (line 101) | void updatestats(int size, int csize) {
  function printstats (line 113) | void printstats() {
  function printmode (line 125) | void printmode(const struct cramfs_inode *inode) {
  function printuidgid (line 198) | void printuidgid(const struct cramfs_inode *inode) {
  function printsize (line 206) | void printsize(int size, int csize) {
  function do_file (line 218) | void do_file(const u8 * base, u32 offset, u32 size, const char *path, co...
  function do_directory (line 277) | void do_directory(const u8 * base, u32 offset, u32 size, const char *pat...
  function do_symlink (line 292) | void do_symlink(const u8 * base, u32 offset, u32 size, const char *path,...
  function do_chrdev (line 314) | void do_chrdev(const u8 * base, u32 offset, u32 size, const char *path, ...
  function do_blkdev (line 351) | void do_blkdev(const u8 * base, u32 offset, u32 size, const char *path, ...
  function do_fifo (line 388) | void do_fifo(const u8 * base, u32 offset, u32 size, const char *path, co...
  function do_socket (line 421) | void do_socket(const u8 * base, u32 offset, u32 size, const char *path, ...
  function do_unknown (line 430) | void do_unknown(const u8 * base, u32 offset, u32 size, const char *path,...
  function process_directory (line 434) | void process_directory(const u8 * base, const char *dir, u32 offset, u32...
  function do_file_entry (line 491) | void do_file_entry(const u8 * base, const char *dir, const char *path, c...
  function do_dir_entry (line 593) | void do_dir_entry(const u8 * base, const char *dir, const char *path, co...
  function is_cramfs_image (line 619) | int is_cramfs_image(char const *imagefile, char *endian) {
  function uncramfs (line 655) | int uncramfs(char const *dirname, char const *imagefile) {

FILE: src/crc32.c
  type DWORD (line 24) | typedef DWORD UNS_32_BITS;
  function DWORD (line 117) | DWORD updateCRC32(unsigned char ch, DWORD crc) {
  function Boolean_T (line 121) | Boolean_T crc32file(char *name, DWORD * crc, long *charcnt) {
  function DWORD (line 153) | DWORD crc32buf(char *buf, size_t len) {

FILE: src/epk.c
  function compare_epak_header (line 34) | int compare_epak_header(uint8_t *header, size_t headerSize){
  function SWU_CryptoInit_PEM (line 49) | int SWU_CryptoInit_PEM(char *configuration_dir, char *pem_file) {
  function API_SWU_VerifyImage (line 74) | int API_SWU_VerifyImage(void *signature, void* data, size_t imageSize, S...
  function wrap_SWU_VerifyImage (line 125) | int wrap_SWU_VerifyImage(
  function wrap_verifyimage (line 153) | int wrap_verifyimage(void *signature, void *data, size_t signSize, char ...
  function decryptImage (line 198) | void decryptImage(void *srcaddr, size_t len, void *dstaddr) {
  function wrap_decryptimage (line 219) | int wrap_decryptimage(void *src, size_t datalen, void *dest, char *confi...
  function isEpkVersionString (line 278) | bool isEpkVersionString(const char *str){
  function extractEPKfile (line 286) | void extractEPKfile(const char *epk_file, config_opts_t *config_opts){

FILE: src/epk1.c
  function isFileEPK1 (line 20) | bool isFileEPK1(const char *epk_file) {
  function printHeaderInfo (line 41) | void printHeaderInfo(struct epk1Header_t *epakHeader) {
  function printNewHeaderInfo (line 48) | void printNewHeaderInfo(struct epk1NewHeader_t *epakHeader) {
  function constructVerString (line 55) | void constructVerString(char *fw_version, struct epk1Header_t *epakHeade...
  function constructNewVerString (line 59) | void constructNewVerString(char *fw_version, struct epk1NewHeader_t *epa...
  function extract_epk1_file (line 63) | void extract_epk1_file(const char *epk_file, config_opts_t *config_opts) {

FILE: src/epk2.c
  function compare_pak2_header (line 25) | int compare_pak2_header(uint8_t *header, size_t headerSize){
  function compare_epk2_header (line 33) | int compare_epk2_header(uint8_t *header, size_t headerSize){
  function MFILE (line 38) | MFILE *isFileEPK2(const char *epk_file) {
  function extractEPK2 (line 75) | void extractEPK2(MFILE *epk, config_opts_t *config_opts) {

FILE: src/epk3.c
  function compare_epk3_new_header (line 20) | int compare_epk3_new_header(uint8_t *header, size_t headerSize){
  function compare_epk3_header (line 28) | int compare_epk3_header(uint8_t *header, size_t headerSize){
  function MFILE (line 34) | MFILE *isFileEPK3(const char *epk_file) {
  function extractEPK3 (line 67) | void extractEPK3(MFILE *epk, FILE_TYPE_T epkType, config_opts_t *config_...

FILE: src/jffs2/crc32.cpp
  function crc32_no_comp (line 63) | unsigned long crc32_no_comp(unsigned long crc, const unsigned char *buf,...

FILE: src/jffs2/jffs2extract.cpp
  function fix16 (line 75) | unsigned short fix16(unsigned short c) {
  function fix32 (line 82) | unsigned long fix32(unsigned long c) {
  function lzma_free_workspace (line 91) | void lzma_free_workspace(void)
  function lzma_alloc_workspace (line 97) | int lzma_alloc_workspace(CLzmaEncProps *props)
  function rubin_do_decompress (line 120) | void rubin_do_decompress(unsigned char *bits, unsigned char *in, unsigne...
  function dynrubin_decompress (line 184) | void dynrubin_decompress(unsigned char *data_in, unsigned char *cpage_ou...
  function rtime_decompress (line 194) | void rtime_decompress(unsigned char *data_in, unsigned char *cpage_out, ...
  function zlib_decompress (line 230) | long zlib_decompress(unsigned char *data_in, unsigned char *cpage_out, _...
  function lzma_decompress (line 234) | long lzma_decompress(unsigned char *data_in, unsigned char *cpage_out,
  function lzo_decompress (line 251) | long lzo_decompress(unsigned char *data_in, unsigned char *cpage_out,
  function do_uncompress (line 266) | int do_uncompress(void *dst, int dstlen, void *src, int srclen, int type) {
  type nodedata_s (line 299) | struct nodedata_s {
    method nodedata_s (line 306) | nodedata_s(unsigned char *_data, int _size, int _offset, int _isize, i...
    method nodedata_s (line 316) | nodedata_s() {
  type nodedata_s (line 328) | struct nodedata_s
    method nodedata_s (line 306) | nodedata_s(unsigned char *_data, int _size, int _offset, int _isize, i...
    method nodedata_s (line 316) | nodedata_s() {
  function do_list (line 334) | void do_list(int inode, std::string root = "") {
  function is_jffs2_magic (line 500) | inline int is_jffs2_magic(uint16_t val){
  function contiguos_region_size (line 508) | size_t contiguos_region_size(MFILE *mf, off_t offset, uint8_t match_patt...
  function try_guess_es (line 520) | uint32_t try_guess_es(MFILE *mf, bool *is_reliable){
  function jffs2extract (line 622) | int jffs2extract(char *infile, char *outdir, struct jffs2_main_args args) {

FILE: src/jffs2/mini_inflate.cpp
  function cramfs_memset (line 33) | inline void cramfs_memset(int *s, const int c, size n) {
  function init_stream (line 41) | static void init_stream(struct bitstream *stream, unsigned char *data, v...
  function pull_bits (line 80) | inline unsigned long pull_bits(struct bitstream *stream, const unsigned ...
  function pull_bit (line 98) | inline int pull_bit(struct bitstream *stream) {
  function discard_bits (line 108) | static void discard_bits(struct bitstream *stream) {
  function decompress_none (line 116) | static void decompress_none(struct bitstream *stream, unsigned char *des...
  function read_symbol (line 130) | static int read_symbol(struct bitstream *stream, struct huffman_set *set) {
  function decompress_huffman (line 146) | static void decompress_huffman(struct bitstream *stream, unsigned char *...
  function fill_code_tables (line 191) | static void fill_code_tables(struct huffman_set *set) {
  function init_code_tables (line 213) | static void init_code_tables(struct huffman_set *set) {
  function decompress_dynamic (line 220) | static void decompress_dynamic(struct bitstream *stream, unsigned char *...
  function decompress_fixed (line 325) | static void decompress_fixed(struct bitstream *stream, unsigned char *de...
  function decompress_block (line 354) | long decompress_block(unsigned char *dest, unsigned char *source, void *...

FILE: src/lz4/bench.c
  type chunkParameters (line 90) | struct chunkParameters {
  type compressionParameters (line 98) | struct compressionParameters {
  function BMK_SetBlocksize (line 114) | void BMK_SetBlocksize(int bsize) {
  function BMK_SetNbIterations (line 119) | void BMK_SetNbIterations(int nbLoops) {
  function BMK_GetMilliStart (line 128) | static int BMK_GetMilliStart() {
  function BMK_GetMilliSpan (line 139) | static int BMK_GetMilliSpan(int nTimeStart) {
  function U32 (line 146) | static U32 BMK_checksum_MMH3A(char *buff, U32 length) {
  function BMK_findMaxMem (line 197) | static size_t BMK_findMaxMem(U64 requiredMem) {
  function U64 (line 215) | static U64 BMK_GetFileSize(char *infilename) {
  function BMK_benchFile (line 233) | int BMK_benchFile(char **fileNamesTable, int nbFiles, int cLevel) {

FILE: src/lz4/lz4.c
  type U16_S (line 165) | typedef struct _U16_S {
  type U32_S (line 168) | typedef struct _U32_S {
  type U64_S (line 171) | typedef struct _U64_S {
  type refTables (line 242) | struct refTables {
  function LZ4_NbCommonBytes (line 259) | inline static int LZ4_NbCommonBytes(register U64 val) {
  function LZ4_NbCommonBytes (line 300) | inline static int LZ4_NbCommonBytes(register U32 val) {
  function LZ4_compressBound (line 340) | int LZ4_compressBound(int isize) {
  function LZ4_compressCtx (line 348) | int LZ4_compressCtx(void **ctx, const char *source, char *dest, int isiz...
  function LZ4_compress64kCtx (line 532) | int LZ4_compress64kCtx(void **ctx, const char *source, char *dest, int i...
  function LZ4_compress (line 707) | int LZ4_compress(const char *source, char *dest, int isize) {
  function LZ4_uncompress (line 734) | int LZ4_uncompress(const char *source, char *dest, int osize) {
  function LZ4_uncompress_unknownOutputSize (line 828) | int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, int...

FILE: src/lz4/lz4demo.c
  function swap32 (line 62) | static inline unsigned int swap32(unsigned int x) {
  function usage (line 100) | int usage(char *exename) {
  function badusage (line 115) | int badusage(char *exename) {
  function get_fileHandle (line 121) | int get_fileHandle(const char *input_filename, const char *output_filena...
  function compress_file (line 157) | int compress_file(char *input_filename, char *output_filename, int compr...
  function LZ4_decode_file (line 241) | int LZ4_decode_file(const char *input_filename, const char *output_filen...

FILE: src/lz4/lz4hc.c
  type U16_S (line 110) | typedef struct _U16_S {
  type U32_S (line 113) | typedef struct _U32_S {
  type U64_S (line 116) | typedef struct _U64_S {
  type LZ4HC_Data_Structure (line 187) | typedef struct {
  function LZ4_NbCommonBytes (line 211) | inline static int LZ4_NbCommonBytes(register U64 val) {
  function LZ4_NbCommonBytes (line 252) | inline static int LZ4_NbCommonBytes(register U32 val) {
  function LZ4HC_Init (line 288) | inline static int LZ4HC_Init(LZ4HC_Data_Structure * hc4, const BYTE * ba...
  function LZ4HC_Free (line 303) | inline static int LZ4HC_Free(void **LZ4HC_Data) {
  function LZ4HC_Insert (line 309) | inline static void LZ4HC_Insert(LZ4HC_Data_Structure * hc4, const BYTE *...
  function LZ4HC_InsertAndFindBestMatch (line 320) | inline static int LZ4HC_InsertAndFindBestMatch(LZ4HC_Data_Structure * hc...
  function LZ4HC_InsertAndGetWiderMatch (line 372) | inline static int LZ4HC_InsertAndGetWiderMatch(LZ4HC_Data_Structure * hc...
  function LZ4_encodeSequence (line 433) | inline static int LZ4_encodeSequence(const BYTE ** ip, BYTE ** op, const...
  function LZ4_compressHCCtx (line 483) | int LZ4_compressHCCtx(LZ4HC_Data_Structure * ctx, const char *source, ch...
  function LZ4_compressHC (line 680) | int LZ4_compressHC(const char *source, char *dest, int isize) {

FILE: src/lzhs/lzhs.c
  function key_charlen (line 40) | static inline uint32_t key_charlen(uint32_t code, uint32_t len){
  function key_charpos (line 43) | static inline uint16_t key_charpos(uint32_t code, uint32_t len){
  function lzhs_init_lookup (line 48) | void lzhs_init_lookup(){
  type lzhs_ctx (line 53) | struct lzhs_ctx
  type lzhs_ctx (line 54) | struct lzhs_ctx
  type lzhs_ctx (line 54) | struct lzhs_ctx
  function InitTree (line 60) | static void InitTree(struct lzhs_ctx *ctx) {
  function lazy_match (line 68) | static void lazy_match(struct lzhs_ctx *ctx, int r) {
  function InsertNode (line 101) | static void InsertNode(struct lzhs_ctx *ctx, int r) {
  function DeleteNode (line 160) | static void DeleteNode(struct lzhs_ctx *ctx, int p) {
  function InitHuffman (line 191) | static void InitHuffman(struct lzhs_ctx *ctx) {
  function putChar (line 200) | static void putChar(struct lzhs_ctx *ctx, uint32_t code, uint32_t no, FI...
  function getData (line 218) | static inline int getData(struct lzhs_ctx *ctx, cursor_t *in) {
  function huff (line 235) | void huff(struct lzhs_ctx *ctx, FILE * in, FILE * out, unsigned long int...
  function unhuff (line 274) | void unhuff(struct lzhs_ctx *ctx, cursor_t *in, cursor_t *out) {
  function lzss (line 368) | void lzss(struct lzhs_ctx *ctx, FILE * infile, FILE * outfile, unsigned ...
  function unlzss (line 439) | void unlzss(struct lzhs_ctx *ctx, cursor_t *in, cursor_t *out) {

FILE: src/lzhs/lzhs_lib.c
  function _is_lzhs_mem (line 23) | bool _is_lzhs_mem(struct lzhs_header *header){
  function is_lzhs_mem (line 34) | bool is_lzhs_mem(MFILE *file, off_t offset){
  function MFILE (line 42) | MFILE *is_lzhs(const char *filename) {
  function ARMThumb_Convert (line 54) | static void ARMThumb_Convert(unsigned char *data, uint32_t size, uint32_...
  function lzhs_pad_file (line 75) | static int lzhs_pad_file(const char *filename, const char *outfilename) {
  function lzhs_calc_checksum (line 120) | unsigned char lzhs_calc_checksum(unsigned char *buf, int fsize) {
  function lzhs_encode (line 128) | void lzhs_encode(const char *infile, const char *outfile) {
  function cursor_t (line 228) | cursor_t *lzhs_decode(MFILE *in_file, off_t offset, const char *out_path...
  function process_lzhs_segment (line 337) | int process_lzhs_segment(MFILE *in_file, off_t offset, const char *name) {
  function extract_lzhs (line 381) | int extract_lzhs(MFILE *in_file) {

FILE: src/lzma/LzFind.c
  function LzInWindow_Free (line 17) | static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc)
  function LzInWindow_Create (line 28) | static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISz...
  function Byte (line 45) | Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->bu...
  function Byte (line 46) | Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->...
  function UInt32 (line 48) | UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->str...
  function MatchFinder_ReduceOffsets (line 50) | void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
  function MatchFinder_ReadBlock (line 57) | static void MatchFinder_ReadBlock(CMatchFinder *p)
  function MatchFinder_MoveBlock (line 92) | void MatchFinder_MoveBlock(CMatchFinder *p)
  function MatchFinder_NeedMove (line 100) | int MatchFinder_NeedMove(CMatchFinder *p)
  function MatchFinder_ReadIfRequired (line 108) | void MatchFinder_ReadIfRequired(CMatchFinder *p)
  function MatchFinder_CheckAndMoveAndRead (line 116) | static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
  function MatchFinder_SetDefaultSettings (line 123) | static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
  function MatchFinder_Construct (line 133) | void MatchFinder_Construct(CMatchFinder *p)
  function MatchFinder_FreeThisClassMemory (line 151) | static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *a...
  function MatchFinder_Free (line 157) | void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc)
  function CLzRef (line 163) | static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc)
  function MatchFinder_Create (line 171) | int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
  function MatchFinder_SetLimits (line 246) | static void MatchFinder_SetLimits(CMatchFinder *p)
  function MatchFinder_Init (line 271) | void MatchFinder_Init(CMatchFinder *p)
  function UInt32 (line 285) | static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
  function MatchFinder_Normalize3 (line 290) | void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numIt...
  function MatchFinder_Normalize (line 304) | static void MatchFinder_Normalize(CMatchFinder *p)
  function MatchFinder_CheckLimits (line 311) | static void MatchFinder_CheckLimits(CMatchFinder *p)
  function UInt32 (line 322) | static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt...
  function UInt32 (line 353) | UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, c...
  function SkipMatchesSpec (line 408) | static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos...
  function MatchFinder_MovePos (line 465) | static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
  function UInt32 (line 484) | static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distan...
  function UInt32 (line 495) | UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
  function UInt32 (line 506) | static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distan...
  function UInt32 (line 539) | static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distan...
  function UInt32 (line 586) | static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distan...
  function UInt32 (line 635) | UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
  function Bt2_MatchFinder_Skip (line 647) | static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  function Bt3Zip_MatchFinder_Skip (line 660) | void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  function Bt3_MatchFinder_Skip (line 673) | static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  function Bt4_MatchFinder_Skip (line 688) | static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  function Hc4_MatchFinder_Skip (line 704) | static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  function Hc3Zip_MatchFinder_Skip (line 721) | void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  function MatchFinder_CreateVTable (line 735) | void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)

FILE: src/lzma/LzmaDec.c
  function LzmaDec_DecodeReal (line 131) | static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, con...
  function LzmaDec_WriteRem (line 428) | static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
  function LzmaDec_DecodeReal2 (line 454) | static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, co...
  type ELzmaDummy (line 479) | typedef enum
  function ELzmaDummy (line 487) | static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, S...
  function IF_BIT_0_CHECK (line 600) | IF_BIT_0_CHECK(probLen)
  function IF_BIT_0_CHECK (line 611) | IF_BIT_0_CHECK(probLen)
  function LzmaDec_InitRc (line 678) | static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
  function LzmaDec_InitDicAndState (line 685) | void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
  function LzmaDec_Init (line 701) | void LzmaDec_Init(CLzmaDec *p)
  function LzmaDec_InitStateReal (line 707) | static void LzmaDec_InitStateReal(CLzmaDec *p)
  function SRes (line 719) | SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, S...
  function SRes (line 840) | SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const ...
  function LzmaDec_FreeProbs (line 880) | void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
  function LzmaDec_FreeDict (line 886) | static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc)
  function LzmaDec_Free (line 892) | void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
  function SRes (line 898) | SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
  function SRes (line 924) | static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNe...
  function SRes (line 938) | SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned prop...
  function SRes (line 947) | SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize...
  function SRes (line 969) | SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,

FILE: src/lzma/LzmaEnc.c
  function LzmaEncProps_Init (line 48) | void LzmaEncProps_Init(CLzmaEncProps *p)
  function LzmaEncProps_Normalize (line 56) | void LzmaEncProps_Normalize(CLzmaEncProps *p)
  function UInt32 (line 79) | UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
  function UInt32 (line 96) | UInt32 GetPosSlot1(UInt32 pos)
  function LzmaEnc_FastPosInit (line 110) | void LzmaEnc_FastPosInit(Byte *g_FastPos)
  type CState (line 143) | typedef unsigned CState;
  type COptimal (line 145) | typedef struct
  type CLenEnc (line 207) | typedef struct
  type CLenPriceEnc (line 216) | typedef struct
  type CRangeEnc (line 224) | typedef struct
  type CSaveState (line 238) | typedef struct
  type CLzmaEnc (line 260) | typedef struct
  function LzmaEnc_SaveState (line 342) | void LzmaEnc_SaveState(CLzmaEncHandle pp)
  function LzmaEnc_RestoreState (line 368) | void LzmaEnc_RestoreState(CLzmaEncHandle pp)
  function SRes (line 394) | SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
  function RangeEnc_Construct (line 459) | static void RangeEnc_Construct(CRangeEnc *p)
  function RangeEnc_Alloc (line 468) | static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc)
  function RangeEnc_Free (line 480) | static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc)
  function RangeEnc_Init (line 486) | static void RangeEnc_Init(CRangeEnc *p)
  function RangeEnc_FlushStream (line 500) | static void RangeEnc_FlushStream(CRangeEnc *p)
  function RangeEnc_ShiftLow (line 512) | static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p)
  function RangeEnc_FlushData (line 533) | static void RangeEnc_FlushData(CRangeEnc *p)
  function RangeEnc_EncodeDirectBits (line 540) | static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, int nu...
  function RangeEnc_EncodeBit (line 555) | static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 sym...
  function LitEnc_Encode (line 578) | static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol)
  function LitEnc_EncodeMatched (line 589) | static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 ...
  function LzmaEnc_InitPriceTables (line 603) | void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
  function UInt32 (line 639) | static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UIn...
  function UInt32 (line 652) | static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symb...
  function RcTree_Encode (line 669) | static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLev...
  function RcTree_ReverseEncode (line 683) | static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int nu...
  function UInt32 (line 696) | static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, ...
  function UInt32 (line 708) | static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitL...
  function LenEnc_Init (line 724) | static void LenEnc_Init(CLenEnc *p)
  function LenEnc_Encode (line 736) | static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt...
  function LenEnc_SetPrices (line 759) | static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymb...
  function LenPriceEnc_UpdateTable (line 782) | static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32...
  function LenPriceEnc_UpdateTables (line 788) | static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosState...
  function LenEnc_Encode2 (line 795) | static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol...
  function MovePos (line 806) | static void MovePos(CLzmaEnc *p, UInt32 num)
  function UInt32 (line 819) | static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes)
  function UInt32 (line 859) | static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState)
  function UInt32 (line 866) | static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state...
  function UInt32 (line 888) | static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt...
  function UInt32 (line 894) | static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur)
  function UInt32 (line 932) | static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
  function UInt32 (line 1492) | static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes)
  function WriteEndMarker (line 1600) | static void WriteEndMarker(CLzmaEnc *p, UInt32 posState)
  function SRes (line 1613) | static SRes CheckErrors(CLzmaEnc *p)
  function SRes (line 1626) | static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
  function FillAlignPrices (line 1637) | static void FillAlignPrices(CLzmaEnc *p)
  function FillDistancesPrices (line 1645) | static void FillDistancesPrices(CLzmaEnc *p)
  function LzmaEnc_Construct (line 1679) | void LzmaEnc_Construct(CLzmaEnc *p)
  function CLzmaEncHandle (line 1703) | CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc)
  function LzmaEnc_FreeLits (line 1712) | void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
  function LzmaEnc_Destruct (line 1720) | void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
  function LzmaEnc_Destroy (line 1730) | void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig)
  function SRes (line 1736) | static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 max...
  function SRes (line 1900) | static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *...
  function LzmaEnc_Init (line 1950) | void LzmaEnc_Init(CLzmaEnc *p)
  function LzmaEnc_InitPrices (line 2008) | void LzmaEnc_InitPrices(CLzmaEnc *p)
  function SRes (line 2023) | static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISz...
  function SRes (line 2040) | static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream,...
  function SRes (line 2050) | SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
  function LzmaEnc_SetInputBuf (line 2060) | static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
  function SRes (line 2067) | SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
  function LzmaEnc_Finish (line 2077) | void LzmaEnc_Finish(CLzmaEncHandle pp)
  type CSeqOutStreamBuf (line 2088) | typedef struct
  function MyWrite (line 2096) | static size_t MyWrite(void *pp, const void *data, size_t size)
  function UInt32 (line 2111) | UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
  function Byte (line 2117) | const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
  function SRes (line 2123) | SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
  function SRes (line 2157) | static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
  function SRes (line 2187) | SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInS...
  function SRes (line 2194) | SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
  function SRes (line 2223) | SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, co...
  function SRes (line 2251) | SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,

FILE: src/lzo-lg.c
  function lzo_uint (line 65) | lzo_uint xread(FILE * fp, lzo_voidp buf, lzo_uint len, lzo_bool allow_eo...
  function lzo_uint (line 81) | lzo_uint xwrite(FILE * fp, const lzo_voidp buf, lzo_uint len) {
  function xgetc (line 90) | int xgetc(FILE * fp) {
  function xputc (line 96) | void xputc(FILE * fp, int c) {
  function lzo_uint32 (line 103) | lzo_uint32 xread32(FILE * fp) {
  function xwrite32 (line 115) | void xwrite32(FILE * fp, lzo_xint v) {
  function do_compress (line 137) | int do_compress(FILE * fi, FILE * fo, int level, lzo_uint block_size) {
  function do_decompress (line 243) | int do_decompress(FILE * fi, FILE * fo) {
  function FILE (line 389) | static FILE *xopen_fi(const char *name) {
  function FILE (line 415) | static FILE *xopen_fo(const char *name) {
  function xclose (line 437) | static void xclose(FILE * fp) {
  function check_lzo_header (line 450) | int check_lzo_header(const char *name) {
  function lzo_unpack (line 467) | int __lzo_cdecl_main lzo_unpack(const char *in_name, const char *out_nam...

FILE: src/main.c
  function handle_file (line 51) | int handle_file(char *file, config_opts_t *config_opts) {
  function main (line 216) | int main(int argc, char *argv[]) {
  function print_usage (line 317) | static int print_usage(void) {

FILE: src/mediatek.c
  function extract_mtk_1bl (line 22) | void extract_mtk_1bl(MFILE *in, const char *outname) {
  function split_mtk_tz (line 50) | void split_mtk_tz(MFILE *tz, const char *destdir) {
  function MFILE (line 87) | MFILE *is_mtk_boot(const char *filename) {
  function is_elf_mem (line 111) | int is_elf_mem(Elf32_Ehdr * header) {
  function MFILE (line 117) | MFILE *is_elf(const char *filename) {

FILE: src/mediatek_pkg.c
  type mtkpkg_variant (line 19) | enum mtkpkg_variant {
  type mtkupg_header (line 32) | struct mtkupg_header
  function compare_pkg_header (line 35) | int compare_pkg_header(uint8_t *header, size_t headerSize){
  function compare_content_header (line 72) | int compare_content_header(uint8_t *header, size_t headerSize){
  function is_known_partition (line 80) | bool is_known_partition(struct mtkpkg *pak){
  function MFILE (line 98) | MFILE *is_mtk_pkg(const char *pkgfile){
  function MFILE (line 163) | MFILE *is_firm_image(const char *pkg){
  function extract_firm_image (line 181) | int extract_firm_image(MFILE *mf){
  function MFILE (line 185) | MFILE *is_lzhs_fs(const char *pkg){
  type thread_arg (line 217) | struct thread_arg {
  function process_block (line 224) | void process_block(struct thread_arg *arg){
  function extract_lzhs_fs (line 256) | void extract_lzhs_fs(MFILE *mf, const char *dest_file, config_opts_t *co...
  function print_pkg_header (line 358) | void print_pkg_header(struct mtkupg_header *hdr){
  function off_t (line 374) | static off_t get_mtkpkg_offset(){
  function extract_mtk_pkg (line 393) | void extract_mtk_pkg(const char *pkgFile, config_opts_t *config_opts){

FILE: src/mfile.c
  function MFILE (line 25) | inline MFILE *mfile_new(){
  function _mfile_update_info (line 33) | int _mfile_update_info(MFILE *file, const char *path){
  function mfile_flush (line 44) | void mfile_flush(void *mem, size_t length){
  function MFILE (line 82) | MFILE *_mopen(const char *path, int oflags, int mapFlags){
  function MFILE (line 117) | inline MFILE *mopen(const char *path, int oflags){
  function MFILE (line 121) | inline MFILE *mopen_private(const char *path, int oflags){
  function mgetc (line 125) | int mgetc(MFILE *stream){
  function mputc (line 131) | int mputc(int c, MFILE *stream){
  function cgetc (line 139) | inline int cgetc(cursor_t *stream){
  function cputc (line 149) | int cputc(int c, cursor_t *stream){
  function mclose (line 159) | int mclose(MFILE *mfile){
  function MFILE (line 179) | MFILE *_mfopen(const char *path, const char *mode, int mapFlags){
  function MFILE (line 214) | inline MFILE *mfopen(const char *path, const char *mode){
  function MFILE (line 218) | inline MFILE *mfopen_private(const char *path, const char *mode){

FILE: src/minigzip.c
  function pwinerror (line 119) | static void pwinerror (s)
  function myfree (line 163) | void myfree(q, p)
  type gzFile_s (line 170) | struct gzFile_s {
  function gzFile (line 182) | gzFile gzopen(path, mode)
  function gzFile (line 189) | gzFile gzdopen(fd, mode)
  function gzFile (line 196) | gzFile gz_open(path, fd, mode)
  function gzwrite (line 236) | int gzwrite(gz, buf, len)
  function gzread (line 260) | int gzread(gz, buf, len)
  function gzclose (line 297) | int gzclose(gz)
  function error (line 350) | void error(msg)
  function gz_compress (line 361) | void gz_compress(in, out)
  function gz_compress_mmap (line 394) | int gz_compress_mmap(in, out)
  function gz_uncompress (line 429) | void gz_uncompress(in, out)
  function file_compress (line 456) | void file_compress(file, mode)
  function file_uncompress (line 495) | void file_uncompress(file)

FILE: src/partinfo.c
  type m_partmap_info (line 30) | struct m_partmap_info
  type p1_partmap_info (line 31) | struct p1_partmap_info
  type p2_partmap_info (line 32) | struct p2_partmap_info
  function print_size (line 83) | void print_size(unsigned int devsize) {
  function print_minfo (line 93) | unsigned int print_minfo(void) {
  function print_p1info (line 133) | unsigned int print_p1info(void) {
  function print_p2info (line 183) | unsigned int print_p2info(void) {
  function do_partinfo (line 233) | unsigned int do_partinfo(void) {
  function load_partinfo (line 264) | unsigned int load_partinfo(const char *filename) {
  function dump_partinfo (line 294) | unsigned int dump_partinfo(const char *filename, const char *outfile) {

FILE: src/philips.c
  function MFILE (line 17) | MFILE *is_philips_fusion1(const char *filename){
  function extract_philips_fusion1 (line 30) | void extract_philips_fusion1(MFILE *mf, config_opts_t *config_opts){

FILE: src/realtek.c
  function MFILE (line 11) | MFILE *is_rtk_bspfw(const char *filename){
  function split_rtk_bspfw (line 59) | void split_rtk_bspfw(MFILE *mf, const char *destdir) {

FILE: src/squashfs/action.c
  type action (line 52) | struct action
  type action (line 53) | struct action
  type action (line 54) | struct action
  type action (line 55) | struct action
  type action (line 56) | struct action
  type file_buffer (line 63) | struct file_buffer
  type token_entry (line 65) | struct token_entry
  type test_entry (line 78) | struct test_entry
  type action_entry (line 80) | struct action_entry
  type expr (line 82) | struct expr
  type dir_ent (line 84) | struct dir_ent
  type dir_ent (line 86) | struct dir_ent
  function get_token (line 95) | static int get_token(char **string) {
  function peek_token (line 182) | static int peek_token(char **string) {
  function free_parse_tree (line 194) | static void free_parse_tree(struct expr *expr) {
  type expr (line 212) | struct expr
  type expr (line 212) | struct expr
  type expr (line 212) | struct expr
  type expr (line 213) | struct expr
  type expr (line 232) | struct expr
  type expr (line 232) | struct expr
  type expr (line 233) | struct expr
  type expr (line 249) | struct expr
  type test_entry (line 253) | struct test_entry
  type expr (line 254) | struct expr
  type expr (line 341) | struct expr
  type expr (line 358) | struct expr
  type expr (line 359) | struct expr
  function parse_action (line 398) | int parse_action(char *s) {
  function eval_expr (line 544) | static int eval_expr(struct expr *expr, struct action_data *action_data) {
  function read_action_file (line 576) | int read_action_file(char *filename) {
  function actions (line 583) | int actions() {
  function eval_actions (line 587) | void eval_actions(struct dir_ent *dir_ent) {
  type dir_ent (line 615) | struct dir_ent
  type action_data (line 617) | struct action_data
  type action (line 635) | struct action
  type action (line 636) | struct action
  type action (line 647) | struct action
  function exclude_actions (line 658) | int exclude_actions() {
  function eval_exclude_actions (line 662) | int eval_exclude_actions(char *name, char *pathname, char *subpath, stru...
  function frag_action (line 681) | static void frag_action(struct action *action, struct dir_ent *dir_ent) {
  function no_frag_action (line 687) | static void no_frag_action(struct action *action, struct dir_ent *dir_en...
  function always_frag_action (line 693) | static void always_frag_action(struct action *action, struct dir_ent *di...
  function no_always_frag_action (line 699) | static void no_always_frag_action(struct action *action, struct dir_ent ...
  function comp_action (line 708) | static void comp_action(struct action *action, struct dir_ent *dir_ent) {
  function uncomp_action (line 714) | static void uncomp_action(struct action *action, struct dir_ent *dir_ent) {
  function parse_uid (line 723) | static long long parse_uid(char *arg) {
  function parse_gid (line 746) | static long long parse_gid(char *arg) {
  function parse_uid_args (line 769) | static int parse_uid_args(struct action_entry *action, int args, char **...
  function parse_gid_args (line 787) | static int parse_gid_args(struct action_entry *action, int args, char **...
  function parse_guid_args (line 805) | static int parse_guid_args(struct action_entry *action, int args, char *...
  function uid_action (line 828) | static void uid_action(struct action *action, struct dir_ent *dir_ent) {
  function gid_action (line 835) | static void gid_action(struct action *action, struct dir_ent *dir_ent) {
  function guid_action (line 842) | static void guid_action(struct action *action, struct dir_ent *dir_ent) {
  function parse_octal_mode_args (line 854) | static int parse_octal_mode_args(unsigned int mode, int bytes, int args,...
  type mode_data (line 891) | struct mode_data
  type mode_data (line 892) | struct mode_data
  function parse_sym_mode_args (line 999) | static int parse_sym_mode_args(struct action_entry *action, int args, ch...
  function parse_mode_args (line 1021) | static int parse_mode_args(struct action_entry *action, int args, char *...
  function mode_action (line 1039) | static void mode_action(struct action *action, struct dir_ent *dir_ent) {
  function empty_actions (line 1085) | int empty_actions() {
  function parse_empty_args (line 1089) | static int parse_empty_args(struct action_entry *action, int args, char ...
  function eval_empty_actions (line 1119) | int eval_empty_actions(struct dir_ent *dir_ent) {
  type move_ent (line 1166) | struct move_ent
  function move_actions (line 1168) | int move_actions() {
  type move_ent (line 1172) | struct move_ent
  type dir_info (line 1173) | struct dir_info
  type dir_ent (line 1208) | struct dir_ent
  type dir_info (line 1208) | struct dir_info
  type dir_ent (line 1209) | struct dir_ent
  function eval_move (line 1218) | void eval_move(struct action_data *action_data, struct move_ent *move, s...
  function subdirectory (line 1324) | static int subdirectory(struct dir_info *source, struct dir_info *dest) {
  function eval_move_actions (line 1331) | void eval_move_actions(struct dir_info *root, struct dir_ent *dir_ent) {
  function move_dir (line 1409) | static void move_dir(struct dir_ent *dir_ent) {
  function move_file (line 1423) | static void move_file(struct move_ent *move_ent) {
  function do_move_actions (line 1499) | void do_move_actions() {
  function parse_number (line 1533) | static int parse_number(char *start, long long *size, int *range, char *...
  function parse_number_arg (line 1596) | static int parse_number_arg(struct test_entry *test, struct atom *atom) {
  function parse_range_args (line 1620) | static int parse_range_args(struct test_entry *test, struct atom *atom) {
  function check_pathname (line 1715) | static int check_pathname(struct test_entry *test, struct atom *atom) {
  function count_components (line 1735) | static int count_components(char *path) {
  function subpathname_fn (line 1767) | static int subpathname_fn(struct atom *atom, struct action_data *action_...
  type type_entry (line 1818) | struct type_entry
  function parse_type_arg (line 1829) | static int parse_type_arg(struct test_entry *test, struct atom *atom) {
  function type_fn (line 1849) | static int type_fn(struct atom *atom, struct action_data *action_data) {
  function true_fn (line 1858) | static int true_fn(struct atom *atom, struct action_data *action_data) {
  function false_fn (line 1865) | static int false_fn(struct atom *atom, struct action_data *action_data) {
  function parse_file_arg (line 1872) | static int parse_file_arg(struct test_entry *test, struct atom *atom) {
  function file_fn (line 1894) | static int file_fn(struct atom *atom, struct action_data *action_data) {
  function exec_fn (line 1965) | static int exec_fn(struct atom *atom, struct action_data *action_data) {
  function dump_parse_tree (line 2028) | static void dump_parse_tree(struct expr *expr) {
  function dump_action_list (line 2051) | void dump_action_list(struct action *spec_list, int spec_count) {
  function dump_actions (line 2073) | void dump_actions() {
  function dump_actions (line 2081) | void dump_actions() {
  type test_entry (line 2085) | struct test_entry
  type action_entry (line 2119) | struct action_entry

FILE: src/squashfs/caches-queues-lists.c
  type queue (line 39) | struct queue
  type queue (line 40) | struct queue
  type queue (line 40) | struct queue
  function queue_put (line 61) | void queue_put(struct queue *queue, void *data) {
  type queue (line 76) | struct queue
  function queue_empty (line 93) | int queue_empty(struct queue *queue) {
  function queue_flush (line 106) | void queue_flush(struct queue *queue) {
  function dump_queue (line 115) | void dump_queue(struct queue *queue) {
  type seq_queue (line 135) | struct seq_queue
  type seq_queue (line 136) | struct seq_queue
  type seq_queue (line 136) | struct seq_queue
  type seq_queue (line 140) | struct seq_queue
  function seq_queue_put (line 148) | void seq_queue_put(struct seq_queue *queue, struct file_buffer *entry) {
  type file_buffer (line 165) | struct file_buffer
  type seq_queue (line 165) | struct seq_queue
  type file_buffer (line 171) | struct file_buffer
  function seq_queue_flush (line 207) | void seq_queue_flush(struct seq_queue *queue) {
  function dump_seq_queue (line 221) | void dump_seq_queue(struct seq_queue *queue, int fragment_queue) {
  type cache (line 251) | struct cache
  type cache (line 252) | struct cache
  type cache (line 252) | struct cache
  type file_buffer (line 288) | struct file_buffer
  type file_buffer (line 296) | struct file_buffer
  type cache (line 296) | struct cache
  type file_buffer (line 300) | struct file_buffer
  type file_buffer (line 325) | struct file_buffer
  type cache (line 325) | struct cache
  type file_buffer (line 326) | struct file_buffer
  type file_buffer (line 337) | struct file_buffer
  type cache (line 337) | struct cache
  type file_buffer (line 338) | struct file_buffer
  type file_buffer (line 338) | struct file_buffer
  type file_buffer (line 348) | struct file_buffer
  type cache (line 348) | struct cache
  type file_buffer (line 350) | struct file_buffer
  type file_buffer (line 395) | struct file_buffer
  type cache (line 395) | struct cache
  type file_buffer (line 399) | struct file_buffer
  type cache (line 399) | struct cache
  function cache_hash (line 403) | void cache_hash(struct file_buffer *entry, long long index) {
  function cache_block_put (line 415) | void cache_block_put(struct file_buffer *entry) {
  function dump_cache (line 454) | void dump_cache(struct cache *cache) {
  type file_buffer (line 466) | struct file_buffer
  type cache (line 466) | struct cache
  type file_buffer (line 467) | struct file_buffer
  type file_buffer (line 503) | struct file_buffer
  type cache (line 503) | struct cache
  type file_buffer (line 512) | struct file_buffer
  function cache_wait_unlock (line 536) | void cache_wait_unlock(struct file_buffer *buffer) {
  function cache_unlock (line 559) | void cache_unlock(struct file_buffer *entry) {

FILE: src/squashfs/compressor.c
  type compressor (line 29) | struct compressor
  type compressor (line 33) | struct compressor
  type compressor (line 37) | struct compressor
  type compressor (line 41) | struct compressor
  type compressor (line 45) | struct compressor
  type compressor (line 49) | struct compressor
  type compressor (line 53) | struct compressor
  type compressor (line 57) | struct compressor
  type compressor (line 61) | struct compressor
  type compressor (line 65) | struct compressor
  type compressor (line 68) | struct compressor
  type compressor (line 72) | struct compressor
  type compressor (line 81) | struct compressor
  type compressor (line 91) | struct compressor
  function display_compressors (line 101) | void display_compressors(char *indent, char *def_comp) {
  function display_compressor_usage (line 109) | void display_compressor_usage(char *def_comp) {

FILE: src/squashfs/gzip_wrapper.c
  type strategy (line 33) | struct strategy
  function gzip_options (line 65) | static int gzip_options(char *argv[], int argc) {
  function gzip_options_post (line 139) | static int gzip_options_post(int block_size) {
  type gzip_comp_opts (line 160) | struct gzip_comp_opts
  function gzip_extract_options (line 207) | static int gzip_extract_options(int block_size, void *buffer, int size) {
  function gzip_display_options (line 255) | void gzip_display_options(void *buffer, int size) {
  function gzip_init (line 307) | static int gzip_init(void **strm, int block_size, int datablock) {
  function gzip_compress (line 360) | static int gzip_compress(void *strm, void *d, void *s, int size, int blo...
  function gzip_uncompress (line 414) | static int gzip_uncompress(void *d, void *s, int size, int outsize, int ...
  function gzip_usage (line 428) | void gzip_usage() {
  type compressor (line 439) | struct compressor

FILE: src/squashfs/info.c
  type dir_ent (line 47) | struct dir_ent
  function disable_info (line 51) | void disable_info() {
  function update_info (line 55) | void update_info(struct dir_ent *dir_ent) {
  function print_filename (line 59) | void print_filename() {
  function dump_state (line 71) | void dump_state() {
  type timespec (line 117) | struct timespec
  function init_info (line 156) | void init_info() {

FILE: src/squashfs/lz4_wrapper.c
  function lz4_options (line 51) | static int lz4_options(char *argv[], int argc) {
  type lz4_comp_opts (line 76) | struct lz4_comp_opts
  function lz4_extract_options (line 106) | static int lz4_extract_options(int block_size, void *buffer, int size) {
  function lz4_check_options (line 155) | static int lz4_check_options(int block_size, void *buffer, int size) {
  function lz4_display_options (line 177) | void lz4_display_options(void *buffer, int size) {
  function lz4_compress (line 210) | static int lz4_compress(void *strm, void *dest, void *src, int size, int...
  function lz4_uncompress (line 235) | static int lz4_uncompress(void *dest, void *src, int size, int outsize, ...
  function lz4_usage (line 245) | void lz4_usage() {
  type compressor (line 250) | struct compressor

FILE: src/squashfs/lzma_wrapper.c
  function lzma_compress (line 32) | static int lzma_compress(void *strm, void *dest, void *src, int size, in...
  function lzma_uncompress (line 77) | static int lzma_uncompress(void *dest, void *src, int size, int outsize,...
  type compressor (line 99) | struct compressor

FILE: src/squashfs/lzma_xz_wrapper.c
  function lzma_compress (line 38) | static int lzma_compress(void *dummy, void *dest, void *src, int size, i...
  function lzma_uncompress (line 96) | static int lzma_uncompress(void *dest, void *src, int size, int outsize,...
  type compressor (line 143) | struct compressor

FILE: src/squashfs/lzo_wrapper.c
  type lzo_algorithm (line 34) | struct lzo_algorithm
  function lzo_options (line 65) | static int lzo_options(char *argv[], int argc) {
  function lzo_options_post (line 123) | static int lzo_options_post(int block_size) {
  type lzo_comp_opts (line 155) | struct lzo_comp_opts
  function lzo_extract_options (line 195) | static int lzo_extract_options(int block_size, void *buffer, int size) {
  function lzo_display_options (line 244) | void lzo_display_options(void *buffer, int size) {
  function squashfs_lzo_init (line 287) | static int squashfs_lzo_init(void **strm, int block_size, int datablock) {
  function lzo_compress (line 309) | static int lzo_compress(void *strm, void *dest, void *src, int size, int...
  function lzo_uncompress (line 343) | static int lzo_uncompress(void *dest, void *src, int size, int outsize, ...
  function lzo_usage (line 356) | void lzo_usage() {
  function lzo1x_999_wrapper (line 376) | int lzo1x_999_wrapper(const lzo_bytep src, lzo_uint src_len, lzo_bytep d...
  type compressor (line 380) | struct compressor

FILE: src/squashfs/mksquashfs.c
  type squashfs_super_block (line 82) | struct squashfs_super_block
  type cached_dir_index (line 138) | struct cached_dir_index {
  type directory (line 143) | struct directory {
  type inode_info (line 157) | struct inode_info
  type file_info (line 160) | struct file_info
  type exclude_info (line 165) | struct exclude_info {
  type exclude_info (line 172) | struct exclude_info
  type stat (line 173) | struct stat
  type path_entry (line 175) | struct path_entry {
  type pathname (line 181) | struct pathname {
  type pathnames (line 186) | struct pathnames {
  type pathnames (line 192) | struct pathnames
  type pathname (line 193) | struct pathname
  type pathname (line 194) | struct pathname
  type pathnames (line 195) | struct pathnames
  type pathnames (line 195) | struct pathnames
  type squashfs_fragment_entry (line 201) | struct squashfs_fragment_entry
  type old_root_entry_info (line 216) | struct old_root_entry_info {
  type old_root_entry_info (line 220) | struct old_root_entry_info
  type id (line 246) | struct id
  type id (line 247) | struct id
  type cache (line 251) | struct cache
  type cache (line 252) | struct cache
  type queue (line 253) | struct queue
  type seq_queue (line 254) | struct seq_queue
  type compressor (line 267) | struct compressor
  type append_file (line 276) | struct append_file
  type file_info (line 280) | struct file_info
  type fragment (line 280) | struct fragment
  type file_buffer (line 280) | struct file_buffer
  type dir_info (line 281) | struct dir_info
  type pathnames (line 281) | struct pathnames
  type dir_ent (line 281) | struct dir_ent
  type dir_info (line 281) | struct dir_info
  type dir_info (line 282) | struct dir_info
  type pseudo (line 282) | struct pseudo
  type dir_info (line 283) | struct dir_info
  type dir_info (line 283) | struct dir_info
  type dir_info (line 284) | struct dir_info
  type dir_info (line 285) | struct dir_info
  type dir_info (line 286) | struct dir_info
  type file_info (line 287) | struct file_info
  type fragment (line 287) | struct fragment
  type dir_info (line 290) | struct dir_info
  type squashfs_super_block (line 291) | struct squashfs_super_block
  function prep_exit (line 295) | void prep_exit() {
  function add_overflow (line 318) | int add_overflow(int a, int b) {
  function shift_overflow (line 322) | int shift_overflow(int a, int shift) {
  function multiply_overflow (line 326) | int multiply_overflow(int a, int multiplier) {
  function multiply_overflowll (line 330) | int multiply_overflowll(long long a, int multiplier) {
  function restorefs (line 337) | void restorefs() {
  function sighandler (line 366) | void sighandler() {
  function mangle2 (line 370) | int mangle2(void *strm, char *d, char *s, int size, int block_size, int ...
  function mangle (line 387) | int mangle(char *d, char *s, int size, int block_size, int uncompressed,...
  function read_bytes (line 429) | int read_bytes(int fd, void *buff, int bytes) {
  function read_fs_bytes (line 449) | int read_fs_bytes(int fd, long long byte, int bytes, void *buff) {
  function write_bytes (line 469) | int write_bytes(int fd, void *buff, int bytes) {
  function write_destination (line 486) | void write_destination(int fd, long long byte, int bytes, void *buff) {
  function write_inodes (line 503) | long long write_inodes() {
  function write_directories (line 533) | long long write_directories() {
  function write_id_table (line 564) | long long write_id_table() {
  type id (line 578) | struct id
  type id (line 580) | struct id
  type id (line 589) | struct id
  type id (line 591) | struct id
  type id (line 591) | struct id
  function get_uid (line 603) | unsigned int get_uid(unsigned int uid) {
  function get_guid (line 620) | unsigned int get_guid(unsigned int guid) {
  type dir_ent (line 639) | struct dir_ent
  type dir_ent (line 669) | struct dir_ent
  type dir_ent (line 679) | struct dir_ent
  type dir_ent (line 689) | struct dir_ent
  function get_inode_no (line 724) | inline unsigned int get_inode_no(struct inode_info *inode) {
  function get_parent_no (line 728) | inline unsigned int get_parent_no(struct dir_info *dir) {
  function create_inode (line 732) | int create_inode(squashfs_inode * i_no, struct dir_info *dir_info, struc...
  function add_dir (line 969) | void add_dir(squashfs_inode inode, unsigned int inode_number, char *name...
  function write_dir (line 1038) | void write_dir(squashfs_inode * inode, struct dir_info *dir_info, struct...
  type file_buffer (line 1130) | struct file_buffer
  type fragment (line 1130) | struct fragment
  type squashfs_fragment_entry (line 1131) | struct squashfs_fragment_entry
  type file_buffer (line 1132) | struct file_buffer
  function get_fragment_checksum (line 1245) | unsigned short get_fragment_checksum(struct file_info *file) {
  function lock_fragments (line 1287) | void lock_fragments() {
  function unlock_fragments (line 1294) | void unlock_fragments() {
  function add_pending_fragment (line 1323) | void add_pending_fragment(struct file_buffer *write_buffer, int c_byte, ...
  function write_fragment (line 1330) | void write_fragment(struct file_buffer *fragment) {
  type file_buffer (line 1342) | struct file_buffer
  type file_buffer (line 1343) | struct file_buffer
  type squashfs_fragment_entry (line 1349) | struct squashfs_fragment_entry
  type fragment (line 1363) | struct fragment
  function free_fragment (line 1365) | void free_fragment(struct fragment *fragment) {
  type fragment (line 1370) | struct fragment
  type file_buffer (line 1370) | struct file_buffer
  type dir_ent (line 1370) | struct dir_ent
  type fragment (line 1371) | struct fragment
  type file_buffer (line 1372) | struct file_buffer
  type fragment (line 1384) | struct fragment
  function generic_write_table (line 1400) | long long generic_write_table(int length, void *buffer, int length2, voi...
  function write_fragment_table (line 1448) | long long write_fragment_table() {
  function get_checksum (line 1486) | unsigned short get_checksum(char *buff, int bytes, unsigned short chksum) {
  function get_checksum_disk (line 1497) | unsigned short get_checksum_disk(long long start, long long l, unsigned ...
  function get_checksum_mem (line 1528) | unsigned short get_checksum_mem(char *buff, int bytes) {
  function get_checksum_mem_buffer (line 1532) | unsigned short get_checksum_mem_buffer(struct file_buffer *file_buffer) {
  function add_file (line 1540) | void add_file(long long start, long long file_size, long long file_bytes...
  function pre_duplicate (line 1584) | int pre_duplicate(long long file_size) {
  type file_info (line 1594) | struct file_info
  type fragment (line 1594) | struct fragment
  type file_info (line 1595) | struct file_info
  type file_info (line 1595) | struct file_info
  type fragment (line 1620) | struct fragment
  type file_buffer (line 1620) | struct file_buffer
  type file_info (line 1621) | struct file_info
  type file_buffer (line 1622) | struct file_buffer
  type file_info (line 1623) | struct file_info
  type file_info (line 1657) | struct file_info
  type fragment (line 1657) | struct fragment
  type file_buffer (line 1657) | struct file_buffer
  type file_info (line 1658) | struct file_info
  type file_buffer (line 1686) | struct file_buffer
  type file_buffer (line 1687) | struct file_buffer
  type file_buffer (line 1724) | struct file_buffer
  function is_fragment (line 1741) | inline int is_fragment(struct inode_info *inode) {
  function put_file_buffer (line 1754) | void put_file_buffer(struct file_buffer *file_buffer) {
  function reader_read_process (line 1773) | void reader_read_process(struct dir_ent *dir_ent) {
  function reader_read_file (line 1854) | void reader_read_file(struct dir_ent *dir_ent) {
  function reader_scan (line 1958) | void reader_scan(struct dir_info *dir) {
  type priority_entry (line 1987) | struct priority_entry
  type file_buffer (line 2000) | struct file_buffer
  function all_zero (line 2027) | int all_zero(struct file_buffer *file_buffer) {
  type file_buffer (line 2044) | struct file_buffer
  type file_buffer (line 2053) | struct file_buffer
  type file_buffer (line 2085) | struct file_buffer
  type file_buffer (line 2086) | struct file_buffer
  type file_buffer (line 2111) | struct file_buffer
  type file_buffer (line 2112) | struct file_buffer
  function write_file_empty (line 2117) | void write_file_empty(squashfs_inode * inode, struct dir_ent *dir_ent, s...
  function write_file_frag (line 2124) | void write_file_frag(squashfs_inode * inode, struct dir_ent *dir_ent, st...
  function write_file_process (line 2154) | int write_file_process(squashfs_inode * inode, struct dir_ent *dir_ent, ...
  function write_file_blocks_dup (line 2236) | int write_file_blocks_dup(squashfs_inode * inode, struct dir_ent *dir_en...
  function write_file_blocks (line 2371) | int write_file_blocks(squashfs_inode * inode, struct dir_ent *dir_ent, s...
  function write_file (line 2470) | void write_file(squashfs_inode * inode, struct dir_ent *dir, int *dup) {
  type inode_info (line 2571) | struct inode_info
  type stat (line 2571) | struct stat
  type inode_info (line 2573) | struct inode_info
  type stat (line 2583) | struct stat
  type inode_info (line 2590) | struct inode_info
  type stat (line 2594) | struct stat
  type inode_info (line 2623) | struct inode_info
  type stat (line 2623) | struct stat
  function alloc_inode_no (line 2627) | inline void alloc_inode_no(struct inode_info *inode, unsigned int use_th...
  type dir_ent (line 2632) | struct dir_ent
  type dir_info (line 2632) | struct dir_info
  type dir_ent (line 2633) | struct dir_ent
  type dir_ent (line 2633) | struct dir_ent
  function add_dir_entry (line 2646) | inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_...
  function add_dir_entry2 (line 2659) | inline void add_dir_entry2(char *name, char *source_name, char *nonstand...
  function free_dir_entry (line 2666) | inline void free_dir_entry(struct dir_ent *dir_ent) {
  function add_excluded (line 2676) | inline void add_excluded(struct dir_info *dir) {
  function dir_scan (line 2680) | void dir_scan(squashfs_inode * inode, char *pathname, struct dir_ent *(_...
  type dir_info (line 2774) | struct dir_info
  type dir_info (line 2775) | struct dir_info
  type dir_info (line 2777) | struct dir_info
  type dir_ent (line 2801) | struct dir_ent
  type dir_info (line 2801) | struct dir_info
  type dir_ent (line 2827) | struct dir_ent
  type dir_ent (line 2847) | struct dir_ent
  type dir_info (line 2847) | struct dir_info
  type dirent (line 2848) | struct dirent
  type dir_ent (line 2865) | struct dir_ent
  type dir_ent (line 2886) | struct dir_ent
  type dir_info (line 2886) | struct dir_info
  type dirent (line 2887) | struct dirent
  function scan1_freedir (line 2892) | void scan1_freedir(struct dir_info *dir) {
  type dir_info (line 2897) | struct dir_info
  type pathnames (line 2897) | struct pathnames
  type dir_ent (line 2897) | struct dir_ent
  type dir_info (line 2897) | struct dir_info
  type dir_info (line 2898) | struct dir_info
  type dir_ent (line 2899) | struct dir_ent
  type dir_info (line 2908) | struct dir_info
  type stat (line 2909) | struct stat
  type pathnames (line 2910) | struct pathnames
  type dir_ent (line 2978) | struct dir_ent
  type dir_info (line 2978) | struct dir_info
  type dir_ent (line 2978) | struct dir_ent
  type dir_ent (line 2989) | struct dir_ent
  type dir_info (line 2989) | struct dir_info
  type dir_ent (line 2990) | struct dir_ent
  function dir_scan2 (line 2997) | void dir_scan2(struct dir_info *dir, struct pseudo *pseudo) {
  function dir_scan3 (line 3082) | void dir_scan3(struct dir_info *root, struct dir_info *dir) {
  function dir_scan4 (line 3100) | void dir_scan4(struct dir_info *dir) {
  function sort_directory (line 3155) | void sort_directory(struct dir_info *dir) {
  function dir_scan5 (line 3233) | void dir_scan5(struct dir_info *dir) {
  function scan6_init_dir (line 3259) | void scan6_init_dir(struct directory *dir) {
  type dir_ent (line 3272) | struct dir_ent
  type directory (line 3272) | struct directory
  type dir_info (line 3272) | struct dir_info
  type dir_ent (line 3272) | struct dir_ent
  function scan6_freedir (line 3284) | void scan6_freedir(struct directory *dir) {
  function dir_scan6 (line 3290) | void dir_scan6(squashfs_inode * inode, struct dir_info *dir_info) {
  function slog (line 3392) | unsigned int slog(unsigned int block) {
  function old_excluded (line 3401) | int old_excluded(char *filename, struct stat *buf) {
  function old_add_exclude (line 3419) | int old_add_exclude(char *path) {
  function add_old_root_entry (line 3452) | void add_old_root_entry(char *name, squashfs_inode inode, int inode_numb...
  function initialise_threads (line 3464) | void initialise_threads(int readq, int fragq, int bwriteq, int fwriteq, ...
  function write_inode_lookup_table (line 3612) | long long write_inode_lookup_table() {
  function free_path (line 3658) | void free_path(struct pathname *paths) {
  type pathname (line 3674) | struct pathname
  type pathname (line 3674) | struct pathname
  type pathname (line 3681) | struct pathname
  type path_entry (line 3696) | struct path_entry
  function add_exclude (line 3744) | void add_exclude(char *target) {
  function display_path (line 3754) | void display_path(int depth, struct pathname *paths) {
  function display_path2 (line 3768) | void display_path2(struct pathname *paths, char *string) {
  type pathnames (line 3786) | struct pathnames
  type pathnames (line 3786) | struct pathnames
  type pathname (line 3786) | struct pathname
  type pathnames (line 3790) | struct pathnames
  type pathname (line 3790) | struct pathname
  function excluded_match (line 3800) | int excluded_match(char *name, struct pathname *path, struct pathnames *...
  function excluded (line 3824) | int excluded(char *name, struct pathnames *paths, struct pathnames **new) {
  function process_exclude_file (line 3850) | void process_exclude_file(char *argv) {
  function write_recovery_data (line 3907) | void write_recovery_data(struct squashfs_super_block *sBlk) {
  function read_recovery_data (line 3955) | void read_recovery_data(char *recovery_file, char *destination_file) {
  function write_filesystem_tables (line 4022) | void write_filesystem_tables(struct squashfs_super_block *sBlk, int nopa...
  function parse_numberll (line 4105) | int parse_numberll(char *start, long long *res, int size) {
  function parse_number (line 4187) | int parse_number(char *start, int *res, int size) {
  function parse_num (line 4201) | int parse_num(char *arg, int *res) {
  function get_physical_memory (line 4205) | int get_physical_memory() {
  function calculate_queue_sizes (line 4219) | void calculate_queue_sizes(int mem, int *readq, int *fragq, int *bwriteq...
  function main (line 4244) | int main(int argc, char *argv[]) {

FILE: src/squashfs/process_fragments.c
  type queue (line 53) | struct queue
  type seq_queue (line 54) | struct seq_queue
  function checksum_sparse (line 60) | static int checksum_sparse(struct file_buffer *file_buffer) {
  function read_filesystem (line 78) | static int read_filesystem(int fd, long long byte, int bytes, void *buff) {
  type file_buffer (line 94) | struct file_buffer
  type fragment (line 94) | struct fragment
  type squashfs_fragment_entry (line 95) | struct squashfs_fragment_entry
  type file_buffer (line 96) | struct file_buffer
  type file_buffer (line 206) | struct file_buffer
  type file_info (line 206) | struct file_info
  type file_buffer (line 207) | struct file_buffer
  type append_file (line 208) | struct append_file
  type file_buffer (line 257) | struct file_buffer
  type file_buffer (line 258) | struct file_buffer
  type file_info (line 260) | struct file_info
  type file_buffer (line 333) | struct file_buffer

FILE: src/squashfs/progressbar.c
  function sigwinch_handler (line 54) | static void sigwinch_handler() {
  function sigalrm_handler (line 65) | static void sigalrm_handler() {
  function inc_progress_bar (line 69) | void inc_progress_bar() {
  function dec_progress_bar (line 73) | void dec_progress_bar(int count) {
  function progress_bar_size (line 77) | void progress_bar_size(int count) {
  function progress_bar (line 81) | static void progress_bar(long long current, long long max, int columns) {
  function enable_progress_bar (line 127) | void enable_progress_bar() {
  function disable_progress_bar (line 136) | void disable_progress_bar() {
  function set_progressbar_state (line 145) | void set_progressbar_state(int state) {
  type timespec (line 159) | struct timespec
  type itimerval (line 160) | struct itimerval
  type winsize (line 161) | struct winsize
  function init_progress_bar (line 194) | void init_progress_bar() {
  function progressbar_error (line 198) | void progressbar_error(char *fmt, ...) {
  function progressbar_info (line 214) | void progressbar_info(char *fmt, ...) {

FILE: src/squashfs/pseudo.c
  type pseudo_dev (line 46) | struct pseudo_dev
  type pseudo (line 47) | struct pseudo
  type pseudo (line 72) | struct pseudo
  type pseudo (line 72) | struct pseudo
  type pseudo_dev (line 72) | struct pseudo_dev
  type pseudo (line 79) | struct pseudo
  type pseudo_entry (line 95) | struct pseudo_entry
  type pseudo_dev (line 130) | struct pseudo_dev
  type pseudo (line 164) | struct pseudo
  type pseudo (line 164) | struct pseudo
  type pseudo_entry (line 177) | struct pseudo_entry
  type pseudo (line 177) | struct pseudo
  function pseudo_exec_file (line 191) | int pseudo_exec_file(struct pseudo_dev *dev, int *child) {
  function add_pseudo_file (line 226) | void add_pseudo_file(struct pseudo_dev *dev) {
  type pseudo_dev (line 235) | struct pseudo_dev
  function read_pseudo_def (line 239) | int read_pseudo_def(char *def) {
  function read_pseudo_file (line 428) | int read_pseudo_file(char *filename) {
  type pseudo (line 432) | struct pseudo
  function dump_pseudo (line 437) | static void dump_pseudo(struct pseudo *pseudo, char *string) {
  function dump_pseudos (line 458) | void dump_pseudos() {
  function dump_pseudos (line 462) | void dump_pseudos() {

FILE: src/squashfs/read_file.c
  function read_file (line 45) | int read_file(char *filename, char *type, int (parse_line) (char *)) {

FILE: src/squashfs/read_fs.c
  function read_block (line 55) | int read_block(int fd, long long start, long long *next, int expected, v...
  function scan_inode_table (line 115) | int scan_inode_table(int fd, long long start, long long end, long long r...
  type compressor (line 450) | struct compressor
  type squashfs_super_block (line 450) | struct squashfs_super_block
  type squashfs_super_block (line 454) | struct squashfs_super_block
  type squashfs_super_block (line 551) | struct squashfs_super_block
  type squashfs_dir_header (line 552) | struct squashfs_dir_header
  type squashfs_dir_entry (line 553) | struct squashfs_dir_entry
  type squashfs_dir_entry (line 555) | struct squashfs_dir_entry
  type squashfs_dir_entry (line 555) | struct squashfs_dir_entry
  type squashfs_super_block (line 609) | struct squashfs_super_block
  function read_fragment_table (line 653) | int read_fragment_table(int fd, struct squashfs_super_block *sBlk, struc...
  function read_inode_lookup_table (line 697) | int read_inode_lookup_table(int fd, struct squashfs_super_block *sBlk, s...
  function read_filesystem (line 738) | long long read_filesystem(char *root_name, int fd, struct squashfs_super...

FILE: src/squashfs/read_xattrs.c
  type hash_entry (line 52) | struct hash_entry {
  type squashfs_xattr_id (line 58) | struct squashfs_xattr_id
  type prefix (line 65) | struct prefix
  function save_xattr_block (line 76) | static void save_xattr_block(long long start, int offset) {
  function get_xattr_block (line 95) | static int get_xattr_block(long long start) {
  function read_xattr_entry (line 112) | static int read_xattr_entry(struct xattr_list *xattr, struct squashfs_xa...
  function read_xattrs_from_disk (line 143) | int read_xattrs_from_disk(int fd, struct squashfs_super_block *sBlk) {
  function free_xattr (line 258) | void free_xattr(struct xattr_list *xattr_list, int count) {
  type xattr_list (line 288) | struct xattr_list
  type xattr_list (line 290) | struct xattr_list
  type squashfs_xattr_entry (line 305) | struct squashfs_xattr_entry
  type squashfs_xattr_val (line 306) | struct squashfs_xattr_val
  type xattr_list (line 309) | struct xattr_list

FILE: src/squashfs/restore.c
  type queue (line 51) | struct queue
  type seq_queue (line 52) | struct seq_queue
  function pthread_t (line 148) | pthread_t *init_restore_thread() {

FILE: src/squashfs/sort.c
  type sort_info (line 49) | struct sort_info {
  type sort_info (line 56) | struct sort_info
  type priority_entry (line 58) | struct priority_entry
  type dir_ent (line 61) | struct dir_ent
  type dir_ent (line 62) | struct dir_ent
  function add_priority_list (line 64) | void add_priority_list(struct dir_ent *dir, int priority) {
  function get_priority (line 77) | int get_priority(char *filename, struct stat *buf, int priority) {
  function add_sort_list (line 101) | int add_sort_list(char *path, int priority, int source, char *source_pat...
  function generate_file_priorities (line 172) | void generate_file_priorities(struct dir_info *dir, int priority, struct...
  function read_sort_file (line 193) | int read_sort_file(char *filename, int source, char *source_path[]) {
  function sort_files_and_write (line 298) | void sort_files_and_write(struct dir_info *dir) {

FILE: src/squashfs/swap.c
  function swap_le16 (line 31) | void swap_le16(void *src, void *dest) {
  function swap_le32 (line 39) | void swap_le32(void *src, void *dest) {
  function swap_le64 (line 49) | void swap_le64(void *src, void *dest) {
  function inswap_le16 (line 63) | unsigned short inswap_le16(unsigned short num) {
  function inswap_le32 (line 67) | unsigned int inswap_le32(unsigned int num) {
  function inswap_le64 (line 71) | long long inswap_le64(long long n) {

FILE: src/squashfs/unsquash-1.c
  function read_block_list_1 (line 28) | void read_block_list_1(unsigned int *block_list, char *block_ptr, int bl...
  function read_fragment_table_1 (line 45) | int read_fragment_table_1(long long *directory_table_end) {
  type inode (line 51) | struct inode
  type inode (line 56) | struct inode
  type dir (line 180) | struct dir
  type inode (line 180) | struct inode
  type dir_ent (line 188) | struct dir_ent
  type dir (line 189) | struct dir
  type dir (line 195) | struct dir
  type dir_ent (line 258) | struct dir_ent
  function read_uids_guids_1 (line 280) | int read_uids_guids_1() {

FILE: src/squashfs/unsquash-2.c
  function read_block_list_2 (line 30) | void read_block_list_2(unsigned int *block_list, char *block_ptr, int bl...
  function read_fragment_table_2 (line 41) | int read_fragment_table_2(long long *directory_table_end) {
  function read_fragment_2 (line 98) | void read_fragment_2(unsigned int fragment, long long *start_block, int ...
  type inode (line 106) | struct inode
  type inode (line 111) | struct inode

FILE: src/squashfs/unsquash-3.c
  function read_fragment_table_3 (line 30) | int read_fragment_table_3(long long *directory_table_end) {
  function read_fragment_3 (line 87) | void read_fragment_3(unsigned int fragment, long long *start_block, int ...
  type inode (line 95) | struct inode
  type inode (line 100) | struct inode
  type dir (line 235) | struct dir
  type inode (line 235) | struct inode
  type dir_ent (line 243) | struct dir_ent
  type dir (line 244) | struct dir
  type dir (line 250) | struct dir
  type dir_ent (line 314) | struct dir_ent

FILE: src/squashfs/unsquash-4.c
  type squashfs_fragment_entry (line 28) | struct squashfs_fragment_entry
  function read_fragment_table_4 (line 31) | int read_fragment_table_4(long long *directory_table_end) {
  function read_fragment_4 (line 73) | void read_fragment_4(unsigned int fragment, long long *start_block, int ...
  type inode (line 83) | struct inode
  type inode (line 88) | struct inode
  type squashfs_dir_inode_header (line 106) | struct squashfs_dir_inode_header
  type squashfs_ldir_inode_header (line 117) | struct squashfs_ldir_inode_header
  type squashfs_reg_inode_header (line 128) | struct squashfs_reg_inode_header
  type squashfs_lreg_inode_header (line 144) | struct squashfs_lreg_inode_header
  type squashfs_symlink_inode_header (line 161) | struct squashfs_symlink_inode_header
  type squashfs_symlink_inode_header (line 168) | struct squashfs_symlink_inode_header
  type squashfs_symlink_inode_header (line 173) | struct squashfs_symlink_inode_header
  type squashfs_dev_inode_header (line 180) | struct squashfs_dev_inode_header
  type squashfs_ldev_inode_header (line 190) | struct squashfs_ldev_inode_header
  type squashfs_lipc_inode_header (line 205) | struct squashfs_lipc_inode_header
  type dir (line 219) | struct dir
  type inode (line 219) | struct inode
  type squashfs_dir_header (line 220) | struct squashfs_dir_header
  type squashfs_dir_entry (line 221) | struct squashfs_dir_entry
  type squashfs_dir_entry (line 223) | struct squashfs_dir_entry
  type squashfs_dir_entry (line 223) | struct squashfs_dir_entry
  type dir_ent (line 227) | struct dir_ent
  type dir (line 228) | struct dir
  type dir (line 234) | struct dir
  type dir_ent (line 289) | struct dir_ent
  function read_uids_guids_4 (line 311) | int read_uids_guids_4() {

FILE: src/squashfs/unsquashfs.c
  type cache (line 48) | struct cache
  type queue (line 49) | struct queue
  type super_block (line 56) | struct super_block
  type compressor (line 58) | struct compressor
  type hash_table_entry (line 62) | struct hash_table_entry
  type test (line 103) | struct test
  function prep_exit (line 132) | void prep_exit() {
  function sigwinch_handler (line 135) | void sigwinch_handler() {
  function sigalrm_handler (line 146) | void sigalrm_handler() {
  function add_overflow (line 150) | int add_overflow(int a, int b) {
  function shift_overflow (line 154) | int shift_overflow(int a, int shift) {
  function multiply_overflow (line 158) | int multiply_overflow(int a, int multiplier) {
  type queue (line 162) | struct queue
  type queue (line 163) | struct queue
  type queue (line 163) | struct queue
  function queue_put (line 184) | void queue_put(struct queue *queue, void *data) {
  type queue (line 198) | struct queue
  function dump_queue (line 213) | void dump_queue(struct queue *queue) {
  function insert_hash_table (line 222) | void insert_hash_table(struct cache *cache, struct cache_entry *entry) {
  function remove_hash_table (line 233) | void remove_hash_table(struct cache *cache, struct cache_entry *entry) {
  function insert_free_list (line 245) | void insert_free_list(struct cache *cache, struct cache_entry *entry) {
  function remove_free_list (line 258) | void remove_free_list(struct cache *cache, struct cache_entry *entry) {
  type cache (line 276) | struct cache
  type cache (line 277) | struct cache
  type cache (line 277) | struct cache
  type cache_entry (line 287) | struct cache_entry
  type cache_entry (line 297) | struct cache_entry
  type cache (line 297) | struct cache
  type cache_entry (line 306) | struct cache_entry
  type cache_entry (line 332) | struct cache_entry
  function cache_block_ready (line 380) | void cache_block_ready(struct cache_entry *entry, int error) {
  function cache_block_wait (line 403) | void cache_block_wait(struct cache_entry *entry) {
  function cache_block_put (line 418) | void cache_block_put(struct cache_entry *entry) {
  function dump_cache (line 445) | void dump_cache(struct cache *cache) {
  function print_filename (line 467) | int print_filename(char *pathname, struct inode *inode) {
  function add_entry (line 538) | void add_entry(struct hash_table_entry *hash_table[], long long start, i...
  function lookup_entry (line 552) | int lookup_entry(struct hash_table_entry *hash_table[], long long start) {
  function read_fs_bytes (line 564) | int read_fs_bytes(int fd, long long byte, int bytes, void *buff) {
  function read_block (line 592) | int read_block(int fd, long long start, long long *next, int expected, v...
  function read_data_block (line 658) | int read_data_block(long long start, unsigned int size, char *block) {
  function read_inode_table (line 688) | int read_inode_table(long long start, long long end) {
  function set_attributes (line 732) | int set_attributes(char *pathname, int mode, uid_t uid, gid_t guid, time...
  function write_bytes (line 758) | int write_bytes(int fd, char *buff, int bytes) {
  function write_block (line 778) | int write_block(int file_fd, char *buffer, int size, long long hole, int...
  function open_init (line 820) | void open_init(int count) {
  function open_wait (line 825) | int open_wait(char *pathname, int flags, mode_t mode) {
  function close_wake (line 837) | void close_wake(int fd) {
  function queue_file (line 848) | void queue_file(char *pathname, int file_fd, struct inode *inode) {
  function queue_dir (line 866) | void queue_dir(char *pathname, struct dir *dir) {
  function write_file (line 881) | int write_file(struct inode *inode, char *pathname) {
  function create_inode (line 943) | int create_inode(char *pathname, struct inode *i) {
  function read_directory_table (line 1038) | int read_directory_table(long long start, long long end) {
  function squashfs_readdir (line 1082) | int squashfs_readdir(struct dir *dir, char **name, unsigned int *start_b...
  function squashfs_closedir (line 1095) | void squashfs_closedir(struct dir *dir) {
  function free_path (line 1118) | void free_path(struct pathname *paths) {
  type pathname (line 1134) | struct pathname
  type pathname (line 1134) | struct pathname
  type pathname (line 1143) | struct pathname
  type path_entry (line 1160) | struct path_entry
  type pathnames (line 1220) | struct pathnames
  type pathnames (line 1221) | struct pathnames
  type pathnames (line 1221) | struct pathnames
  type pathnames (line 1228) | struct pathnames
  type pathnames (line 1228) | struct pathnames
  type pathname (line 1228) | struct pathname
  type pathnames (line 1230) | struct pathnames
  type pathname (line 1230) | struct pathname
  function free_subdir (line 1239) | void free_subdir(struct pathnames *paths) {
  function matches (line 1243) | int matches(struct pathnames *paths, char *name, struct pathnames **new) {
  function pre_scan (line 1302) | void pre_scan(char *parent_name, unsigned int start_block, unsigned int ...
  function dir_scan (line 1347) | void dir_scan(char *parent_name, unsigned int start_block, unsigned int ...
  function squashfs_stat (line 1433) | void squashfs_stat(char *source) {
  function check_compression (line 1522) | int check_compression(struct compressor *comp) {
  function read_super (line 1555) | int read_super(char *source) {
  type pathname (line 1674) | struct pathname
  type pathname (line 1674) | struct pathname
  type cache_entry (line 1731) | struct cache_entry
  type squashfs_file (line 1761) | struct squashfs_file
  type file_entry (line 1783) | struct file_entry
  type cache_entry (line 1853) | struct cache_entry
  type timespec (line 1873) | struct timespec
  type itimerval (line 1874) | struct itimerval
  type winsize (line 1875) | struct winsize
  function initialise_threads (line 1909) | void initialise_threads(int fragment_buffer_size, int data_buffer_size) {
  function enable_progress_bar (line 2092) | void enable_progress_bar() {
  function disable_progress_bar (line 2098) | void disable_progress_bar() {
  function progressbar_error (line 2108) | void progressbar_error(char *fmt, ...) {
  function progressbar_info (line 2123) | void progressbar_info(char *fmt, ...) {
  function progress_bar (line 2138) | void progress_bar(long long current, long long max, int columns) {
  function parse_number (line 2186) | int parse_number(char *arg, int *res) {
  function is_squashfs (line 2235) | int is_squashfs(char *filename) {
  function unsquashfs (line 2261) | int unsquashfs(char *squashfs, char *dest) {

FILE: src/squashfs/unsquashfs_info.c
  function disable_info (line 57) | void disable_info() {
  function update_info (line 64) | void update_info(char *name) {
  function dump_state (line 71) | void dump_state() {
  type timespec (line 97) | struct timespec
  function init_info (line 137) | void init_info() {

FILE: src/squashfs/unsquashfs_xattr.c
  function write_xattr (line 35) | void write_xattr(char *pathname, unsigned int xattr) {

FILE: src/squashfs/xattr.c
  type squashfs_xattr_id (line 55) | struct squashfs_xattr_id
  type xattr_list (line 69) | struct xattr_list
  type dupl_id (line 72) | struct dupl_id
  type dir_ent (line 85) | struct dir_ent
  type squashfs_super_block (line 88) | struct squashfs_super_block
  type xattr_list (line 89) | struct xattr_list
  type prefix (line 90) | struct prefix
  function get_prefix (line 92) | static int get_prefix(struct xattr_list *xattr, char *name) {
  function read_xattrs_from_system (line 111) | static int read_xattrs_from_system(char *filename, struct xattr_list **x...
  function get_xattr_size (line 209) | static int get_xattr_size(struct xattr_list *xattr) {
  type dupl_id (line 261) | struct dupl_id
  type xattr_list (line 261) | struct xattr_list
  type dupl_id (line 262) | struct dupl_id
  type xattr_list (line 268) | struct xattr_list
  type xattr_list (line 279) | struct xattr_list
  type xattr_list (line 280) | struct xattr_list
  function check_value_dupl (line 308) | static void check_value_dupl(struct xattr_list *xattr) {
  function get_xattr_id (line 348) | static int get_xattr_id(int xattrs, struct xattr_list *xattr_list, long ...
  function write_xattrs (line 375) | long long write_xattrs() {
  function generate_xattrs (line 424) | int generate_xattrs(int xattrs, struct xattr_list *xattr_list) {
  function read_xattrs (line 554) | int read_xattrs(void *d) {
  function get_xattrs (line 577) | int get_xattrs(int fd, struct squashfs_super_block *sBlk) {
  function save_xattrs (line 619) | void save_xattrs() {
  function restore_xattrs (line 643) | void restore_xattrs() {

FILE: src/squashfs/xz_wrapper.c
  type bcj (line 34) | struct bcj
  function xz_options (line 67) | static int xz_options(char *argv[], int argc) {
  function xz_options_post (line 154) | static int xz_options_post(int block_size) {
  type comp_opts (line 208) | struct comp_opts
  function xz_extract_options (line 256) | static int xz_extract_options(int block_size, void *buffer, int size) {
  function xz_display_options (line 300) | void xz_display_options(void *buffer, int size) {
  function xz_init (line 354) | static int xz_init(void **strm, int block_size, int datablock) {
  function xz_compress (line 404) | static int xz_compress(void *strm, void *dest, void *src, int size, int ...
  function xz_uncompress (line 450) | static int xz_uncompress(void *dest, void *src, int size, int outsize, i...
  function xz_usage (line 466) | void xz_usage() {
  type compressor (line 485) | struct compressor

FILE: src/stream/crc32.c
  function str_crc32 (line 49) | uint32_t str_crc32(const unsigned char *data, int len) {

FILE: src/stream/tsfile.c
  function do_unwrap_func (line 37) | static bool do_unwrap_func(const uint8_t unwrap_key[], const uint8_t aes...
  function setKey (line 66) | static int setKey(char *keyPath) {
  function writeHeaders (line 190) | void writeHeaders(FILE *outFile){
  type tables (line 211) | struct tables {
  function pack_pid (line 220) | static inline uint32_t pack_pid(int pid){
  function writePMT (line 231) | void writePMT(struct tables *PIDs, FILE *outFile, struct tsfile_options ...
  function processTsPacket (line 339) | void processTsPacket(uint8_t *packet, struct tables *PIDs, FILE *outFile){
  function convertSTR2TS_internal (line 412) | void convertSTR2TS_internal(char *inFilename, char *outFilename, struct ...
  function convertSTR2TS (line 465) | void convertSTR2TS(char *inFilename, struct tsfile_options *opts) {
  function processPIF (line 487) | void processPIF(const char *filename, char *dest_file) {

FILE: src/symfile.c
  type symfile_header (line 43) | struct symfile_header {
  type sym_table (line 51) | struct sym_table
  function symfile_load (line 61) | int symfile_load(const char *fname) {
  function symfile_addr_by_name (line 146) | uint32_t symfile_addr_by_name(const char *name) {
  function symfile_n_symbols (line 158) | uint32_t symfile_n_symbols() {
  function symfile_write_idc (line 162) | void symfile_write_idc(const char *fname) {

FILE: src/thpool.c
  type bsem (line 38) | typedef struct bsem {
  type job (line 46) | typedef struct job{
  type jobqueue (line 54) | typedef struct jobqueue{
  type thread (line 64) | typedef struct thread{
  type thpool_ (line 72) | typedef struct thpool_{
  type thread (line 88) | struct thread
  type thread (line 89) | struct thread
  type thread (line 91) | struct thread
  type job (line 95) | struct job
  type job (line 96) | struct job
  type bsem (line 99) | struct bsem
  type bsem (line 100) | struct bsem
  type bsem (line 101) | struct bsem
  type bsem (line 102) | struct bsem
  type bsem (line 103) | struct bsem
  type thpool_ (line 113) | struct thpool_
  type thpool_ (line 124) | struct thpool_
  type thpool_ (line 124) | struct thpool_
  type thread (line 140) | struct thread
  type thread (line 140) | struct thread
  function thpool_add_work (line 168) | int thpool_add_work(thpool_* thpool_p, void (*function_p)(void*), void* ...
  function thpool_wait (line 191) | void thpool_wait(thpool_* thpool_p){
  function thpool_destroy (line 201) | void thpool_destroy(thpool_* thpool_p){
  function thpool_pause (line 242) | void thpool_pause(thpool_* thpool_p) {
  function thpool_resume (line 251) | void thpool_resume(thpool_* thpool_p) {
  function thread_init (line 268) | static int thread_init (thpool_* thpool_p, struct thread** thread_p, int...
  function thread_hold (line 286) | static void thread_hold () {
  type thread (line 302) | struct thread
  type sigaction (line 321) | struct sigaction
  function thread_destroy (line 376) | static void thread_destroy (thread* thread_p){
  function jobqueue_init (line 388) | static int jobqueue_init(thpool_* thpool_p){
  function jobqueue_clear (line 411) | static void jobqueue_clear(thpool_* thpool_p){
  function jobqueue_push (line 429) | static void jobqueue_push(thpool_* thpool_p, struct job* newjob){
  type job (line 455) | struct job
  function jobqueue_destroy (line 484) | static void jobqueue_destroy(thpool_* thpool_p){
  function bsem_init (line 497) | static void bsem_init(bsem *bsem_p, int value) {
  function bsem_reset (line 509) | static void bsem_reset(bsem *bsem_p) {
  function bsem_post (line 515) | static void bsem_post(bsem *bsem_p) {
  function bsem_post_all (line 524) | static void bsem_post_all(bsem *bsem_p) {
  function bsem_wait (line 533) | static void bsem_wait(bsem* bsem_p) {

FILE: src/tools/idb_extract.c
  type idb_file (line 36) | struct idb_file {
  type idb_entry (line 42) | struct __attribute__((packed)) idb_entry {
  function process_idb (line 49) | int process_idb(MFILE *mf){
  function main (line 147) | int main(int argc, char *argv[]){

FILE: src/tools/jffs2extract.c
  function main (line 15) | int main(int argc, char *argv[]){

FILE: src/tools/lzhs_scanner.c
  function scan_lzhs (line 17) | void scan_lzhs(const char *filename, int extract) {
  function main (line 90) | int main(int argc, char *argv[]) {

FILE: src/tools/lzhsenc.c
  function main (line 9) | int main(int argc, char *argv[]) {

FILE: src/tools/tsfile.c
  function main (line 8) | int main(int argc, char *argv[]){

FILE: src/util.c
  function count_tokens (line 101) | int count_tokens(const char *str, char tok, int sz){
  function print (line 111) | void print(int verbose, int newline, const char *fn, int lineno, const c...
  function SwapBytes (line 141) | void SwapBytes(void *pv, size_t n) {
  function getch (line 150) | void getch(void) {
  function hexdump (line 160) | void hexdump(const void *pAddressIn, long lSize) {
  function unlink_cb (line 207) | int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, st...
  function rmrf (line 214) | void rmrf(const char *path) {
  function err_ret (line 221) | int err_ret(const char *format, ...) {
  function createFolder (line 237) | void createFolder(const char *directory) {
  function MFILE (line 246) | MFILE *is_lz4(const char *lz4file) {
  function is_nfsb_mem (line 258) | bool is_nfsb_mem(MFILE *file, off_t offset){
  function MFILE (line 286) | MFILE *is_nfsb(const char *filename) {
  function unnfsb (line 299) | void unnfsb(const char *filename, const char *extractedFile) {
  function MFILE (line 326) | MFILE *is_gzip(const char *filename) {
  function is_jffs2 (line 356) | int is_jffs2(const char *filename) {
  function isSTRfile (line 377) | int isSTRfile(const char *filename) {
  function isdatetime (line 392) | int isdatetime(const char *datetime) {
  function detect_model (line 405) | static void detect_model(const struct p2_device_info *pid) {
  function isPartPakfile (line 447) | int isPartPakfile(const char *filename) {
  function is_kernel (line 478) | int is_kernel(const char *image_file) {
  function extract_kernel (line 494) | void extract_kernel(const char *image_file, const char *destination_file) {
  function asprintf_inplace (line 521) | int asprintf_inplace(char **strp, const char *fmt, ...) {

FILE: src/util_crypto.c
  function setKeyFile (line 18) | void setKeyFile(const char *keyFile){
  function setKeyFile_LG (line 24) | void setKeyFile_LG(){
  function setKeyFile_MTK (line 30) | void setKeyFile_MTK(){
  function KeyPair (line 36) | KeyPair *find_AES_key(uint8_t *in_data, size_t in_data_size, CompareFunc...
Condensed preview — 237 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,746K chars).
[
  {
    "path": ".cirrus.yml",
    "chars": 463,
    "preview": "env:\n  CIRRUS_CLONE_DEPTH: 1\n\nlinux_x64_task:\n  container:\n    cpu: 2\n    memory: 2G\n    image: gcc:15.2.0\n\n  install_sc"
  },
  {
    "path": ".editorconfig",
    "chars": 94,
    "preview": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".gitattributes",
    "chars": 318,
    "preview": "# auto-detect text files; use LF\n* text=auto eol=lf\n\n# text extensions\n*.txt text\n*.md text\n*.c text\n*.h text\n*.cpp text"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 1156,
    "preview": "name: SonarQube\non:\n  push:\n    branches:\n      - master\n      - develop\n  pull_request:\n    types: [opened, synchronize"
  },
  {
    "path": ".gitignore",
    "chars": 362,
    "preview": "### CMake ###\nCMakeCache.txt\nCMakeFiles\nMakefile\ncmake_install.cmake\ninstall_manifest.txt\n\n### C ###\n# Object files\n*.o\n"
  },
  {
    "path": ".sonarcloud_gen.sh",
    "chars": 726,
    "preview": "#!/bin/sh\ncsv_prop(){\n\techo -ne \"$1=\"\n\tcat | paste -sd,\n}\n\ngen(){\n\tcat <<-EOF\n\t## THIS FILE IS AUTOGENERATED\n\t## edit .s"
  },
  {
    "path": "AUTHORS",
    "chars": 365,
    "preview": "This project is covered by the GPL licence. See COPYING for details.\n\nepk2extract contributors list:\n- Arno1\n- cronix\n- "
  },
  {
    "path": "CMakeLists.txt",
    "chars": 565,
    "preview": "set(CMAKE_LEGACY_CYGWIN_WIN32 0)\n\ncmake_minimum_required(VERSION 3.13)\nproject(epk2extract)\n\nif( NOT CMAKE_BUILD_TYPE )\n"
  },
  {
    "path": "COPYING",
    "chars": 18092,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
  },
  {
    "path": "README.md",
    "chars": 4633,
    "preview": "[![Build Status](https://travis-ci.org/openlgtv/epk2extract.svg?branch=master)](https://travis-ci.org/openlgtv/epk2extra"
  },
  {
    "path": "build.sh",
    "chars": 2572,
    "preview": "#!/bin/bash\n#epk2extract build script\n#Copyright 2016 Smx <smxdev4@gmail.com>\n#All right reserved\n\nnormal='tput sgr0'\nlr"
  },
  {
    "path": "cmake-modules/FindLZO.cmake",
    "chars": 1071,
    "preview": "# Find liblzo2\n# LZO_FOUND - system has the LZO library\n# LZO_INCLUDE_DIR - the LZO include directory\n# LZO_LIBRARIES - "
  },
  {
    "path": "code_format.sh",
    "chars": 607,
    "preview": "#!/bin/bash\nfunction my_indent() {\n\tfile=\"$1\"\n\tindent \\\n\t\t--linux-style \\\n\t\t--use-tabs \\\n\t\t--tab-size4 \\\n\t\t--indent-leve"
  },
  {
    "path": "include/common.h",
    "chars": 765,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#ifndef __COMMON_H\n#define __COMMON_H\n\n/* Branch"
  },
  {
    "path": "include/config.h",
    "chars": 646,
    "preview": "/**\n * Copyright 20xx sirius\n * All right reserved\n */\n#ifndef CONFIG_H_\n#    define CONFIG_H_\n\n#include <stdbool.h>\n\nty"
  },
  {
    "path": "include/cramfs/cramfs.h",
    "chars": 1905,
    "preview": "#ifndef __CRAMFS_H\n#define __CRAMFS_H\n\n#define CRAMFS_MAGIC\t\t0x28cd3d45\n\t\t\t\t\t\t\t\t\t\t/* some random number */\n#define CRAMF"
  },
  {
    "path": "include/cramfs/cramfs_fs.h",
    "chars": 2956,
    "preview": "#ifndef __CRAMFS_FS_H\n#    define __CRAMFS_FS_H\n\n#    include <sys/types.h>\n\n#    define CRAMFS_MAGIC\t\t0x28cd3d45\n\t\t\t\t\t\t"
  },
  {
    "path": "include/cramfs/cramfsswap.h",
    "chars": 115,
    "preview": "#ifndef __CRAMFSSWAP_H\n#define __CRAMFSSWAP_H\nint cramswap(char *sinfile, char *soutfile);\n#endif //__CRAMFSSWAP_H\n"
  },
  {
    "path": "include/crc.h",
    "chars": 944,
    "preview": "/*\n**  CRC.H - header file for SNIPPETS CRC and checksum functions\n*/\n\n#ifndef CRC__H\n#    define CRC__H\n\n#    include <"
  },
  {
    "path": "include/epk.h",
    "chars": 1071,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n\n#ifndef __EPK_H\n#define __EPK_H\n#include <intty"
  },
  {
    "path": "include/epk1.h",
    "chars": 1204,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * Copyright 20?? sirius\n * All right reserved\n */"
  },
  {
    "path": "include/epk2.h",
    "chars": 1583,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#ifndef _EPK2_H_\n#define _EPK2_H_\n\n#include <std"
  },
  {
    "path": "include/epk3.h",
    "chars": 3131,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n\n#ifndef __EPK3_H\n#define __EPK3_H\n#include \"mfi"
  },
  {
    "path": "include/jffs2/jffs2.h",
    "chars": 7036,
    "preview": "/*\n * JFFS2 -- Journalling Flash File System, Version 2.\n *\n * Copyright © 2001-2007 Red Hat, Inc.\n * Copyright © 2004-2"
  },
  {
    "path": "include/jffs2/mini_inflate.h",
    "chars": 2864,
    "preview": "/*-------------------------------------------------------------------------\n * Filename:      mini_inflate.h\n * Version:"
  },
  {
    "path": "include/log.h",
    "chars": 1985,
    "preview": "#ifndef _LOG_H_\n#    define _LOG_H_\n/*\n* Copyright (c) 2011 Roman Tokarev <roman.s.tokarev@gmail.com>\n* All rights reser"
  },
  {
    "path": "include/lz4/bench.h",
    "chars": 1251,
    "preview": "/*\n    bench.h - Demo program to benchmark open-source compression algorithm\n    Copyright (C) Yann Collet 2012\n\n    Thi"
  },
  {
    "path": "include/lz4/lz4.h",
    "chars": 5194,
    "preview": "/*\n   LZ4 - Fast LZ compression algorithm\n   Header File\n   Copyright (C) 2011-2012, Yann Collet.\n   BSD 2-Clause Licens"
  },
  {
    "path": "include/lz4/lz4hc.h",
    "chars": 2230,
    "preview": "/*\n   LZ4 HC - High Compression Mode of LZ4\n   Header File\n   Copyright (C) 2011-2012, Yann Collet.\n   BSD 2-Clause Lice"
  },
  {
    "path": "include/lzhs/lzhs.h",
    "chars": 1773,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * All right reserved\n */\n#ifndef _LZHS_H\n#define "
  },
  {
    "path": "include/lzhs/tables.h",
    "chars": 15800,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * All right reserved\n */\n#ifndef _LZHS_TAB_H\n#   "
  },
  {
    "path": "include/lzma/LzFind.h",
    "chars": 3290,
    "preview": "/* LzFind.h -- Match finder for LZ algorithms\n2009-04-22 : Igor Pavlov : Public domain */\n\n#ifndef __LZ_FIND_H\n#define _"
  },
  {
    "path": "include/lzma/LzHash.h",
    "chars": 1964,
    "preview": "/* LzHash.h -- HASH functions for LZ algorithms\n2009-02-07 : Igor Pavlov : Public domain */\n\n#ifndef __LZ_HASH_H\n#define"
  },
  {
    "path": "include/lzma/LzmaDec.h",
    "chars": 6859,
    "preview": "/* LzmaDec.h -- LZMA Decoder\n2009-02-07 : Igor Pavlov : Public domain */\n\n#ifndef __LZMA_DEC_H\n#define __LZMA_DEC_H\n\n#in"
  },
  {
    "path": "include/lzma/LzmaEnc.h",
    "chars": 2905,
    "preview": "/*  LzmaEnc.h -- LZMA Encoder\n2009-02-07 : Igor Pavlov : Public domain */\n\n#ifndef __LZMA_ENC_H\n#define __LZMA_ENC_H\n\n#i"
  },
  {
    "path": "include/lzma/Types.h",
    "chars": 4876,
    "preview": "/* Types.h -- Basic types\n2009-11-23 : Igor Pavlov : Public domain */\n\n#ifndef __7Z_TYPES_H\n#define __7Z_TYPES_H\n\n#inclu"
  },
  {
    "path": "include/lzma.h",
    "chars": 975,
    "preview": "#pragma once\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <string.h>\n#includ"
  },
  {
    "path": "include/lzo/lzo.h",
    "chars": 157,
    "preview": "#ifndef __LZO_LG_H\n#define __LZO_LG_H\nint check_lzo_header(const char *name);\nint lzo_unpack(const char *in_name, const "
  },
  {
    "path": "include/lzo/miniacc.h",
    "chars": 263885,
    "preview": "/* ACC --- Automatic Compiler Configuration\n\n   This file is part of the LZO real-time data compression library.\n\n   Cop"
  },
  {
    "path": "include/lzo/portab.h",
    "chars": 5286,
    "preview": "/* portab.h -- portability layer\n\n   This file is part of the LZO real-time data compression library.\n\n   Copyright (C) "
  },
  {
    "path": "include/lzo/portab_a.h",
    "chars": 4418,
    "preview": "/* portab_a.h -- advanced portability layer\n\n   This file is part of the LZO real-time data compression library.\n\n   Cop"
  },
  {
    "path": "include/main.h",
    "chars": 208,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n\n#ifndef __MAIN_H\n#define __MAIN_H\n#include \"con"
  },
  {
    "path": "include/mediatek.h",
    "chars": 896,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * All right reserved\n */\n\n#ifndef __MEDIATEK_H\n#d"
  },
  {
    "path": "include/mediatek_pkg.h",
    "chars": 2253,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n\n#ifndef __MTKPKG_H\n#define __MTKPKG_H\n#include "
  },
  {
    "path": "include/mfile.h",
    "chars": 1788,
    "preview": "/*\n\tA mmap file wrapper\n\tCopyright 2016 Smx\n*/\n#ifndef __MFILE_H\n#define __MFILE_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#end"
  },
  {
    "path": "include/minigzip.h",
    "chars": 416,
    "preview": "#ifndef MINIGZIP_H\n#define MINIGZIP_H\n#include <zlib.h>\n\nvoid error(const char *msg);\nvoid gz_compress(FILE * in, gzFile"
  },
  {
    "path": "include/os_byteswap.h",
    "chars": 373,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#ifndef BYTESWAP_H\n#define\tBYTESWAP_H\n\n#define S"
  },
  {
    "path": "include/osx/elf.h",
    "chars": 117729,
    "preview": "/* This is the original elf.h file from the GNU C Library; I only removed\n   the inclusion of feature.h, which is not ne"
  },
  {
    "path": "include/philips.h",
    "chars": 754,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#ifndef __PHILIPS_H\n#define __PHILIPS_H\n\n#includ"
  },
  {
    "path": "include/realtek/rtsplit.h",
    "chars": 421,
    "preview": "#ifndef __RT_AVSPLIT_H__\n#define __RT_AVSPLIT_H__\n\n#define HEADER_AUDIO1_IMAGE\t0x5353beef\n#define HEADER_AUDIO2_IMAGE\t0x"
  },
  {
    "path": "include/realtek.h",
    "chars": 166,
    "preview": "#ifndef __REALTEK_H\n#define __REALTEK_H\n\n#include \"mfile.h\"\nMFILE *is_rtk_bspfw(const char *filename);\nvoid split_rtk_bs"
  },
  {
    "path": "include/sniptype.h",
    "chars": 1697,
    "preview": "/*\n**  SNIPTYPE.H - Include file for SNIPPETS data types and commonly used macros\n*/\n\n#ifndef SNIPTYPE__H\n#    define SN"
  },
  {
    "path": "include/squashfs/action.h",
    "chars": 5731,
    "preview": "#ifndef ACTION_H\n#    define ACTION_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * file"
  },
  {
    "path": "include/squashfs/caches-queues-lists.h",
    "chars": 5619,
    "preview": "#ifndef CACHES_QUEUES_LISTS_H\n#    define CACHES_QUEUES_LISTS_H\n/*\n * Create a squashfs filesystem.  This is a highly co"
  },
  {
    "path": "include/squashfs/compressor.h",
    "chars": 3412,
    "preview": "#ifndef COMPRESSOR_H\n#    define COMPRESSOR_H\n/*\n *\n * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014\n * Phillip Lough"
  },
  {
    "path": "include/squashfs/error.h",
    "chars": 2227,
    "preview": "#ifndef ERROR_H\n#    define ERROR_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * filesy"
  },
  {
    "path": "include/squashfs/gzip_wrapper.h",
    "chars": 1938,
    "preview": "#ifndef GZIP_WRAPPER_H\n#    define GZIP_WRAPPER_H\n/*\n * Squashfs\n *\n * Copyright (c) 2014\n * Phillip Lougher <phillip@sq"
  },
  {
    "path": "include/squashfs/info.h",
    "chars": 1017,
    "preview": "#ifndef INFO_H\n#    define INFO_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * filesyst"
  },
  {
    "path": "include/squashfs/lz4_wrapper.h",
    "chars": 1679,
    "preview": "#ifndef LZ4_WRAPPER_H\n#    define LZ4_WRAPPER_H\n/*\n * Squashfs\n *\n * Copyright (c) 2013\n * Phillip Lougher <phillip@squa"
  },
  {
    "path": "include/squashfs/lzo_wrapper.h",
    "chars": 2130,
    "preview": "#ifndef LZO_WRAPPER_H\n#    define LZO_WRAPPER_H\n/*\n * Squashfs\n *\n * Copyright (c) 2013\n * Phillip Lougher <phillip@squa"
  },
  {
    "path": "include/squashfs/mksquashfs.h",
    "chars": 3986,
    "preview": "#ifndef MKSQUASHFS_H\n#    define MKSQUASHFS_H\n/*\n * Squashfs\n *\n * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 200"
  },
  {
    "path": "include/squashfs/process_fragments.h",
    "chars": 1024,
    "preview": "#ifndef PROCESS_FRAGMENTS_H\n#    define PROCESS_FRAGMENTS_H\n/*\n * Create a squashfs filesystem.  This is a highly compre"
  },
  {
    "path": "include/squashfs/progressbar.h",
    "chars": 1207,
    "preview": "#ifndef PROGRESSBAR_H\n#    define PROGRESSBAR_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed read on"
  },
  {
    "path": "include/squashfs/pseudo.h",
    "chars": 1642,
    "preview": "#ifndef PSEUDO_H\n#    define PSEUDO_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * file"
  },
  {
    "path": "include/squashfs/read_fs.h",
    "chars": 1418,
    "preview": "#ifndef READ_FS_H\n#    define READ_FS_H\n/*\n * Squashfs\n *\n * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 200"
  },
  {
    "path": "include/squashfs/restore.h",
    "chars": 971,
    "preview": "#ifndef RESTORE_H\n#    define RESTORE_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * fi"
  },
  {
    "path": "include/squashfs/sort.h",
    "chars": 1216,
    "preview": "#ifndef SORT_H\n#    define SORT_H\n\n/*\n * Squashfs\n *\n * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 20"
  },
  {
    "path": "include/squashfs/squashfs_compat.h",
    "chars": 26428,
    "preview": "#ifndef SQUASHFS_COMPAT\n#    define SQUASHFS_COMPAT\n/*\n * Squashfs\n *\n * Copyright (c) 2002, 2003, 2004, 2005, 2006, 200"
  },
  {
    "path": "include/squashfs/squashfs_fs.h",
    "chars": 13308,
    "preview": "#ifndef SQUASHFS_FS\n#    define SQUASHFS_FS\n/*\n * Squashfs\n *\n * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008,"
  },
  {
    "path": "include/squashfs/squashfs_swap.h",
    "chars": 21545,
    "preview": "#ifndef SQUASHFS_SWAP_H\n#    define SQUASHFS_SWAP_H\n/*\n * Squashfs\n *\n * Copyright (c) 2008, 2009, 2010, 2013, 2014\n * P"
  },
  {
    "path": "include/squashfs/unsquashfs.h",
    "chars": 7113,
    "preview": "#ifndef UNSQUASHFS_H\n#    define UNSQUASHFS_H\n/*\n * Unsquash a squashfs filesystem.  This is a highly compressed read on"
  },
  {
    "path": "include/squashfs/unsquashfs_info.h",
    "chars": 1040,
    "preview": "#ifndef UNSQUASHFS_INFO_H\n#    define UNSQUASHFS_INFO_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed"
  },
  {
    "path": "include/squashfs/xattr.h",
    "chars": 4088,
    "preview": "#ifndef XATTR_H\n#    define XATTR_H\n/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * filesy"
  },
  {
    "path": "include/squashfs/xz_wrapper.h",
    "chars": 1728,
    "preview": "#ifndef XZ_WRAPPER_H\n#    define XZ_WRAPPER_H\n/*\n * Squashfs\n *\n * Copyright (c) 2010\n * Phillip Lougher <phillip@squash"
  },
  {
    "path": "include/stream/crc32.h",
    "chars": 132,
    "preview": "#ifndef CRC32_H\n#define CRC32_H\n\n#include <stdint.h>\nuint32_t str_crc32(const unsigned char *data, int len);\n\n#endif /* "
  },
  {
    "path": "include/stream/tsfile.h",
    "chars": 405,
    "preview": "/**\n * Copyright 2016 lprot\n * All right reserved\n */\n#ifndef __TSFILE_H\n#define __TSFILE_H\n#include <stdint.h>\n\nstruct "
  },
  {
    "path": "include/symfile.h",
    "chars": 2178,
    "preview": "#ifndef _SYMFILE_H_\n#    define _SYMFILE_H_\n/*\n * Copyright (c) 2011 Roman Tokarev <roman.s.tokarev@gmail.com>\n * All ri"
  },
  {
    "path": "include/thpool.h",
    "chars": 4130,
    "preview": "/**********************************\n * @author      Johan Hanssen Seferidis\n * License:     MIT\n *\n ********************"
  },
  {
    "path": "include/u-boot/image.h",
    "chars": 6762,
    "preview": "/*\n * (C) Copyright 2000-2005\n * Wolfgang Denk, DENX Software Engineering, wd@denx.de.\n *\n * See file CREDITS for list o"
  },
  {
    "path": "include/u-boot/mtdinfo.h",
    "chars": 1340,
    "preview": "#ifndef _MTD_INFO_H_\n#    define _MTD_INFO_H_\n\n#    define STR_LEN_MAX\t\t\t\t\t32\n#    define MTD_MAP_MAX\t\t\t\t\t4\n\nstruct m_de"
  },
  {
    "path": "include/u-boot/partcommon.h",
    "chars": 982,
    "preview": "#ifndef _PART_COMMON_H_\n#define _PART_COMMON_H_\n\n#define U64_UPPER(x)\t(unsigned long)( (x) >> 32 )\n#define U64_LOWER(x)\t"
  },
  {
    "path": "include/u-boot/partinfo.h",
    "chars": 144,
    "preview": "#ifndef _PARTINFO_H_\n#define _PARTINFO_H_\n\n#include \"partcommon.h\"\n#include \"partinfov1.h\"\n#include \"partinfov2.h\"\n#incl"
  },
  {
    "path": "include/u-boot/partinfov1.h",
    "chars": 1460,
    "preview": "#ifndef _PART_INFO1_H_\n#define _PART_INFO1_H_\n\nstruct p1_device_info {\n\tchar name[STR_LEN_MAX];\n\tunsigned int size;\n\tuns"
  },
  {
    "path": "include/u-boot/partinfov2.h",
    "chars": 1514,
    "preview": "#ifndef _PART_INFO2_H_\n#define _PART_INFO2_H_\n\n#define P2_PARTITION_MAX\t\t\t\t128\n\nstruct p2_device_info {\n\tchar name[STR_L"
  },
  {
    "path": "include/util.h",
    "chars": 2087,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * All right reserved\n */\n#ifndef __UTIL_H\n#define"
  },
  {
    "path": "include/util_crypto.h",
    "chars": 887,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#ifndef __UTIL_CRYPTO_H\n#define __UTIL_CRYPTO_H\n"
  },
  {
    "path": "keys/AES.key",
    "chars": 9441,
    "preview": "# OTAIDs are examples for testing keys\n\n# unknown\n214BF3C129547AF31D32A5ECB4742192\n\n# common\n1F1E1D1C1B1A191807060504030"
  },
  {
    "path": "keys/MTK.key",
    "chars": 828,
    "preview": "09291094092910940929109409291094,00000000000000000000000000000000 # Mediatek Generic (Hisense, Sharp, Philips)\n536861725"
  },
  {
    "path": "keys/README.md",
    "chars": 69,
    "preview": "keys\n===========\nPlace keys in this folder before running ./build.sh\n"
  },
  {
    "path": "keys/e60.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3pE29z9xS/7WmMScGR/q\nm/o7S3kN6vmuNgb9XjItG6K5z9sG"
  },
  {
    "path": "keys/e60n.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvFix6BZ9npNUCNtzDDK0\njXPukBfR+VJ5tj21pq+R4YUf4Imr"
  },
  {
    "path": "keys/general_pub.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6cC7osaLYH//AoKB1LRSrtSVA\nxQ2335JyMhdnrGqR/xvJV5tT04qh"
  },
  {
    "path": "keys/h15.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBc5hEow2FPG39zb01yc9Y6qSR\nq8c5oc/MxiK6xEFHNHEuDNLjYlPx"
  },
  {
    "path": "keys/k24.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwLZOuhlUJ18bJO7Psuy9\n82Wf6b0k+JRc+H34HUiFeQcdZfHz"
  },
  {
    "path": "keys/k24n.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv/jTYXIo3u/Z9+lF6wt0\n+b7boSJiOGuNMW1iBhkCQ5EkQIT2"
  },
  {
    "path": "keys/k24t.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5BL+M/GUNZXNWQKXQk9z\nj9sGxiu7nNvaE8MNQaXE4IvgpgKN"
  },
  {
    "path": "keys/k25lp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0i/S5OoP3jXho4xqWOl1\niLwlY6VT1IUftj0HPIFw+Qrjj+YS"
  },
  {
    "path": "keys/k2l.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzsNSLkOElA4UKtRn7Qsp\nYgj/LK8q6aRJMPxsYBd95D5ke19g"
  },
  {
    "path": "keys/k2lp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwbWxWkw05RXCaq/HQO81\ndPH69hMfnZuoACcLzALdQPm8oqxj"
  },
  {
    "path": "keys/k3lp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAum5ztLc/35cYpt0b0D32\nZe1ybhcfWbX9T825QDPE10ifscpP"
  },
  {
    "path": "keys/k5lp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwJHtUEdVgac2azz1Vox8\nXZ/zz7aidg0GdQb7jJlUg/Juzce6"
  },
  {
    "path": "keys/k6hp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAraYnQnvLAx6FSUtZFdQN\nTpevqZEHW2uecg0lD29EeZtjRQOo"
  },
  {
    "path": "keys/k6lp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA22/3Vjzu0ugJ8pqi7qBN\njxYKOOWXMc7QuV1nLxPQJbYP5hqs"
  },
  {
    "path": "keys/k6lpfhd.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAorYkswYwAHhkADI/WHX9\ni3kyA3wNLofMLCowgDEA4kAIYiKA"
  },
  {
    "path": "keys/k6lpwee.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyrIvtRFT4n0WUgofQ1wY\npwpmKqMu51ga9fc/d8xygJp90DVD"
  },
  {
    "path": "keys/k7lp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoy1elAjV817rKDn/XHP4\nMc/+SwF4AMwLrypz8XvPcMkJzY4R"
  },
  {
    "path": "keys/k8ap.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxtAEdg21wMUIoQlMkgG5\nhRzL+4ygqRD5rzNjMSAvMBSg74v9"
  },
  {
    "path": "keys/k8apwee.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzjJEGvo2WtRM9dXNKLzt\nWxz7b+RTZMI+W5odPdehFg4BSmre"
  },
  {
    "path": "keys/k8hp-hotel.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuyyswa5/CCR1+MGKFT6M\nYM9r+uNWig3SmHiFeJwrGl24JUPu"
  },
  {
    "path": "keys/k8hp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6Hjzub5HrR1OhHqrE7fN\nH3rL/GH8pAeYZZDvPNyrBiZeoBSo"
  },
  {
    "path": "keys/k8hpp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2MDSxR5OrlAXB48c7i0U\nFAz0fRKoy99oKK9J0s01tWhrO3au"
  },
  {
    "path": "keys/k8hpt.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7E0eMvzsQWEdQGd1yuRQ\ni1HoICLdxX9e/cuOia/C347Lk5LL"
  },
  {
    "path": "keys/k8hpwee.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0YJdfY4oum0tMLj87Hw6\nYCYRg7Fcjxa6W0PzDyR+9kYAjw+U"
  },
  {
    "path": "keys/k8lp-hotel.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8KDgT0wlg0ewQE/9Wok2\nudDba0SaCzahjnliI/u8KZekWmMg"
  },
  {
    "path": "keys/k8lp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAngeMYnN8sMfSeC0yHSi8\n5vjv1TAscgAlXdAZFyr7FAjDyqDf"
  },
  {
    "path": "keys/k8lpn-hotel.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvPBfk1NJ8kSGQp1s1vUK\nPlo2HlPBoxwmQ5I2JJ0SGOWzU7zv"
  },
  {
    "path": "keys/k8lpn.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyeGtobAu/iCQunfBtoef\nA9AuuDk8Kduo8pM3aB6b5i8b6HoL"
  },
  {
    "path": "keys/k8lpn2.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8sedOqOxQqv+4yK07arG\nWxt8j8IthE8G0YNN6Im9SB3MOWxi"
  },
  {
    "path": "keys/k8lpwee.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkRlJrTu2qgIUibttxPqv\n2unfjfDWk3aF7CjUrCCM3WV+Rzjo"
  },
  {
    "path": "keys/kf23f-mnt.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1msQhd8jun9HD6ZMJeLv\n530rCgotQZRgvHVUBOhN95yQbmnV"
  },
  {
    "path": "keys/kf23f.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxHkWUXttsB/dAvjh0dLm\nBCd3h//QOmcBPvQUMirVHv6w0fnZ"
  },
  {
    "path": "keys/kf23fwee.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAse+KN3Tj1YZdkc9AUVx/\nmy7QekrbDY6xdcqifU1HRDJEYL7t"
  },
  {
    "path": "keys/kid23q.pem",
    "chars": 458,
    "preview": "-----BEGIN PUBLIC KEY-----\r\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApaY5LP7/8EMb/72h7prT\r\nT6k8v5heHhvqAYANOOcEI6zz9Q"
  },
  {
    "path": "keys/lg1152.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkNkhcArb1al1SWazlsT6lAdA7\noq1lqOkC0ullyDveuJJTjfordgGx"
  },
  {
    "path": "keys/lg1154_netcast.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkh+pwyk0MCwTkjTQTc7+SKhao\nWZ8RjphJHJo/J911E23waJS3uBU7"
  },
  {
    "path": "keys/lg1154_webos.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjyC+5bEEE25JvwZxASvbkoF1t\n/zs7jgkj2Vv2yoPMAdHan9PumHYo"
  },
  {
    "path": "keys/lm14.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3CAuN+IdjzWOQIsL60Y7+I813\nn7Ra0U1EmumjtO0YeLAY1k1HLhdp"
  },
  {
    "path": "keys/lm15u.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOJne7d1AULNFGTe/soOcYhUsN\ntKXlglSCxV9eR/WsfdOtMCJtoewB"
  },
  {
    "path": "keys/lm18a.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq9yS4v9QyOoX5NP4y9mQ\naAi6S4qoLTJon61p5PmyAS07xTU9"
  },
  {
    "path": "keys/lm21a.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtXZUiPWMvvDIzZi8bZHA\nrmSNQnXVgcYVLJG5Y8EnFFPcu4Yi"
  },
  {
    "path": "keys/lm21an.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvmH6LxtCAWEbiSWDwfAj\nG4AVATdk5lc2zmPQB6Qv4rQfZcwS"
  },
  {
    "path": "keys/lm21ann.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApFnPQdukfvMBBW2euXBw\nY2djHEecfMbc/GI8axwSFwldAo4M"
  },
  {
    "path": "keys/lm21u.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz49aVG3dPRd98oTlw5DN\nL8iGZacnoeRxkqjwAtlI9Bl7Rujf"
  },
  {
    "path": "keys/lm21ut.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx3RrEqzeR8db8ZtpVGFl\nQSc48VYW/ckMHTStUhFOLz0G3h98"
  },
  {
    "path": "keys/m14.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC94ihi++eWPZHV2x14kz8KvaWu\nsuSOQPLMUvH4mppctZIMDm65XX1X"
  },
  {
    "path": "keys/m16.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8FNygls/BI8MQnLCczjr\nSjKWNyC3nuwrtmJYT51JzI2oq1Q/"
  },
  {
    "path": "keys/m16p.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsFK3Fw+If1BMF2epkKBY\n/RuSPBMD448ZDq5Sved31VPtYflC"
  },
  {
    "path": "keys/m16p3.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz7WrBwmE+jel2wBUeFtb\noV93IbGcwoRVfGA6j0G5rN/oCGVs"
  },
  {
    "path": "keys/m16pp.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnP+kj6qXfiiSMa/mN/dC\nP/vasilwyu0DLKrOkJb+X00IY9LS"
  },
  {
    "path": "keys/m23.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5cBUq+bAeiSsj45B4cvi\noHxeKj1aU7VUrP+f/ll8TQg5dOG7"
  },
  {
    "path": "keys/m2_sspm.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEpUSxzbMqpwvKLn2FKTyQHuUY\nh5f/qydAwKOXPwN9IPVyxH3OiiyI"
  },
  {
    "path": "keys/m3.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz4Vi5HM4NsE09eCLCQXX\n8DNGWA/XFF2Fycs0Ki4aih2drl/G"
  },
  {
    "path": "keys/mtk5369.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDL0sBwpPjjT9yYZPpXej4/TW7f\nERA/rCDHPtZwb3YBFy40g45XAvju"
  },
  {
    "path": "keys/mtk5398.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDyVpYMXOhXKj4pkSv6ROs6kaQp\nTjCKzR71mf3Upw1YmrXhFT+nNCtj"
  },
  {
    "path": "keys/netflix_pub.pem",
    "chars": 272,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6Qu5GAw/ITjDcuHnSTZP56fRT\njtdCZj2SDdDtMP7MOJ2GoCRA8kRk"
  },
  {
    "path": "keys/o18.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/HyMayJG0kzUA9XKbxi\nrE4vOqVZKtlVJj8bzQAUtoxxguQD"
  },
  {
    "path": "keys/o18_2019.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2cLO2n6G4YkXuxOvGNoG\nh32B3Zl7a6fJEg1rOb6yjo1YsfQ2"
  },
  {
    "path": "keys/o18k.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv4VvbWUx/5imL7lUyBJK\nABGPNAPjVT4w3BRCwVOAkITtMk2V"
  },
  {
    "path": "keys/o20.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwbLByTYxeXUTG/+8nndC\nfoFPXU75yEi2LXTKrpa6vIO6AKFa"
  },
  {
    "path": "keys/o208k.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn2T8zysvjAQgAAelDcZ0\nB1ONDwzFYmSCS67vT1/mzOi8xuiV"
  },
  {
    "path": "keys/o20n.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt+9X5Iu6Z9fxu5egIpsb\n5yWadtIk8aYNggd5EFBJoiO/oD0z"
  },
  {
    "path": "keys/o22.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs+tQtULZxECErZGR9mfy\nf9ieRBkISQ7gOTCKcV6VD0e4ifnA"
  },
  {
    "path": "keys/o22n.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwDunPi+oDUiwolB2kMZB\nIKHAHdd0zGMT+RrbqsQFKozRfdZj"
  },
  {
    "path": "keys/o22n2.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhi0GGEK2o7GrmGsMXSz3\n3pJNJ2sUdp36IdqJBgxYuJMO2QPv"
  },
  {
    "path": "keys/o22n28k.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7ktbTHcQcFld59Vn9dXy\nivgkaVKYG8vhRdQRUMvEjP8O+Nga"
  },
  {
    "path": "keys/o22n3.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvEh5Njtd5dL7Bv0Bemo4\n8KL0/kPtJeVF5Alc6n2nC6mLpSdE"
  },
  {
    "path": "keys/o24.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3Tg2oafPMSxlLX8uPIXh\n1rsn8Zx5GNvahJjxKYBftrgS96c8"
  },
  {
    "path": "keys/o24n.pem",
    "chars": 451,
    "preview": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApPw4IzWaja49cPlyZl15\n7XAsJIETa1RhuN+gxih8iNZy2/hk"
  },
  {
    "path": "partinfo.py",
    "chars": 7837,
    "preview": "#!/usr/bin/env python2\nimport os, struct, sys, binascii, datetime, fnmatch\ndef allzero(string):\n        for x in string:"
  },
  {
    "path": "sonar-project.properties",
    "chars": 448,
    "preview": "## THIS FILE IS AUTOGENERATED\n## edit .sonarcloud_gen.sh instead\nsonar.projectKey=openlgtv_epk2extract\nsonar.organizatio"
  },
  {
    "path": "src/CMakeLists.txt",
    "chars": 1047,
    "preview": "set(INC ${CMAKE_SOURCE_DIR}/include)\n\nadd_definitions(-D_GNU_SOURCE)\n\nif(APPLE)\n\tinclude_directories(SYSTEM ${INC}/osx)\n"
  },
  {
    "path": "src/cramfs/CMakeLists.txt",
    "chars": 109,
    "preview": "add_library(cramfs cramfsswap.c uncramfs.c)\ntarget_include_directories(cramfs PUBLIC\n\t${INC}\n\t${INC}/cramfs\n)"
  },
  {
    "path": "src/cramfs/cramfsswap.c",
    "chars": 9877,
    "preview": "/*\n    cramfsswap - swaps endian of a cramfs file\n\n    last modified on 2006-11-08 by kju\n\n    Copyright (c) 2004-2006 b"
  },
  {
    "path": "src/cramfs/uncramfs.c",
    "chars": 16136,
    "preview": "//\n// Uncramfs\n// A program to unpack a cramfs image\n//\n// Copyright Andrew Stitcher, 2001\n//\n// Licensed according to t"
  },
  {
    "path": "src/crc32.c",
    "chars": 8326,
    "preview": "/* Crc - 32 BIT ANSI X3.66 CRC checksum files */\n\n#include <stdio.h>\n#include \"crc.h\"\n\n#ifdef __TURBOC__\n#    pragma war"
  },
  {
    "path": "src/epk.c",
    "chars": 8365,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#include <stdio.h>\n#include <stdlib.h>\n#include "
  },
  {
    "path": "src/epk1.c",
    "chars": 8860,
    "preview": "/**\n * EPK v1 handling\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * Copyright 20?? sirius\n * All"
  },
  {
    "path": "src/epk2.c",
    "chars": 8109,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#include <sys/mman.h>\n#include <fcntl.h>\n#includ"
  },
  {
    "path": "src/epk3.c",
    "chars": 8295,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#include <stdio.h>\n#include <stdlib.h>\n#include "
  },
  {
    "path": "src/jffs2/CMakeLists.txt",
    "chars": 208,
    "preview": "add_library(jffs2 crc32.cpp jffs2extract.cpp mini_inflate.cpp)\ntarget_include_directories(jffs2 PUBLIC\n\t${INC}\n\t${LZO_IN"
  },
  {
    "path": "src/jffs2/crc32.cpp",
    "chars": 3891,
    "preview": "unsigned long crc32(unsigned long, const unsigned char *, unsigned int);\n\nstatic const unsigned long crc_table[256] = {\n"
  },
  {
    "path": "src/jffs2/jffs2extract.cpp",
    "chars": 19100,
    "preview": "/*\n * a very simple jffs2 unpacker.\n * algorithm is memory intensive but has (almost) linear complexity.\n * at first, th"
  },
  {
    "path": "src/jffs2/mini_inflate.cpp",
    "chars": 12125,
    "preview": "/*-------------------------------------------------------------------------\n * Filename:      mini_inflate.c\n * Version:"
  },
  {
    "path": "src/lz4/CMakeLists.txt",
    "chars": 90,
    "preview": "add_library(lz4 lz4.c lz4hc.c lz4demo.c)\ntarget_include_directories(lz4 PUBLIC ${INC}/lz4)"
  },
  {
    "path": "src/lz4/bench.c",
    "chars": 11972,
    "preview": "/*\n    bench.c - Demo program to benchmark open-source compression algorithm\n    Copyright (C) Yann Collet 2012\n\tGPL v2 "
  },
  {
    "path": "src/lz4/lz4.c",
    "chars": 26050,
    "preview": "/*\n   LZ4 - Fast LZ compression algorithm\n   Copyright (C) 2011-2012, Yann Collet.\n   BSD 2-Clause License (http://www.o"
  },
  {
    "path": "src/lz4/lz4_format_description.txt",
    "chars": 4864,
    "preview": "LZ4 Format Description\nLast revised: 2012-02-27\nAuthor : Y. Collet\n\n\n\nThis small specification intents to provide enough"
  },
  {
    "path": "src/lz4/lz4demo.c",
    "chars": 11776,
    "preview": "/*\n    LZ4Demo - Demo CLI program using LZ4 compression\n    Copyright (C) Yann Collet 2011-2012\n\tGPL v2 License\n\n    Thi"
  },
  {
    "path": "src/lz4/lz4hc.c",
    "chars": 19066,
    "preview": "/*\n   LZ4 HC - High Compression Mode of LZ4\n   Copyright (C) 2011-2012, Yann Collet.\n   BSD 2-Clause License (http://www"
  },
  {
    "path": "src/lzhs/CMakeLists.txt",
    "chars": 70,
    "preview": "add_library(lzhs lzhs.c lzhs_lib.c)\ntarget_link_libraries(lzhs utils)\n"
  },
  {
    "path": "src/lzhs/lzhs.c",
    "chars": 12119,
    "preview": "/**\n * LZHS Encoder\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * All right reserved\n */\n/*******"
  },
  {
    "path": "src/lzhs/lzhs_lib.c",
    "chars": 10560,
    "preview": "/**\n * LZHS Encoder\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * All right reserved\n */\n#include"
  },
  {
    "path": "src/lzma/CMakeLists.txt",
    "chars": 93,
    "preview": "add_library(lzma LzFind.c LzmaDec.c LzmaEnc.c)\ntarget_include_directories(lzma PUBLIC ${INC})"
  },
  {
    "path": "src/lzma/LzFind.c",
    "chars": 19718,
    "preview": "/* LzFind.c -- Match finder for LZ algorithms\n2009-04-22 : Igor Pavlov : Public domain */\n\n#include <string.h>\n\n#include"
  },
  {
    "path": "src/lzma/LzmaDec.c",
    "chars": 27145,
    "preview": "/* LzmaDec.c -- LZMA Decoder\n2009-09-20 : Igor Pavlov : Public domain */\n\n#include \"lzma/LzmaDec.h\"\n\n#include <string.h>"
  },
  {
    "path": "src/lzma/LzmaEnc.c",
    "chars": 62424,
    "preview": "/* LzmaEnc.c -- LZMA Encoder\n2009-11-24 : Igor Pavlov : Public domain */\n\n#include <string.h>\n\n/* #define SHOW_STAT */\n/"
  },
  {
    "path": "src/lzo-lg.c",
    "chars": 12550,
    "preview": "/* lzopack.c -- LZO example program: a simple file packer\n\n This file is part of the LZO real-time data compression libr"
  },
  {
    "path": "src/main.c",
    "chars": 9507,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * Copyright 2016 lprot\n * Copyright 20?? sirius\n * All right reserved\n */"
  },
  {
    "path": "src/mediatek.c",
    "chars": 2773,
    "preview": "/**\n * Mediatek bootloader handling\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#include <stdio."
  },
  {
    "path": "src/mediatek_pkg.c",
    "chars": 15327,
    "preview": "/**\n * Mediatek PKG Handling\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#include <unistd.h>\n#in"
  },
  {
    "path": "src/mfile.c",
    "chars": 4600,
    "preview": "/**\n * mmap file wrapper\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#include <stdio.h>\n#include"
  },
  {
    "path": "src/minigzip.c",
    "chars": 13652,
    "preview": "/* minigzip.c -- simulate gzip using the zlib compression library\n * Copyright (C) 1995-2006, 2010, 2011 Jean-loup Gaill"
  },
  {
    "path": "src/partinfo.c",
    "chars": 8176,
    "preview": "/**\n * LG partition table decoder\n * Original code from u-boot GPL package\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * "
  },
  {
    "path": "src/philips.c",
    "chars": 2046,
    "preview": "/**\n * Copyright 2016 Smx <smxdev4@gmail.com>\n * All right reserved\n */\n#include <stdio.h>\n#include <stdlib.h>\n#include "
  },
  {
    "path": "src/realtek.c",
    "chars": 2272,
    "preview": "#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <string.h>\n#include <errno.h>\n\n#include \"mfile.h\"\n#i"
  },
  {
    "path": "src/squashfs/CMakeLists.txt",
    "chars": 404,
    "preview": "add_library(squashfs compressor.c gzip_wrapper.c lzo_wrapper.c swap.c read_xattrs.c unsquash-1.c unsquash-2.c unsquash-3"
  },
  {
    "path": "src/squashfs/action.c",
    "chars": 50183,
    "preview": "/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * filesystem.\n *\n * Copyright (c) 2011, 2012"
  },
  {
    "path": "src/squashfs/caches-queues-lists.c",
    "chars": 15758,
    "preview": "/*\n * Create a squashfs filesystem.  This is a highly compressed read only\n * filesystem.\n *\n * Copyright (c) 2013, 2014"
  },
  {
    "path": "src/squashfs/compressor.c",
    "chars": 2835,
    "preview": "/*\n *\n * Copyright (c) 2009, 2010, 2011\n * Phillip Lougher <phillip@squashfs.org.uk>\n *\n * This program is free software"
  },
  {
    "path": "src/squashfs/gzip_wrapper.c",
    "chars": 12805,
    "preview": "/*\n * Copyright (c) 2009, 2010, 2013, 2014\n * Phillip Lougher <phillip@squashfs.org.uk>\n *\n * This program is free softw"
  }
]

// ... and 37 more files (download for full content)

About this extraction

This page contains the full source code of the openlgtv/epk2extract GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 237 files (1.5 MB), approximately 516.7k tokens, and a symbol index with 1774 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!