mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-31 05:15:54 -05:00
Compare commits
242 Commits
ImHex-v1.1
...
ImHex-v1.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a2d785093 | ||
|
|
addec74d91 | ||
|
|
ce83eedf02 | ||
|
|
463ddcc62e | ||
|
|
13b97fc976 | ||
|
|
55e4283432 | ||
|
|
ea225edf12 | ||
|
|
bb19cb43ee | ||
|
|
8f8ad0e2d5 | ||
|
|
3ad1f3969f | ||
|
|
5451d45158 | ||
|
|
e6a731fa1d | ||
|
|
8a62001705 | ||
|
|
1f8710b586 | ||
|
|
acd2d4abb8 | ||
|
|
032f3c7c01 | ||
|
|
3841ff51ef | ||
|
|
622721403f | ||
|
|
11291d1ebb | ||
|
|
92e61ccf5d | ||
|
|
062edfe527 | ||
|
|
5b32941801 | ||
|
|
e99ab5b59b | ||
|
|
775c836766 | ||
|
|
43058b4c45 | ||
|
|
0128ea87db | ||
|
|
fe231436d9 | ||
|
|
7a9ac44577 | ||
|
|
74e9d8f2e7 | ||
|
|
2f39a62d85 | ||
|
|
e21063d58b | ||
|
|
8f1a6bdd75 | ||
|
|
b9af43e08b | ||
|
|
2ffa4e0161 | ||
|
|
1cd7f92a5d | ||
|
|
d42b87d9e6 | ||
|
|
035de359d7 | ||
|
|
fe59788783 | ||
|
|
ef198cf24f | ||
|
|
b73b69a8cc | ||
|
|
5d72494019 | ||
|
|
afbce642fb | ||
|
|
a72058eb65 | ||
|
|
ab2ed98dab | ||
|
|
3edc6ea172 | ||
|
|
a9a7f0b186 | ||
|
|
5f352e26d1 | ||
|
|
3e2a6aabaa | ||
|
|
56d6f0187f | ||
|
|
adf7256c39 | ||
|
|
a25a8a3615 | ||
|
|
6ae8b30488 | ||
|
|
125ba38d72 | ||
|
|
ba55feb200 | ||
|
|
a301a4bfeb | ||
|
|
531be04739 | ||
|
|
87e05bec48 | ||
|
|
a31d290005 | ||
|
|
f3de35a320 | ||
|
|
d9de2f7058 | ||
|
|
790f837e4f | ||
|
|
d8a291977a | ||
|
|
62a83b53aa | ||
|
|
53ea45ffa6 | ||
|
|
c0a1bbd218 | ||
|
|
27f4e20638 | ||
|
|
bbb2107d5f | ||
|
|
8601a6665e | ||
|
|
c6f2b57384 | ||
|
|
dd190f7c8a | ||
|
|
55e3fec3bc | ||
|
|
8e78f371f5 | ||
|
|
2758ec8d36 | ||
|
|
82ca79c166 | ||
|
|
146273b1b3 | ||
|
|
ab4bff9f42 | ||
|
|
000f0eb730 | ||
|
|
2d45d5d086 | ||
|
|
2d4b4add82 | ||
|
|
e635c3a5bf | ||
|
|
15234a284d | ||
|
|
0673673b99 | ||
|
|
3786f7e265 | ||
|
|
ea4dda001a | ||
|
|
324b0894d3 | ||
|
|
e89e85e10c | ||
|
|
b93e957e46 | ||
|
|
e7eba44ae0 | ||
|
|
41d801a114 | ||
|
|
25f73ca721 | ||
|
|
facbe59163 | ||
|
|
55023ce4ea | ||
|
|
32158edb3a | ||
|
|
862d4d1c28 | ||
|
|
d4045b76c3 | ||
|
|
8ab2ff4ab1 | ||
|
|
5ea7141cb7 | ||
|
|
9b13113682 | ||
|
|
0748fa135e | ||
|
|
a4a14309be | ||
|
|
7c179b3b41 | ||
|
|
c204696209 | ||
|
|
f53be98204 | ||
|
|
ee95990225 | ||
|
|
ac28d9d029 | ||
|
|
372a0e5bba | ||
|
|
544cadbcca | ||
|
|
1471b02abd | ||
|
|
73cde21254 | ||
|
|
f730d8b0cc | ||
|
|
13183769f8 | ||
|
|
5eda5a15bf | ||
|
|
8e6248aa2d | ||
|
|
75fd40442b | ||
|
|
5a3036149c | ||
|
|
b160e99b63 | ||
|
|
f32db1745f | ||
|
|
7842c974df | ||
|
|
e2c191b7c9 | ||
|
|
71ee41fe2c | ||
|
|
69feadfc09 | ||
|
|
e79d512b2b | ||
|
|
e876270a08 | ||
|
|
8f39ecd879 | ||
|
|
ba36826e2d | ||
|
|
ac0b77540d | ||
|
|
683e78d9c3 | ||
|
|
110b498d7b | ||
|
|
9887da7af5 | ||
|
|
01a1bd0d9f | ||
|
|
fbb6a84323 | ||
|
|
4cdf3c11cf | ||
|
|
a9ada89bd0 | ||
|
|
de0e089165 | ||
|
|
e7ea6fd77f | ||
|
|
ff3c796de8 | ||
|
|
0c83764f24 | ||
|
|
d87f95dbfa | ||
|
|
51dad63779 | ||
|
|
764b86acc9 | ||
|
|
10fdf94899 | ||
|
|
9ba998e618 | ||
|
|
aceeb2b7b3 | ||
|
|
3b1b7cc379 | ||
|
|
49be43e0e1 | ||
|
|
8e70a5524d | ||
|
|
9c0bf1433c | ||
|
|
43afbfa120 | ||
|
|
f75703fd2b | ||
|
|
16eebea2fb | ||
|
|
6cb208d975 | ||
|
|
665c50b914 | ||
|
|
04ef9d6085 | ||
|
|
dc5b219d24 | ||
|
|
e6c800b71c | ||
|
|
5c9a7b1ac0 | ||
|
|
22390d0adf | ||
|
|
dfc9b17067 | ||
|
|
d33fdfafb8 | ||
|
|
58d63d1d4a | ||
|
|
86f38ca545 | ||
|
|
27d98d4552 | ||
|
|
dba93afe06 | ||
|
|
5481c2ff6a | ||
|
|
efa9957935 | ||
|
|
073768fec3 | ||
|
|
ceb322019c | ||
|
|
befd05f8dd | ||
|
|
6a1abd8fec | ||
|
|
b2ebbc6d66 | ||
|
|
24c003b333 | ||
|
|
caea4544ef | ||
|
|
36b107f0ca | ||
|
|
6367f434ab | ||
|
|
2cfd3c43a7 | ||
|
|
4bda291de1 | ||
|
|
ce542887c4 | ||
|
|
44216762fd | ||
|
|
3621144815 | ||
|
|
244dd88098 | ||
|
|
93c53f2d2e | ||
|
|
ccd163b981 | ||
|
|
cfc6a442de | ||
|
|
62b1eb927e | ||
|
|
2baae9c5f6 | ||
|
|
6ccb3bf465 | ||
|
|
fc997133a1 | ||
|
|
966c4e15b0 | ||
|
|
935a26e9f9 | ||
|
|
529c419ca8 | ||
|
|
befd6ef448 | ||
|
|
45da27275d | ||
|
|
60c5f795a0 | ||
|
|
72acac1082 | ||
|
|
a9d6c882ac | ||
|
|
7ecfcd446d | ||
|
|
b094757b03 | ||
|
|
1d0b11372f | ||
|
|
f01ddec350 | ||
|
|
64136ba16c | ||
|
|
1e45938887 | ||
|
|
f32b162647 | ||
|
|
d2685aabf5 | ||
|
|
8027cda032 | ||
|
|
a178509b3c | ||
|
|
56411ae067 | ||
|
|
7ee489237d | ||
|
|
4d97e79097 | ||
|
|
9fec10000a | ||
|
|
b0d8b81861 | ||
|
|
c7fbb661ae | ||
|
|
7e19b4cb10 | ||
|
|
ff2726ce8a | ||
|
|
ed47fa65f1 | ||
|
|
f0963603bf | ||
|
|
15548b92e2 | ||
|
|
87efc6cf54 | ||
|
|
5e48adcb9d | ||
|
|
f548643933 | ||
|
|
575e4d5381 | ||
|
|
6b0fad199e | ||
|
|
ece86f1124 | ||
|
|
ce2b4d60ca | ||
|
|
7c88439681 | ||
|
|
8d3c94be8f | ||
|
|
0b15299980 | ||
|
|
eda13b2518 | ||
|
|
aa6c90fa5b | ||
|
|
65f2b7821b | ||
|
|
de752cdbc3 | ||
|
|
e574f8048e | ||
|
|
874855dc1c | ||
|
|
6f161f7c52 | ||
|
|
a6e5efbb7f | ||
|
|
72c92ce671 | ||
|
|
5cf0daca4b | ||
|
|
c41f7479aa | ||
|
|
660da67e3b | ||
|
|
9b564fe403 | ||
|
|
be0632fac2 | ||
|
|
3a4b3873d1 | ||
|
|
63468e543a |
8
.gitattributes
vendored
8
.gitattributes
vendored
@@ -1,10 +1,2 @@
|
||||
*.pat linguist-language=Rust
|
||||
*.hexpat linguist-language=Rust
|
||||
constants/* text eol=lf
|
||||
encodings/* text eol=lf
|
||||
includes/* text eol=lf
|
||||
magic/* text eol=lf
|
||||
patterns/* text eol=lf
|
||||
structs/* text eol=lf
|
||||
tips/* text eol=lf
|
||||
yara/* text eol=lf
|
||||
11
.github/PULL_REQUEST_TEMPLATE/pattern_template.md
vendored
Normal file
11
.github/PULL_REQUEST_TEMPLATE/pattern_template.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# Pattern
|
||||
|
||||
[Information about your pattern]
|
||||
|
||||
## Checklist
|
||||
- [ ] A pattern for this format doesn't exist yet (or this PR improves the existing one)
|
||||
- [ ] The new pattern has been added to the relevant table in the Readme
|
||||
- [ ] The pattern was associated with all relevant MIME types (using `#pragma MIME mime-type` in the source code)
|
||||
- Make sure to never use `application/octet-stream` here as that means "Unidentifiable binary data"
|
||||
- [ ] A test file for this pattern has been added to [/tests/patterns/test_data](/tests/patterns/test_data)
|
||||
- Try to keep this file below ~ 1 MB
|
||||
47
.github/workflows/dispatch.yml
vendored
Normal file
47
.github/workflows/dispatch.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: "Dispatch"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '*' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
repository_dispatch:
|
||||
types: [run_tests]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
generate_docs:
|
||||
description: "Regenerate docs"
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: 🎯 Dispatch changes
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: 📄 Check changed include files
|
||||
id: changed-includes
|
||||
uses: tj-actions/changed-files@v35
|
||||
with:
|
||||
files: includes/**/*.pat
|
||||
|
||||
- name: ✉️ Run Documentation generator
|
||||
if: ${{ env.DISPATCH_TOKEN != '' && (steps.changed-includes.outputs.any_changed == 'true' || inputs.generate_docs || github.event_name == 'repository_dispatch' ) }}
|
||||
uses: mvasigh/dispatch-action@main
|
||||
with:
|
||||
token: ${{ secrets.DISPATCH_TOKEN }}
|
||||
repo: Documentation
|
||||
owner: WerWolv
|
||||
event_type: update_pl_docs
|
||||
38
.github/workflows/tests.yml
vendored
38
.github/workflows/tests.yml
vendored
@@ -5,11 +5,13 @@ on:
|
||||
branches: [ '*' ]
|
||||
pull_request:
|
||||
branches: [ '*' ]
|
||||
repository_dispatch:
|
||||
types: [run_tests]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: 🧪 Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
@@ -19,7 +21,6 @@ jobs:
|
||||
- name: 🧰 Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: ⬇️ Install dependencies
|
||||
@@ -27,14 +28,16 @@ jobs:
|
||||
sudo apt update
|
||||
sudo apt install -y \
|
||||
build-essential \
|
||||
gcc-11 \
|
||||
g++-11 \
|
||||
gcc-12 \
|
||||
g++-12 \
|
||||
lld \
|
||||
${PKGCONF:-} \
|
||||
cmake \
|
||||
make \
|
||||
python3 \
|
||||
python3-pip
|
||||
python3-pip \
|
||||
libmagic-dev \
|
||||
lcov
|
||||
|
||||
sudo pip install jsonschema
|
||||
|
||||
@@ -43,17 +46,32 @@ jobs:
|
||||
cd tests
|
||||
mkdir -p build
|
||||
cd build
|
||||
CC=gcc-11 CXX=g++-11 cmake \
|
||||
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
|
||||
-DLIBPL_ENABLE_TESTS=OFF \
|
||||
CC=gcc-12 CXX=g++-12 cmake \
|
||||
-DCMAKE_C_FLAGS="-fuse-ld=lld --coverage" \
|
||||
-DCMAKE_CXX_FLAGS="-fuse-ld=lld --coverage" \
|
||||
-DLIBPL_ENABLE_TESTS=OFF \
|
||||
-DLIBPL_ENABLE_CLI=OFF \
|
||||
..
|
||||
make -j4
|
||||
|
||||
- name: 🧪 Perform Unit Tests
|
||||
run: |
|
||||
cd tests/build
|
||||
ctest
|
||||
ctest --output-on-failure
|
||||
|
||||
#- name: ⚗️ Generate Coverage Report
|
||||
# run: |
|
||||
# cd tests/build
|
||||
# lcov -d ./_deps/pattern_language-build/lib --gcov-tool /usr/bin/gcov-12 -c -o coverage.info
|
||||
|
||||
#- name: ⬆️ Upload Coverage Report
|
||||
# uses: coverallsapp/github-action@master
|
||||
# env:
|
||||
# NODE_OPTIONS: --max-old-space-size=8000
|
||||
# with:
|
||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# path-to-lcov: tests/build/coverage.info
|
||||
|
||||
- name: 📎 Validate JSON Files
|
||||
run: |
|
||||
cd constants
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
tests/cmake-build-debug/
|
||||
|
||||
.idea/
|
||||
.DS_Store
|
||||
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,8 +1,4 @@
|
||||
[submodule "rules"]
|
||||
path = yara/official_rules
|
||||
url = https://github.com/Yara-Rules/rules
|
||||
branch = master
|
||||
[submodule "tests/lib/pl"]
|
||||
path = tests/lib/pl
|
||||
url = https://github.com/WerWolv/PatternLanguage
|
||||
branch = master
|
||||
branch = master
|
||||
12
CONTRIBUTING.md
Normal file
12
CONTRIBUTING.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Contributing
|
||||
|
||||
Contributing to the Database is very simple. Fork this repository, add your new files (or changes to existing files) to the right folders and create a PR.
|
||||
When adding new files, please make sure to also add a link to them to the Table of Contents in the README.md file. That way the files can be discovered by others more easily.
|
||||
|
||||
Thanks a lot for any additions or improvements :)
|
||||
|
||||
## Adding new Patterns
|
||||
|
||||
When adding new patterns, if possible, please also add a test file named `<pattern_name>.hexpat.<extension>` to the `/tests/patterns/test_data` directory. This allows our Unit Tests to be run against your code so we can make sure it stays up-to-date and doesn't break when changes are made to the PatternLanguage.
|
||||
Please try to keep these files as small as possible (~100kiB at most) so cloning stays fast.
|
||||
Please also make sure to not submit any test files that are under copyright such as game files, ROMs or files extracted from other programs. We don't want a DMCA takedown on this repo.
|
||||
202
README.md
202
README.md
@@ -1,6 +1,20 @@
|
||||
# ImHex-Patterns
|
||||
# ImHex Database
|
||||
|
||||
Hex patterns, include patterns and magic files for the use with the ImHex Hex Editor
|
||||
This repository serves as a database for files to use with the [ImHex Hex Editor](https://github.com/WerWolv/ImHex). It currently contains
|
||||
- [Patterns](/patterns) - Binary Format definitions for the Pattern Language
|
||||
- [Pattern Libraries](/includes) - Libraries that make using the Pattern Language easier
|
||||
- [Magic Files](/magic) - Custom magic file definitions for the use with libmagic
|
||||
- [Encodings](/encodings) - Custom encodings in the .tbl format
|
||||
- [Data Processor Nodes](/nodes) - Custom nodes made for ImHex's Data Processor
|
||||
- [Themes](/themes) - Custom themes for ImHex
|
||||
- [Constants](/constants) - Constants definition files
|
||||
- [Scripts](/scripts) - Various scripts to generate code or automate some tasks
|
||||
- [Yara](/yara) - Custom Yara rules
|
||||
|
||||
## Submissions
|
||||
|
||||
Most files in this repository have been submitted by the community. Please feel free to open a PR on your own and add files to it!
|
||||
Everything will immediately show up in ImHex's Content Store and gets bundled with the next release of ImHex.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@@ -8,83 +22,171 @@ Hex patterns, include patterns and magic files for the use with the ImHex Hex Ed
|
||||
|
||||
| Name | MIME | Path | Description |
|
||||
|------|------|------|-------------|
|
||||
| BMP | `image/bmp` | `patterns/bmp.hexpat` | OS2/Windows Bitmap files |
|
||||
| ELF | `application/x-executable`, `application/x-sharedlib` | `patterns/elf.hexpat` | ELF header in elf binaries |
|
||||
| PE | `application/x-dosexec` | `patterns/pe.hexpat` | PE header, COFF header, Standard COFF fields and Windows Specific fields |
|
||||
| Intel HEX | | `patterns/intel_hex.hexpat` | [Intel hexadecimal object file format definition]("https://en.wikipedia.org/wiki/Intel_HEX") |
|
||||
| MIDI | `audio/midi` | `patterns/midi.hexpat` | MIDI header, event fields provided |
|
||||
| WAV | `audio/wav` | `patterns/wav.hexpat` | RIFF header, WAVE header, PCM header |
|
||||
| ZIP | `application/zip` | `patterns/zip.hexpat` | End of Central Directory Header, Central Directory File Headers |
|
||||
| PCAP | `application/vnd.tcpdump.pcap` | `patterns/pcap.hexpat` | pcap header and packets |
|
||||
| SPIRV | | `patterns/spirv.hexpat` | SPIR-V header and instructions |
|
||||
| AFE2 | | `patterns/afe2.hexpat` | Nintendo Switch Atmosphère CFW Fatal Error log |
|
||||
| AR | `application/x-archive` | `patterns/ar.hexpat` | Static library archive files |
|
||||
| NACP | | `patterns/nacp.hexpat` | Nintendo Switch NACP files |
|
||||
| NRO | | `patterns/nro.hexpat` | Nintendo Switch NRO files |
|
||||
| PRODINFO | | `patterns/prodinfo.hexpat` | Nintendo Switch PRODINFO |
|
||||
| Java Class | `application/x-java-applet` | `patterns/java_class.hexpat` | Java Class files |
|
||||
| ARM VTOR | | `patterns/arm_cm_vtor.hexpat` | ARM Cortex M Vector Table Layout |
|
||||
| ICO | | `patterns/ico.hexpat` | Icon (.ico) or Cursor (.cur) files |
|
||||
| PNG | `image/png` | `patterns/png.hexpat` | PNG image files |
|
||||
| DDS | `image/vnd-ms.dds` | `patterns/dds.hexpat` | DirectDraw Surface |
|
||||
| TGA | `image/tga` | `patterns/tga.hexpat` | Truevision TGA/TARGA image |
|
||||
| ISO | | `patterns/iso.hexpat` | ISO 9660 file system |
|
||||
| VDF | | `patterns/vdf.hexpat` | Binary Value Data Format (.vdf) files |
|
||||
| IP | | `patterns/ip.hexpat` | Ethernet II Frames (IP Packets) |
|
||||
| UF2 | | `patterns/uf2.hexpat` | [USB Flashing Format](https://github.com/microsoft/uf2) |
|
||||
| 7Z | | [`patterns/7z.hexpat`](patterns/7z.hexpat) | 7z File Format |
|
||||
| AFE2 | | [`patterns/afe2.hexpat`](patterns/afe2.hexpat) | Nintendo Switch Atmosphère CFW Fatal Error log |
|
||||
| AR | `application/x-archive` | [`patterns/ar.hexpat`](patterns/ar.hexpat) | Static library archive files |
|
||||
| ARM VTOR | | [`patterns/arm_cm_vtor.hexpat`](patterns/arm_cm_vtor.hexpat) | ARM Cortex M Vector Table Layout |
|
||||
| Bencode | `application/x-bittorrent` | [`patterns/bencode.hexpat`](patterns/bencode.hexpat) | Bencode encoding, used by Torrent files |
|
||||
| BMP | `image/bmp` | [`patterns/bmp.hexpat`](patterns/bmp.hexpat) | OS2/Windows Bitmap files |
|
||||
| BSON | `application/bson` | [`patterns/bson.hexpat`](patterns/bson.hexpat) | BSON (Binary JSON) format |
|
||||
| BSP | | [`patterns/bsp_goldsrc.hexpat`](patterns/bsp_goldsrc.hexpat) | GoldSrc engine maps format (used in Half-Life 1) |
|
||||
| CCHVA | | [`patterns/cchva.hexpat`](patterns/cchva.hexpat) | Command and Conquer Voxel Animation |
|
||||
| CCVXL | | [`patterns/ccvxl.hexpat`](patterns/ccvxl.hexpat) | Command and Conquer Voxel Model |
|
||||
| CCPAL | | [`patterns/ccpal.hexpat`](patterns/ccpal.hexpat) | Command and Conquer Voxel Palette |
|
||||
| CDA | | [`patterns/cda.hexpat`](patterns/cda.hexpat) | Compact Disc Audio track |
|
||||
| CHM | | [`patterns/chm.hexpat`](patterns/chm.hexpat) | Windows HtmlHelp Data (ITSF / CHM) |
|
||||
| COFF | `application/x-coff` | [`patterns/coff.hexpat`](patterns/coff.hexpat) | Common Object File Format (COFF) executable |
|
||||
| CPIO | `application/x-cpio` | [`patterns/cpio.hexpat`](patterns/cpio.hexpat) | Old Binary CPIO Format |
|
||||
| CrashLvl | | [`patterns/Crashlvl.hexpat`](patterns/Crashlvl.hexpat) | Crash Bandicoot - Back in Time (fan game) User created flashback tapes level format |
|
||||
| DDS | `image/vnd-ms.dds` | [`patterns/dds.hexpat`](patterns/dds.hexpat) | DirectDraw Surface |
|
||||
| DEX | | [`patterns/dex.hexpat`](patterns/dex.hexpat) | Dalvik EXecutable Format |
|
||||
| DMG | | [`patterns/dmg.hexpat`](patterns/dmg.hexpat) | Apple Disk Image Trailer (DMG) |
|
||||
| DS_Store | `application/octet-stream` | [`patterns/dsstore.hexpat`](patterns/dsstore.hexpat) | .DS_Store file format |
|
||||
| DTA | | [`patterns/max_v104.hexpat`](patterns/max_v104.hexpat) | Mechanized Assault and Exploration v1.04 (strategy game) save file format |
|
||||
| ELF | `application/x-executable` | [`patterns/elf.hexpat`](patterns/elf.hexpat) | ELF header in elf binaries |
|
||||
| EVTX | | [`patterns/evtx.hexpat`](patterns/evtx.hexpat) | MS Windows Vista Event Log |
|
||||
| FDT | | [`patterns/fdt.hexpat`](patterns/fdt.hexpat) | Flat Linux Device Tree blob |
|
||||
| File System | | [`patterns/fs.hexpat`](patterns/fs.hexpat) | Drive File System |
|
||||
| FLAC | `audio/flac` | [`patterns/flac.hexpat`](patterns/flac.hexpat) | Free Lossless Audio Codec, FLAC Audio Format |
|
||||
| GB | `application/x-gameboy-rom` | [`patterns/gb.hexpat`](patterns/gb.hexpat) | Gameboy ROM |
|
||||
| GIF | `image/gif` | [`patterns/gif.hexpat`](patterns/gif.hexpat) | GIF image files |
|
||||
| GZIP | `application/gzip` | [`patterns/gzip.hexpat`](patterns/gzip.hexpat) | GZip compressed data format |
|
||||
| ICO | | [`patterns/ico.hexpat`](patterns/ico.hexpat) | Icon (.ico) or Cursor (.cur) files |
|
||||
| ID3 | `audio/mpeg` | [`patterns/id3.hexpat`](patterns/id3.hexpat) | ID3 tags in MP3 files |
|
||||
| Intel HEX | | [`patterns/intel_hex.hexpat`](patterns/intel_hex.hexpat) | [Intel hexadecimal object file format definition]("https://en.wikipedia.org/wiki/Intel_HEX") |
|
||||
| IP | | [`patterns/ip.hexpat`](patterns/ip.hexpat) | Ethernet II Frames (IP Packets) |
|
||||
| ISO | | [`patterns/iso.hexpat`](patterns/iso.hexpat) | ISO 9660 file system |
|
||||
| Java Class | `application/x-java-applet` | [`patterns/java_class.hexpat`](patterns/java_class.hexpat) | Java Class files |
|
||||
| JPEG | `image/jpeg` | [`patterns/jpeg.hexpat`](patterns/jpeg.hexpat) | JPEG Image Format |
|
||||
| Lua 5.4 | | [`patterns/lua54.hexpat`](patterns/lua54.hexpat) | Lua 5.4 bytecode |
|
||||
| Mach-O | `application/x-mach-binary` | [`patterns/macho.hexpat`](patterns/macho.hexpat) | Mach-O executable |
|
||||
| MIDI | `audio/midi` | [`patterns/midi.hexpat`](patterns/midi.hexpat) | MIDI header, event fields provided |
|
||||
| MiniDump | `application/x-dmp` | [`patterns/minidump.hexpat`](patterns/minidump.hexpat) | Windows MiniDump files |
|
||||
| mp4 | `video/mp4` | [`patterns/mp4.hexpat`](patterns/mp4.hexpat) | MPEG-4 Part 14 digital multimedia container format |
|
||||
| msgpack | `application/x-msgpack` | [`patterns/msgpack.hexpat`](patterns/msgpack.hexpat) | MessagePack binary serialization format |
|
||||
| NACP | | [`patterns/nacp.hexpat`](patterns/nacp.hexpat) | Nintendo Switch NACP files |
|
||||
| NBT | | [`patterns/nbt.hexpat`](patterns/nbt.hexpat) | Minecraft NBT format |
|
||||
| NE | | [`patterns/ne.hexpat`](patterns/ne.hexpat) | NE header and Standard NE fields |
|
||||
| NRO | | [`patterns/nro.hexpat`](patterns/nro.hexpat) | Nintendo Switch NRO files |
|
||||
| NTAG | | [`patterns/ntag.hexpat`](patterns/ntag.hexpat) | NTAG213/NTAG215/NTAG216, NFC Forum Type 2 Tag compliant IC |
|
||||
| OGG | `audio/ogg` | [`patterns/ogg.hexpat`](patterns/ogg.hexpat) | OGG Audio format |
|
||||
| PCAP | `application/vnd.tcpdump.pcap` | [`patterns/pcap.hexpat`](patterns/pcap.hexpat) | pcap header and packets |
|
||||
| PCX | `application/x-pcx` | [`patterns/pcx.hexpat`](patterns/pcx.hexpat) | PCX Image format |
|
||||
| PE | `application/x-dosexec` | [`patterns/pe.hexpat`](patterns/pe.hexpat) | PE header, COFF header, Standard COFF fields and Windows Specific fields |
|
||||
| PFS0 | | [`patterns/pfs0.hexpat`](patterns/pfs0.hexpat) | Nintendo Switch PFS0 archive (NSP files) |
|
||||
| PIF | `image/pif` | [`patterns/pif.hexpat`](patterns/pif.hexpat) | PIF Image Format |
|
||||
| PNG | `image/png` | [`patterns/png.hexpat`](patterns/png.hexpat) | PNG image files |
|
||||
| PRODINFO | | [`patterns/prodinfo.hexpat`](patterns/prodinfo.hexpat) | Nintendo Switch PRODINFO |
|
||||
| Protobuf | | [`patterns/protobuf.hexpat`](patterns/protobuf.hexpat) | Google Protobuf encoding |
|
||||
| QBCL | | [`patterns/qbcl.hexpat`](patterns/qbcl.hexpat) | Qubicle voxel scene project file |
|
||||
| QOI | `image/qoi` | [`patterns/qoi.hexpat`](patterns/qoi.hexpat) | QOI image files |
|
||||
| Shell Link | `application/x-ms-shortcut` | [`patterns/lnk.hexpat`](patterns/lnk.hexpat) | Windows Shell Link file format |
|
||||
| SPIRV | | [`patterns/spirv.hexpat`](patterns/spirv.hexpat) | SPIR-V header and instructions |
|
||||
| STL | `model/stl` | [`patterns/stl.hexpat`](patterns/stl.hexpat) | STL 3D Model format |
|
||||
| StuffItV5 | `application/x-stuffit` | [`patterns/sit5.hexpat`](patterns/sit5.hexpat) | StuffIt V5 archive |
|
||||
| TAR | `application/x-tar` | [`patterns/tar.hexpat`](patterns/tar.hexpat) | Tar file format |
|
||||
| TIFF | `image/tiff` | [`patterns/tiff.hexpat`](patterns/tiff.hexpat) | Tag Image File Format |
|
||||
| TGA | `image/tga` | [`patterns/tga.hexpat`](patterns/tga.hexpat) | Truevision TGA/TARGA image |
|
||||
| UEFI | | [`patterns/uefi.hexpat`](patterns/uefi.hexpat)` | UEFI structs for parsing efivars |
|
||||
| UF2 | | [`patterns/uf2.hexpat`](patterns/uf2.hexpat) | [USB Flashing Format](https://github.com/microsoft/uf2) |
|
||||
| VDF | | [`patterns/vdf.hexpat`](patterns/vdf.hexpat) | Binary Value Data Format (.vdf) files |
|
||||
| VHDX | | [`patterns/vhdx.hexpat`](patterns/vhdx.hexpat) | Microsoft Hyper-V Virtual Hard Disk format |
|
||||
| WAV | `audio/x-wav` | [`patterns/wav.hexpat`](patterns/wav.hexpat) | RIFF header, WAVE header, PCM header |
|
||||
| WAD | | [`patterns/wad.hexpat`](patterns/wad.hexpat) | DOOM WAD Archive |
|
||||
| XBEH | `audio/x-xbox-executable` | [`patterns/xbeh.hexpat`](patterns/xbeh.hexpat) | Xbox executable |
|
||||
| XCI | | [`patterns/xci.hexpat`](patterns/xci.hexpat) | Nintendo Switch XCI cardridge ROM |
|
||||
| Xilinx BIT | | [`patterns/xilinx_bit.hexpat`](patterns/xilinx_bit.hexpat) | Xilinx FPGA Bitstreams |
|
||||
| ZIP | `application/zip` | [`patterns/zip.hexpat`](patterns/zip.hexpat) | End of Central Directory Header, Central Directory File Headers |
|
||||
| ZSTD | `application/zstd` | [`patterns/zstd.hexpat`](patterns/zstd.hexpat) | Zstandard compressed data format |
|
||||
|
||||
### Scripts
|
||||
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| svd2pat | `scripts/svd2pat.py` | Converts a ARM .svd register MMIO definition file into a pattern |
|
||||
| svd2pat | [`scripts/svd2pat.py`](scripts/svd2pat.py) | Converts a ARM .svd register MMIO definition file into a pattern |
|
||||
| csv2tbl | [`scripts/csv2tbl.py`](scripts/csv2tbl.py) | Converts a 010 editor CSV encoding file into a table file |
|
||||
|
||||
### Pattern Libraries
|
||||
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| libstd | `includes/std/*` | Pattern Language Standard Libaray |
|
||||
| cstdint | `includes/cstdint.pat` | C integer types |
|
||||
| libstd | [`includes/std/*`](includes/std) | Pattern Language Standard Libaray |
|
||||
| libtype | [`includes/type/*`](includes/type) | Various custom types with special formatters |
|
||||
| libhex | [`includes/hex/*`](includes/hex) | Functions to interact with ImHex |
|
||||
|
||||
### Yara rules
|
||||
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| Official Rules | `yara/official_rules/*` | Official Yara rules repository |
|
||||
| Official Rules | [`yara/official_rules/*`](yara/official_rules) | Official Yara rules repository |
|
||||
|
||||
### Magic files
|
||||
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| Nintendo Switch | `magic/nintendo_switch_magic` | Identifies common file types used on the Nintendo Switch |
|
||||
| Portable Executable | `magic/portable_executable_magic` | Identifies PE files used on Windows
|
||||
| Nintendo Switch | [`magic/nintendo_switch_magic`](magic/nintendo_switch_magic) | Identifies common file types used on the Nintendo Switch |
|
||||
| Portable Executable | [`magic/portable_executable_magic`](magic/portable_executable_magic) | Identifies PE files used on Windows
|
||||
|
||||
### Constants files
|
||||
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| CRC-16 | `constants/crc16.json` | Constants associated with CRC-16 operations |
|
||||
| CRC-32 | `constants/crc32.json` | Constants associated with CRC-32 operations |
|
||||
| HTTP-Codes | `constants/http_status.json` | HTTP Status code values |
|
||||
| Linux Error Codes | `constants/linux_errors.json` | Values of Linux error results |
|
||||
| CRC-16 | [`constants/crc16.json`](constants/crc16.json) | Constants associated with CRC-16 operations |
|
||||
| CRC-32 | [`constants/crc32.json`](constants/crc32.json) | Constants associated with CRC-32 operations |
|
||||
| HTTP-Codes | [`constants/http_status.json`](constants/http_status.json) | HTTP Status code values |
|
||||
| Linux Error Codes | [`constants/linux_errors.json`](constants/linux_errors.json) | Values of Linux error results |
|
||||
|
||||
### Encoding files
|
||||
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| ANSI | `encodings/ansi.tbl` | ANSI encoding |
|
||||
| EUC-JP | `encodings/euc_jp.tbl` | EUC-JP encoding with NEC special and IBM extended characters |
|
||||
| ISO/IEC 646 | `encodings/iso_646.tbl` | ISO/IEC 646 encoding, an older version of ASCII |
|
||||
| ISO/IEC 6937 | `encodings/iso_6937.tbl` | ISO/IEC 6937 encoding, an extension of ASCII containing additional character |
|
||||
| Shift-JIS with half-width characters | `encodings/shiftjis_halfchars.tbl` | Shift-JIS encoding including half-width characters at 0xA1 - 0xDF |
|
||||
| Shift-JIS UTF-8 | `encodings/shiftjis.tbl` | Shift-JIS encoding in UTF-8 |
|
||||
| JIS 0201 | `encodings/jis_x_0201.tbl` | JIS X 0201 encoding in UTF-8 |
|
||||
| JIS X 0211 | `encodings/jis_x_0211.tbl` | JIS X 0211 encoding in UTF-8 |
|
||||
| JIS 0213 | `encodings/jis_x_0213.tbl` | JIS X 0213 encoding in UTF-8 |
|
||||
| Arabic ISO | [`encodings/arabic_iso.tbl`](encodings/arabic_iso.tbl) | Arabic ISO encoding |
|
||||
| Arabic Windows | [`encodings/arabic_windows.tbl`](encodings/arabic_windows.tbl) | Arabic Windows encoding |
|
||||
| ASCII | [`encodings/ascii.tbl`](encodings/ascii.tbl) | Regular ASCII encoding |
|
||||
| ASCII+ANSI | [`encodings/ascii_ansi.tbl`](encodings/ascii_ansi.tbl) | Extended ASCII encoding |
|
||||
| ASCII+OEM | [`encodings/ascii_oem.tbl`](encodings/ascii_oem.tbl) | ASCII encoding with Windows OEM characters |
|
||||
| Baltic ISO | [`encodings/baltic_iso.tbl`](encodings/baltic_iso.tbl) | Baltic ISO encoding |
|
||||
| Baltic Windows | [`encodings/baltic_windows.tbl`](encodings/baltic_windows.tbl) | Baltic Windows encoding |
|
||||
| Cyrillic ISO | [`encodings/cyrillic_iso.tbl`](encodings/cyrillic_iso.tbl) | Cyrillic ISO encoding |
|
||||
| Cyrillic Windows | [`encodings/cyrillic_windows.tbl`](encodings/cyrillic_windows.tbl) | Cyrillic Windows encoding |
|
||||
| Cyrillic KOI8-R | [`encodings/cyrillic_koi8_r.tbl`](encodings/cyrillic_koi8_r.tbl) | Cyrillic KOI8-R encoding (Russian Characters) |
|
||||
| Cyrillic KOI8-U | [`encodings/cyrillic_koi8_u.tbl`](encodings/cyrillic_koi8_u.tbl) | Cyrillic KOI8-U encoding (Ukranian Characters) |
|
||||
| Eastern Europe ISO | [`encodings/eastern_europe_iso.tbl`](encodings/eastern_europe_iso.tbl) | Eastern Europe ISO encoding |
|
||||
| Eastern Europe Windows | [`encodings/eastern_europe_windows.tbl`](encodings/eastern_europe_windows.tbl) | Eastern Europe Windows encoding |
|
||||
| EBCDIC | [`encodings/ebcdic.tbl`](encodings/ebcdic.tbl) | Extended Binary Coded Decimal Interchange Code, developed by IBM for their Main Frames |
|
||||
| EUC-JP | [`encodings/euc_jp.tbl`](encodings/euc_jp.tbl) | EUC-JP encoding with NEC special and IBM extended characters |
|
||||
| EUC-KR | [`encodings/euc_kr.tbl`](encodings/euc_kr.tbl) | EUC-KR encoding |
|
||||
| Greek ISO | [`encodings/greek_iso.tbl`](encodings/greek_iso.tbl) | Greek ISO encoding |
|
||||
| Greek Windows | [`encodings/greek_windows.tbl`](encodings/greek_windows.tbl) | Greek Windows encoding |
|
||||
| Hebrew ISO | [`encodings/hebrew_iso.tbl`](encodings/hebrew_iso.tbl) | Hebrew ISO encoding |
|
||||
| Hebrew Windows | [`encodings/hebrew_windows.tbl`](encodings/hebrew_windows.tbl) | Hebrew Windows encoding |
|
||||
| ISO/IEC 646 | [`encodings/iso_646.tbl`](encodings/iso_646.tbl) | ISO/IEC 646 encoding, an older version of ASCII |
|
||||
| ISO/IEC 6937 | [`encodings/iso_6937.tbl`](encodings/iso_6937.tbl) | ISO/IEC 6937 encoding, an extension of ASCII containing additional character |
|
||||
| JIS 0201 | [`encodings/jis_x_0201.tbl`](encodings/jis_x_0201.tbl) | JIS X 0201 encoding in UTF-8 |
|
||||
| JIS X 0211 | [`encodings/jis_x_0211.tbl`](encodings/jis_x_0211.tbl) | JIS X 0211 encoding in UTF-8 |
|
||||
| JIS 0213 | [`encodings/jis_x_0213.tbl`](encodings/jis_x_0213.tbl) | JIS X 0213 encoding in UTF-8 |
|
||||
| Macintosh | [`encodings/macintosh.tbl`](encodings/macintosh.tbl) | Macintosh character encoding used by the Kermit protocol |
|
||||
| Pokémon (English, Generation 1) | [`encodings/pokegen1_en.tbl`](encodings/pokegen1_en.tbl) | Character encoding used by the English generation 1 Pokémon games |
|
||||
| Pokémon (English, Generation 3) | [`encodings/pokegen3_en.tbl`](encodings/pokegen3_en.tbl) | Character encoding used by the English generation 3 Pokémon games |
|
||||
| Shift-JIS UTF-8 | [`encodings/shiftjis.tbl`](encodings/shiftjis.tbl) | Shift-JIS encoding in UTF-8 |
|
||||
| Thai | [`encodings/thai.tbl`](encodings/thai.tbl) | Thai character encoding |
|
||||
| Turkish ISO | [`encodings/turkish_iso.tbl`](encodings/turkish_iso.tbl) | Turkish ISO encoding |
|
||||
| Turkish Windows | [`encodings/turkish_windows.tbl`](encodings/turkish_windows.tbl) | Turkish Windows encoding |
|
||||
| UTF-8 | [`encodings/utf8.tbl`](encodings/utf8.tbl) | UTF-8 encoding |
|
||||
| Vietnamese | [`encodings/vietnamese.tbl`](encodings/vietnamese.tbl) | Vietnamese character encoding |
|
||||
|
||||
## Contributing
|
||||
### Data Processor Nodes
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| Caesar Cipher | [`nodes/caesar.hexnode`](nodes/caesar.hexnode) | Simple adjustable per-byte Caecar Cipher (ROT) |
|
||||
| XOR Cipher | [`nodes/xor.hexnode`](nodes/xor.hexnode) | XORs a input with a repeating XOR pad |
|
||||
|
||||
If you want to contribute a file to the database, please make a PR which adds it to the right folder and adds a new entry to the table in this readme.
|
||||
To take advantage of the automatic pattern testing, please consider adding a test file named `<pattern_name>.hexpat.<extension>` to the `/tests/patterns/test_data` directory. Try to keep this file as small as possible so the repository doesn't become excessively large
|
||||
|
||||
Thanks a lot :)
|
||||
### Themes
|
||||
| Name | Path | Description |
|
||||
|------|------|-------------|
|
||||
| Visual Studio Dark | [`themes/vs_dark.json`](themes/vs_dark.json) | Theme similar to Visual Studio's Dark theme |
|
||||
| Solarized Dark | [`themes/solarized_dark.json`](themes/solarized_dark.json) | Solarized Dark Theme |
|
||||
| Catppuccin Latte | [`themes/catppuccin-latte.json`](themes/catppuccin-latte.json) | Catppuccin Latte Flavor (Light Theme) |
|
||||
| Catppuccin Frappe | [`themes/catppuccin-frappe.json`](themes/catppuccin-frappe.json) | Catppuccin Frappe Flavor (Dark Theme) |
|
||||
| Catppuccin Macchiato | [`themes/catppuccin-macchiato.json`](themes/catppuccin-macchiato.json) | Catppuccin Macchiato Flavor (Dark Theme) |
|
||||
| Catppuccin Mocha | [`themes/catppuccin-mocha.json`](themes/catppuccin-mocha.json) | Catppuccin Mocha Flavor (Dark Theme) |
|
||||
|
||||
@@ -1,255 +0,0 @@
|
||||
*0D0A
|
||||
00
|
||||
01
|
||||
02
|
||||
03
|
||||
04
|
||||
05
|
||||
06
|
||||
07
|
||||
0B
|
||||
0C
|
||||
0E
|
||||
0F
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
1A
|
||||
1B
|
||||
1C
|
||||
1D
|
||||
1E
|
||||
1F
|
||||
7E
|
||||
7F
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
8A
|
||||
8B
|
||||
8C
|
||||
8D
|
||||
8E
|
||||
8F
|
||||
90
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
9A
|
||||
9B
|
||||
9C
|
||||
9D
|
||||
9E
|
||||
B7
|
||||
08=BackSpace
|
||||
09=\t
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
91='
|
||||
92='
|
||||
9F==<3D>
|
||||
A0=
|
||||
A1=<3D>
|
||||
A2=<3D>
|
||||
A3=<3D>
|
||||
A4=<3D>
|
||||
A5=<3D>
|
||||
A6=<3D>
|
||||
A7=<3D>
|
||||
A8=<3D>
|
||||
A9=<3D>
|
||||
AA=<3D>
|
||||
AB=<3D>
|
||||
AC=<3D>
|
||||
AD=<3D>
|
||||
AE=<3D>
|
||||
AF=<3D>
|
||||
B0=<3D>
|
||||
B1=<3D>
|
||||
B2=<3D>
|
||||
B3=<3D>
|
||||
B4=<3D>
|
||||
B5=<3D>
|
||||
B6=<3D>
|
||||
B8=<3D>
|
||||
B9=<3D>
|
||||
BA=<3D>
|
||||
BB=<3D>
|
||||
BC=<3D>
|
||||
BD=<3D>
|
||||
BE=<3D>
|
||||
BF=<3D>
|
||||
C0=A
|
||||
C1=<3D>
|
||||
C2=<3D>
|
||||
C3=<3D>
|
||||
C4=<3D>
|
||||
C5=<3D>
|
||||
C6=<3D>
|
||||
C7=<3D>
|
||||
C8=<3D>
|
||||
C9=<3D>
|
||||
CA=<3D>
|
||||
CB=<3D>
|
||||
CC=<3D>
|
||||
CD=<3D>
|
||||
CE=<3D>
|
||||
CF=<3D>
|
||||
D0=<3D>
|
||||
D1=<3D>
|
||||
D2=<3D>
|
||||
D3=<3D>
|
||||
D4=<3D>
|
||||
D5=<3D>
|
||||
D6=<3D>
|
||||
D7=<3D>
|
||||
D8=<3D>
|
||||
D9=<3D>
|
||||
DA=<3D>
|
||||
DB=<3D>
|
||||
DC=<3D>
|
||||
DD=<3D>
|
||||
DE=<3D>
|
||||
DF=<3D>
|
||||
E0=<3D>
|
||||
E1=<3D>
|
||||
E2=<3D>
|
||||
E3=<3D>
|
||||
E4=<3D>
|
||||
E5=<3D>
|
||||
E6=<3D>
|
||||
E7=<3D>
|
||||
E8=<3D>
|
||||
E9=<3D>
|
||||
EA=<3D>
|
||||
EB=<3D>
|
||||
EC=<3D>
|
||||
ED=<3D>
|
||||
EE=<3D>
|
||||
EF=<3D>
|
||||
F0=<3D>
|
||||
F1=<3D>
|
||||
F2=<3D>
|
||||
F3=<3D>
|
||||
F4=<3D>
|
||||
F5=<3D>
|
||||
F6=<3D>
|
||||
F7=<3D>
|
||||
F8=<3D>
|
||||
F9=<3D>
|
||||
FA=<3D>
|
||||
FB=<3D>
|
||||
FC=<3D>
|
||||
FD=<3D>
|
||||
FE=<3D>
|
||||
FF=<3D>
|
||||
256
encodings/arabic_iso.tbl
Normal file
256
encodings/arabic_iso.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=
|
||||
81=
|
||||
82=
|
||||
83=
|
||||
84=
|
||||
85=
|
||||
86=
|
||||
87=
|
||||
88=
|
||||
89=
|
||||
8A=
|
||||
8B=
|
||||
8C=
|
||||
8D=
|
||||
8E=
|
||||
8F=
|
||||
90=
|
||||
91=
|
||||
92=
|
||||
93=
|
||||
94=
|
||||
95=
|
||||
96=
|
||||
97=
|
||||
98=
|
||||
99=
|
||||
9A=
|
||||
9B=
|
||||
9C=
|
||||
9D=
|
||||
9E=
|
||||
9F=
|
||||
A0=
|
||||
A1
|
||||
A2
|
||||
A3
|
||||
A4=¤
|
||||
A5
|
||||
A6
|
||||
A7
|
||||
A8
|
||||
A9
|
||||
AA
|
||||
AB
|
||||
AC=،
|
||||
AD=
|
||||
AE
|
||||
AF
|
||||
B0
|
||||
B1
|
||||
B2
|
||||
B3
|
||||
B4
|
||||
B5
|
||||
B6
|
||||
B7
|
||||
B8
|
||||
B9
|
||||
BA
|
||||
BB=؛
|
||||
BC
|
||||
BD
|
||||
BE
|
||||
BF=؟
|
||||
C0
|
||||
C1=ء
|
||||
C2=آ
|
||||
C3=أ
|
||||
C4=ؤ
|
||||
C5=إ
|
||||
C6=ئ
|
||||
C7=ا
|
||||
C8=ب
|
||||
C9=ة
|
||||
CA=ت
|
||||
CB=ث
|
||||
CC=ج
|
||||
CD=ح
|
||||
CE=خ
|
||||
CF=د
|
||||
D0=ذ
|
||||
D1=ر
|
||||
D2=ز
|
||||
D3=س
|
||||
D4=ش
|
||||
D5=ص
|
||||
D6=ض
|
||||
D7=ط
|
||||
D8=ظ
|
||||
D9=ع
|
||||
DA=غ
|
||||
DB
|
||||
DC
|
||||
DD
|
||||
DE
|
||||
DF
|
||||
E0=ـ
|
||||
E1=ف
|
||||
E2=ق
|
||||
E3=ك
|
||||
E4=ل
|
||||
E5=م
|
||||
E6=ن
|
||||
E7=ه
|
||||
E8=و
|
||||
E9=ى
|
||||
EA=ي
|
||||
EB=ً
|
||||
EC=ٌ
|
||||
ED=ٍ
|
||||
EE=َ
|
||||
EF=ُ
|
||||
F0=ِ
|
||||
F1=ّ
|
||||
F2=ْ
|
||||
F3
|
||||
F4
|
||||
F5
|
||||
F6
|
||||
F7
|
||||
F8
|
||||
F9
|
||||
FA
|
||||
FB
|
||||
FC
|
||||
FD
|
||||
FE
|
||||
FF
|
||||
256
encodings/arabic_windows.tbl
Normal file
256
encodings/arabic_windows.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81=پ
|
||||
82=‚
|
||||
83=ƒ
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88=ˆ
|
||||
89=‰
|
||||
8A=ٹ
|
||||
8B=‹
|
||||
8C=Œ
|
||||
8D=چ
|
||||
8E=ژ
|
||||
8F=ڈ
|
||||
90=گ
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98=ک
|
||||
99=™
|
||||
9A=ڑ
|
||||
9B=›
|
||||
9C=œ
|
||||
9D=
|
||||
9E=
|
||||
9F=ں
|
||||
A0=
|
||||
A1=،
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=ھ
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=¯
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=¹
|
||||
BA=؛
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=؟
|
||||
C0=ہ
|
||||
C1=ء
|
||||
C2=آ
|
||||
C3=أ
|
||||
C4=ؤ
|
||||
C5=إ
|
||||
C6=ئ
|
||||
C7=ا
|
||||
C8=ب
|
||||
C9=ة
|
||||
CA=ت
|
||||
CB=ث
|
||||
CC=ج
|
||||
CD=ح
|
||||
CE=خ
|
||||
CF=د
|
||||
D0=ذ
|
||||
D1=ر
|
||||
D2=ز
|
||||
D3=س
|
||||
D4=ش
|
||||
D5=ص
|
||||
D6=ض
|
||||
D7=×
|
||||
D8=ط
|
||||
D9=ظ
|
||||
DA=ع
|
||||
DB=غ
|
||||
DC=ـ
|
||||
DD=ف
|
||||
DE=ق
|
||||
DF=ك
|
||||
E0=à
|
||||
E1=ل
|
||||
E2=â
|
||||
E3=م
|
||||
E4=ن
|
||||
E5=ه
|
||||
E6=و
|
||||
E7=ç
|
||||
E8=è
|
||||
E9=é
|
||||
EA=ê
|
||||
EB=ë
|
||||
EC=ى
|
||||
ED=ي
|
||||
EE=î
|
||||
EF=ï
|
||||
F0=ً
|
||||
F1=ٌ
|
||||
F2=ٍ
|
||||
F3=َ
|
||||
F4=ô
|
||||
F5=ُ
|
||||
F6=ِ
|
||||
F7=÷
|
||||
F8=ّ
|
||||
F9=ù
|
||||
FA=ْ
|
||||
FB=û
|
||||
FC=ü
|
||||
FD=
|
||||
FE=
|
||||
FF=ے
|
||||
256
encodings/ascii.tbl
Normal file
256
encodings/ascii.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
8A
|
||||
8B
|
||||
8C
|
||||
8D
|
||||
8E
|
||||
8F
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
9A
|
||||
9B
|
||||
9C
|
||||
9D
|
||||
9E
|
||||
9F
|
||||
A0
|
||||
A1
|
||||
A2
|
||||
A3
|
||||
A4
|
||||
A5
|
||||
A6
|
||||
A7
|
||||
A8
|
||||
A9
|
||||
AA
|
||||
AB
|
||||
AC
|
||||
AD
|
||||
AE
|
||||
AF
|
||||
B0
|
||||
B1
|
||||
B2
|
||||
B3
|
||||
B4
|
||||
B5
|
||||
B6
|
||||
B7
|
||||
B8
|
||||
B9
|
||||
BA
|
||||
BB
|
||||
BC
|
||||
BD
|
||||
BE
|
||||
BF
|
||||
C0
|
||||
C1
|
||||
C2
|
||||
C3
|
||||
C4
|
||||
C5
|
||||
C6
|
||||
C7
|
||||
C8
|
||||
C9
|
||||
CA
|
||||
CB
|
||||
CC
|
||||
CD
|
||||
CE
|
||||
CF
|
||||
D0
|
||||
D1
|
||||
D2
|
||||
D3
|
||||
D4
|
||||
D5
|
||||
D6
|
||||
D7
|
||||
D8
|
||||
D9
|
||||
DA
|
||||
DB
|
||||
DC
|
||||
DD
|
||||
DE
|
||||
DF
|
||||
E0
|
||||
E1
|
||||
E2
|
||||
E3
|
||||
E4
|
||||
E5
|
||||
E6
|
||||
E7
|
||||
E8
|
||||
E9
|
||||
EA
|
||||
EB
|
||||
EC
|
||||
ED
|
||||
EE
|
||||
EF
|
||||
F0
|
||||
F1
|
||||
F2
|
||||
F3
|
||||
F4
|
||||
F5
|
||||
F6
|
||||
F7
|
||||
F8
|
||||
F9
|
||||
FA
|
||||
FB
|
||||
FC
|
||||
FD
|
||||
FE
|
||||
FF
|
||||
256
encodings/ascii_ansi.tbl
Normal file
256
encodings/ascii_ansi.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82=‚
|
||||
83=ƒ
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88=ˆ
|
||||
89=‰
|
||||
8A=Š
|
||||
8B=‹
|
||||
8C=Œ
|
||||
8D
|
||||
8E=Ž
|
||||
8F
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98=˜
|
||||
99=™
|
||||
9A=š
|
||||
9B=›
|
||||
9C=œ
|
||||
9D
|
||||
9E=ž
|
||||
9F=Ÿ
|
||||
A0=
|
||||
A1=¡
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=ª
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=¯
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=¹
|
||||
BA=º
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=¿
|
||||
C0=À
|
||||
C1=Á
|
||||
C2=Â
|
||||
C3=Ã
|
||||
C4=Ä
|
||||
C5=Å
|
||||
C6=Æ
|
||||
C7=Ç
|
||||
C8=È
|
||||
C9=É
|
||||
CA=Ê
|
||||
CB=Ë
|
||||
CC=Ì
|
||||
CD=Í
|
||||
CE=Î
|
||||
CF=Ï
|
||||
D0=Ð
|
||||
D1=Ñ
|
||||
D2=Ò
|
||||
D3=Ó
|
||||
D4=Ô
|
||||
D5=Õ
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ø
|
||||
D9=Ù
|
||||
DA=Ú
|
||||
DB=Û
|
||||
DC=Ü
|
||||
DD=Ý
|
||||
DE=Þ
|
||||
DF=ß
|
||||
E0=à
|
||||
E1=á
|
||||
E2=â
|
||||
E3=ã
|
||||
E4=ä
|
||||
E5=å
|
||||
E6=æ
|
||||
E7=ç
|
||||
E8=è
|
||||
E9=é
|
||||
EA=ê
|
||||
EB=ë
|
||||
EC=ì
|
||||
ED=í
|
||||
EE=î
|
||||
EF=ï
|
||||
F0=ð
|
||||
F1=ñ
|
||||
F2=ò
|
||||
F3=ó
|
||||
F4=ô
|
||||
F5=õ
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ø
|
||||
F9=ù
|
||||
FA=ú
|
||||
FB=û
|
||||
FC=ü
|
||||
FD=ý
|
||||
FE=þ
|
||||
FF=ÿ
|
||||
256
encodings/ascii_oem.tbl
Normal file
256
encodings/ascii_oem.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=Ç
|
||||
81=ü
|
||||
82=é
|
||||
83=â
|
||||
84=ä
|
||||
85=à
|
||||
86=å
|
||||
87=ç
|
||||
88=ê
|
||||
89=ë
|
||||
8A=è
|
||||
8B=ï
|
||||
8C=î
|
||||
8D=ì
|
||||
8E=Ä
|
||||
8F=Å
|
||||
90=É
|
||||
91=æ
|
||||
92=Æ
|
||||
93=ô
|
||||
94=ö
|
||||
95=ò
|
||||
96=û
|
||||
97=ù
|
||||
98=ÿ
|
||||
99=Ö
|
||||
9A=Ü
|
||||
9B=¢
|
||||
9C=£
|
||||
9D=¥
|
||||
9E=₧
|
||||
9F=ƒ
|
||||
A0=á
|
||||
A1=í
|
||||
A2=ó
|
||||
A3=ú
|
||||
A4=ñ
|
||||
A5=Ñ
|
||||
A6=ª
|
||||
A7=º
|
||||
A8=¿
|
||||
A9=⌐
|
||||
AA=¬
|
||||
AB=½
|
||||
AC=¼
|
||||
AD=¡
|
||||
AE=«
|
||||
AF=»
|
||||
B0=░
|
||||
B1=▒
|
||||
B2=▓
|
||||
B3=│
|
||||
B4=┤
|
||||
B5=╡
|
||||
B6=╢
|
||||
B7=╖
|
||||
B8=╕
|
||||
B9=╣
|
||||
BA=║
|
||||
BB=╗
|
||||
BC=╝
|
||||
BD=╜
|
||||
BE=╛
|
||||
BF=┐
|
||||
C0=└
|
||||
C1=┴
|
||||
C2=┬
|
||||
C3=├
|
||||
C4=─
|
||||
C5=┼
|
||||
C6=╞
|
||||
C7=╟
|
||||
C8=╚
|
||||
C9=╔
|
||||
CA=╩
|
||||
CB=╦
|
||||
CC=╠
|
||||
CD=═
|
||||
CE=╬
|
||||
CF=╧
|
||||
D0=╨
|
||||
D1=╤
|
||||
D2=╥
|
||||
D3=╙
|
||||
D4=╘
|
||||
D5=╒
|
||||
D6=╓
|
||||
D7=╫
|
||||
D8=╪
|
||||
D9=┘
|
||||
DA=┌
|
||||
DB=█
|
||||
DC=▄
|
||||
DD=▌
|
||||
DE=▐
|
||||
DF=▀
|
||||
E0=α
|
||||
E1=ß
|
||||
E2=Γ
|
||||
E3=π
|
||||
E4=Σ
|
||||
E5=σ
|
||||
E6=µ
|
||||
E7=τ
|
||||
E8=Φ
|
||||
E9=Θ
|
||||
EA=Ω
|
||||
EB=δ
|
||||
EC=∞
|
||||
ED=φ
|
||||
EE=ε
|
||||
EF=∩
|
||||
F0=≡
|
||||
F1=±
|
||||
F2=≥
|
||||
F3=≤
|
||||
F4=⌠
|
||||
F5=⌡
|
||||
F6=÷
|
||||
F7=≈
|
||||
F8=°
|
||||
F9=∙
|
||||
FA=·
|
||||
FB=√
|
||||
FC=ⁿ
|
||||
FD=²
|
||||
FE=■
|
||||
FF=
|
||||
256
encodings/baltic_iso.tbl
Normal file
256
encodings/baltic_iso.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=
|
||||
81=
|
||||
82=
|
||||
83=
|
||||
84=
|
||||
85=
|
||||
86=
|
||||
87=
|
||||
88=
|
||||
89=
|
||||
8A=
|
||||
8B=
|
||||
8C=
|
||||
8D=
|
||||
8E=
|
||||
8F=
|
||||
90=
|
||||
91=
|
||||
92=
|
||||
93=
|
||||
94=
|
||||
95=
|
||||
96=
|
||||
97=
|
||||
98=
|
||||
99=
|
||||
9A=
|
||||
9B=
|
||||
9C=
|
||||
9D=
|
||||
9E=
|
||||
9F=
|
||||
A0=
|
||||
A1=”
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=„
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=Ø
|
||||
A9=©
|
||||
AA=Ŗ
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=Æ
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=“
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=ø
|
||||
B9=¹
|
||||
BA=ŗ
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=æ
|
||||
C0=Ą
|
||||
C1=Į
|
||||
C2=Ā
|
||||
C3=Ć
|
||||
C4=Ä
|
||||
C5=Å
|
||||
C6=Ę
|
||||
C7=Ē
|
||||
C8=Č
|
||||
C9=É
|
||||
CA=Ź
|
||||
CB=Ė
|
||||
CC=Ģ
|
||||
CD=Ķ
|
||||
CE=Ī
|
||||
CF=Ļ
|
||||
D0=Š
|
||||
D1=Ń
|
||||
D2=Ņ
|
||||
D3=Ó
|
||||
D4=Ō
|
||||
D5=Õ
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ų
|
||||
D9=Ł
|
||||
DA=Ś
|
||||
DB=Ū
|
||||
DC=Ü
|
||||
DD=Ż
|
||||
DE=Ž
|
||||
DF=ß
|
||||
E0=ą
|
||||
E1=į
|
||||
E2=ā
|
||||
E3=ć
|
||||
E4=ä
|
||||
E5=å
|
||||
E6=ę
|
||||
E7=ē
|
||||
E8=č
|
||||
E9=é
|
||||
EA=ź
|
||||
EB=ė
|
||||
EC=ģ
|
||||
ED=ķ
|
||||
EE=ī
|
||||
EF=ļ
|
||||
F0=š
|
||||
F1=ń
|
||||
F2=ņ
|
||||
F3=ó
|
||||
F4=ō
|
||||
F5=õ
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ų
|
||||
F9=ł
|
||||
FA=ś
|
||||
FB=ū
|
||||
FC=ü
|
||||
FD=ż
|
||||
FE=ž
|
||||
FF=’
|
||||
256
encodings/baltic_windows.tbl
Normal file
256
encodings/baltic_windows.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82=‚
|
||||
83
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88
|
||||
89=‰
|
||||
8A
|
||||
8B=‹
|
||||
8C
|
||||
8D=¨
|
||||
8E=ˇ
|
||||
8F=¸
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98
|
||||
99=™
|
||||
9A
|
||||
9B=›
|
||||
9C
|
||||
9D=¯
|
||||
9E=˛
|
||||
9F
|
||||
A0=
|
||||
A1
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=Ø
|
||||
A9=©
|
||||
AA=Ŗ
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=Æ
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=ø
|
||||
B9=¹
|
||||
BA=ŗ
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=æ
|
||||
C0=Ą
|
||||
C1=Į
|
||||
C2=Ā
|
||||
C3=Ć
|
||||
C4=Ä
|
||||
C5=Å
|
||||
C6=Ę
|
||||
C7=Ē
|
||||
C8=Č
|
||||
C9=É
|
||||
CA=Ź
|
||||
CB=Ė
|
||||
CC=Ģ
|
||||
CD=Ķ
|
||||
CE=Ī
|
||||
CF=Ļ
|
||||
D0=Š
|
||||
D1=Ń
|
||||
D2=Ņ
|
||||
D3=Ó
|
||||
D4=Ō
|
||||
D5=Õ
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ų
|
||||
D9=Ł
|
||||
DA=Ś
|
||||
DB=Ū
|
||||
DC=Ü
|
||||
DD=Ż
|
||||
DE=Ž
|
||||
DF=ß
|
||||
E0=ą
|
||||
E1=į
|
||||
E2=ā
|
||||
E3=ć
|
||||
E4=ä
|
||||
E5=å
|
||||
E6=ę
|
||||
E7=ē
|
||||
E8=č
|
||||
E9=é
|
||||
EA=ź
|
||||
EB=ė
|
||||
EC=ģ
|
||||
ED=ķ
|
||||
EE=ī
|
||||
EF=ļ
|
||||
F0=š
|
||||
F1=ń
|
||||
F2=ņ
|
||||
F3=ó
|
||||
F4=ō
|
||||
F5=õ
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ų
|
||||
F9=ł
|
||||
FA=ś
|
||||
FB=ū
|
||||
FC=ü
|
||||
FD=ż
|
||||
FE=ž
|
||||
FF=˙
|
||||
256
encodings/cyrillic_cp866.tbl
Normal file
256
encodings/cyrillic_cp866.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=☺
|
||||
02=☻
|
||||
03=♥
|
||||
04=♦
|
||||
05=♣
|
||||
06=♠
|
||||
07=•
|
||||
08=◘
|
||||
09=○
|
||||
0A=◙
|
||||
0B=♂
|
||||
0C=♀
|
||||
0D=♪
|
||||
0E=♫
|
||||
0F=☼
|
||||
10=►
|
||||
11=◄
|
||||
12=↕
|
||||
13=‼
|
||||
14=¶
|
||||
15=§
|
||||
16=▬
|
||||
17=↨
|
||||
18=↑
|
||||
19=↓
|
||||
1A=→
|
||||
1B=←
|
||||
1C=∟
|
||||
1D=↔
|
||||
1E=▲
|
||||
1F=▼
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=⌂
|
||||
80=А
|
||||
81=Б
|
||||
82=В
|
||||
83=Г
|
||||
84=Д
|
||||
85=Е
|
||||
86=Ж
|
||||
87=З
|
||||
88=И
|
||||
89=Й
|
||||
8A=К
|
||||
8B=Л
|
||||
8C=М
|
||||
8D=Н
|
||||
8E=О
|
||||
8F=П
|
||||
90=Р
|
||||
91=С
|
||||
92=Т
|
||||
93=У
|
||||
94=Ф
|
||||
95=Х
|
||||
96=Ц
|
||||
97=Ч
|
||||
98=Ш
|
||||
99=Щ
|
||||
9A=Ъ
|
||||
9B=Ы
|
||||
9C=Ь
|
||||
9D=Э
|
||||
9E=Ю
|
||||
9F=Я
|
||||
A0=а
|
||||
A1=б
|
||||
A2=в
|
||||
A3=г
|
||||
A4=д
|
||||
A5=е
|
||||
A6=ж
|
||||
A7=з
|
||||
A8=и
|
||||
A9=й
|
||||
AA=к
|
||||
AB=л
|
||||
AC=м
|
||||
AD=н
|
||||
AE=о
|
||||
AF=п
|
||||
B0=░
|
||||
B1=▒
|
||||
B2=▓
|
||||
B3=│
|
||||
B4=┤
|
||||
B5=╡
|
||||
B6=╢
|
||||
B7=╖
|
||||
B8=╕
|
||||
B9=╣
|
||||
BA=║
|
||||
BB=╗
|
||||
BC=╝
|
||||
BD=╜
|
||||
BE=╛
|
||||
BF=┐
|
||||
C0=└
|
||||
C1=┴
|
||||
C2=┬
|
||||
C3=├
|
||||
C4=─
|
||||
C5=┼
|
||||
C6=╞
|
||||
C7=╟
|
||||
C8=╚
|
||||
C9=╔
|
||||
CA=╩
|
||||
CB=╦
|
||||
CC=╠
|
||||
CD=═
|
||||
CE=╬
|
||||
CF=╧
|
||||
D0=╨
|
||||
D1=╤
|
||||
D2=╥
|
||||
D3=╙
|
||||
D4=╘
|
||||
D5=╒
|
||||
D6=╓
|
||||
D7=╫
|
||||
D8=╪
|
||||
D9=┘
|
||||
DA=┌
|
||||
DB=█
|
||||
DC=▄
|
||||
DD=▌
|
||||
DE=▐
|
||||
DF=▀
|
||||
E0=р
|
||||
E1=с
|
||||
E2=т
|
||||
E3=у
|
||||
E4=ф
|
||||
E5=х
|
||||
E6=ц
|
||||
E7=ч
|
||||
E8=ш
|
||||
E9=щ
|
||||
EA=ъ
|
||||
EB=ы
|
||||
EC=ь
|
||||
ED=э
|
||||
EE=ю
|
||||
EF=я
|
||||
F0=Ё
|
||||
F1=ё
|
||||
F2=Є
|
||||
F3=є
|
||||
F4=Ї
|
||||
F5=ї
|
||||
F6=Ў
|
||||
F7=ў
|
||||
F8=°
|
||||
F9=∙
|
||||
FA=·
|
||||
FB=√
|
||||
FC=№
|
||||
FD=¤
|
||||
FE=■
|
||||
FF=
|
||||
256
encodings/cyrillic_iso.tbl
Normal file
256
encodings/cyrillic_iso.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=
|
||||
81=
|
||||
82=
|
||||
83=
|
||||
84=
|
||||
85=
|
||||
86=
|
||||
87=
|
||||
88=
|
||||
89=
|
||||
8A=
|
||||
8B=
|
||||
8C=
|
||||
8D=
|
||||
8E=
|
||||
8F=
|
||||
90=
|
||||
91=
|
||||
92=
|
||||
93=
|
||||
94=
|
||||
95=
|
||||
96=
|
||||
97=
|
||||
98=
|
||||
99=
|
||||
9A=
|
||||
9B=
|
||||
9C=
|
||||
9D=
|
||||
9E=
|
||||
9F=
|
||||
A0=
|
||||
A1=Ё
|
||||
A2=Ђ
|
||||
A3=Ѓ
|
||||
A4=Є
|
||||
A5=Ѕ
|
||||
A6=І
|
||||
A7=Ї
|
||||
A8=Ј
|
||||
A9=Љ
|
||||
AA=Њ
|
||||
AB=Ћ
|
||||
AC=Ќ
|
||||
AD=
|
||||
AE=Ў
|
||||
AF=Џ
|
||||
B0=А
|
||||
B1=Б
|
||||
B2=В
|
||||
B3=Г
|
||||
B4=Д
|
||||
B5=Е
|
||||
B6=Ж
|
||||
B7=З
|
||||
B8=И
|
||||
B9=Й
|
||||
BA=К
|
||||
BB=Л
|
||||
BC=М
|
||||
BD=Н
|
||||
BE=О
|
||||
BF=П
|
||||
C0=Р
|
||||
C1=С
|
||||
C2=Т
|
||||
C3=У
|
||||
C4=Ф
|
||||
C5=Х
|
||||
C6=Ц
|
||||
C7=Ч
|
||||
C8=Ш
|
||||
C9=Щ
|
||||
CA=Ъ
|
||||
CB=Ы
|
||||
CC=Ь
|
||||
CD=Э
|
||||
CE=Ю
|
||||
CF=Я
|
||||
D0=а
|
||||
D1=б
|
||||
D2=в
|
||||
D3=г
|
||||
D4=д
|
||||
D5=е
|
||||
D6=ж
|
||||
D7=з
|
||||
D8=и
|
||||
D9=й
|
||||
DA=к
|
||||
DB=л
|
||||
DC=м
|
||||
DD=н
|
||||
DE=о
|
||||
DF=п
|
||||
E0=р
|
||||
E1=с
|
||||
E2=т
|
||||
E3=у
|
||||
E4=ф
|
||||
E5=х
|
||||
E6=ц
|
||||
E7=ч
|
||||
E8=ш
|
||||
E9=щ
|
||||
EA=ъ
|
||||
EB=ы
|
||||
EC=ь
|
||||
ED=э
|
||||
EE=ю
|
||||
EF=я
|
||||
F0=№
|
||||
F1=ё
|
||||
F2=ђ
|
||||
F3=ѓ
|
||||
F4=є
|
||||
F5=ѕ
|
||||
F6=і
|
||||
F7=ї
|
||||
F8=ј
|
||||
F9=љ
|
||||
FA=њ
|
||||
FB=ћ
|
||||
FC=ќ
|
||||
FD=§
|
||||
FE=ў
|
||||
FF=џ
|
||||
256
encodings/cyrillic_koi8_r.tbl
Normal file
256
encodings/cyrillic_koi8_r.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=─
|
||||
81=│
|
||||
82=┌
|
||||
83=┐
|
||||
84=└
|
||||
85=┘
|
||||
86=├
|
||||
87=┤
|
||||
88=┬
|
||||
89=┴
|
||||
8A=┼
|
||||
8B=▀
|
||||
8C=▄
|
||||
8D=█
|
||||
8E=▌
|
||||
8F=▐
|
||||
90=░
|
||||
91=▒
|
||||
92=▓
|
||||
93=⌠
|
||||
94=■
|
||||
95=∙
|
||||
96=√
|
||||
97=≈
|
||||
98=≤
|
||||
99=≥
|
||||
9A=
|
||||
9B=⌡
|
||||
9C=°
|
||||
9D=²
|
||||
9E=·
|
||||
9F=÷
|
||||
A0=═
|
||||
A1=║
|
||||
A2=╒
|
||||
A3=ё
|
||||
A4=╓
|
||||
A5=╔
|
||||
A6=╕
|
||||
A7=╖
|
||||
A8=╗
|
||||
A9=╘
|
||||
AA=╙
|
||||
AB=╚
|
||||
AC=╛
|
||||
AD=╜
|
||||
AE=╝
|
||||
AF=╞
|
||||
B0=╟
|
||||
B1=╠
|
||||
B2=╡
|
||||
B3=Ё
|
||||
B4=╢
|
||||
B5=╣
|
||||
B6=╤
|
||||
B7=╥
|
||||
B8=╦
|
||||
B9=╧
|
||||
BA=╨
|
||||
BB=╩
|
||||
BC=╪
|
||||
BD=╫
|
||||
BE=╬
|
||||
BF=©
|
||||
C0=ю
|
||||
C1=а
|
||||
C2=б
|
||||
C3=ц
|
||||
C4=д
|
||||
C5=е
|
||||
C6=ф
|
||||
C7=г
|
||||
C8=х
|
||||
C9=и
|
||||
CA=й
|
||||
CB=к
|
||||
CC=л
|
||||
CD=м
|
||||
CE=н
|
||||
CF=о
|
||||
D0=п
|
||||
D1=я
|
||||
D2=р
|
||||
D3=с
|
||||
D4=т
|
||||
D5=у
|
||||
D6=ж
|
||||
D7=в
|
||||
D8=ь
|
||||
D9=ы
|
||||
DA=з
|
||||
DB=ш
|
||||
DC=э
|
||||
DD=щ
|
||||
DE=ч
|
||||
DF=ъ
|
||||
E0=Ю
|
||||
E1=А
|
||||
E2=Б
|
||||
E3=Ц
|
||||
E4=Д
|
||||
E5=Е
|
||||
E6=Ф
|
||||
E7=Г
|
||||
E8=Х
|
||||
E9=И
|
||||
EA=Й
|
||||
EB=К
|
||||
EC=Л
|
||||
ED=М
|
||||
EE=Н
|
||||
EF=О
|
||||
F0=П
|
||||
F1=Я
|
||||
F2=Р
|
||||
F3=С
|
||||
F4=Т
|
||||
F5=У
|
||||
F6=Ж
|
||||
F7=В
|
||||
F8=Ь
|
||||
F9=Ы
|
||||
FA=З
|
||||
FB=Ш
|
||||
FC=Э
|
||||
FD=Щ
|
||||
FE=Ч
|
||||
FF=Ъ
|
||||
256
encodings/cyrillic_koi8_u.tbl
Normal file
256
encodings/cyrillic_koi8_u.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=─
|
||||
81=│
|
||||
82=┌
|
||||
83=┐
|
||||
84=└
|
||||
85=┘
|
||||
86=├
|
||||
87=┤
|
||||
88=┬
|
||||
89=┴
|
||||
8A=┼
|
||||
8B=▀
|
||||
8C=▄
|
||||
8D=█
|
||||
8E=▌
|
||||
8F=▐
|
||||
90=░
|
||||
91=▒
|
||||
92=▓
|
||||
93=⌠
|
||||
94=■
|
||||
95=∙
|
||||
96=√
|
||||
97=≈
|
||||
98=≤
|
||||
99=≥
|
||||
9A=
|
||||
9B=⌡
|
||||
9C=°
|
||||
9D=²
|
||||
9E=·
|
||||
9F=÷
|
||||
A0=═
|
||||
A1=║
|
||||
A2=╒
|
||||
A3=ё
|
||||
A4=є
|
||||
A5=╔
|
||||
A6=і
|
||||
A7=ї
|
||||
A8=╗
|
||||
A9=╘
|
||||
AA=╙
|
||||
AB=╚
|
||||
AC=╛
|
||||
AD=ґ
|
||||
AE=╝
|
||||
AF=╞
|
||||
B0=╟
|
||||
B1=╠
|
||||
B2=╡
|
||||
B3=Ё
|
||||
B4=Є
|
||||
B5=╣
|
||||
B6=І
|
||||
B7=Ї
|
||||
B8=╦
|
||||
B9=╧
|
||||
BA=╨
|
||||
BB=╩
|
||||
BC=╪
|
||||
BD=Ґ
|
||||
BE=╬
|
||||
BF=©
|
||||
C0=ю
|
||||
C1=а
|
||||
C2=б
|
||||
C3=ц
|
||||
C4=д
|
||||
C5=е
|
||||
C6=ф
|
||||
C7=г
|
||||
C8=х
|
||||
C9=и
|
||||
CA=й
|
||||
CB=к
|
||||
CC=л
|
||||
CD=м
|
||||
CE=н
|
||||
CF=о
|
||||
D0=п
|
||||
D1=я
|
||||
D2=р
|
||||
D3=с
|
||||
D4=т
|
||||
D5=у
|
||||
D6=ж
|
||||
D7=в
|
||||
D8=ь
|
||||
D9=ы
|
||||
DA=з
|
||||
DB=ш
|
||||
DC=э
|
||||
DD=щ
|
||||
DE=ч
|
||||
DF=ъ
|
||||
E0=Ю
|
||||
E1=А
|
||||
E2=Б
|
||||
E3=Ц
|
||||
E4=Д
|
||||
E5=Е
|
||||
E6=Ф
|
||||
E7=Г
|
||||
E8=Х
|
||||
E9=И
|
||||
EA=Й
|
||||
EB=К
|
||||
EC=Л
|
||||
ED=М
|
||||
EE=Н
|
||||
EF=О
|
||||
F0=П
|
||||
F1=Я
|
||||
F2=Р
|
||||
F3=С
|
||||
F4=Т
|
||||
F5=У
|
||||
F6=Ж
|
||||
F7=В
|
||||
F8=Ь
|
||||
F9=Ы
|
||||
FA=З
|
||||
FB=Ш
|
||||
FC=Э
|
||||
FD=Щ
|
||||
FE=Ч
|
||||
FF=Ъ
|
||||
256
encodings/cyrillic_windows.tbl
Normal file
256
encodings/cyrillic_windows.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=Ђ
|
||||
81=Ѓ
|
||||
82=‚
|
||||
83=ѓ
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88=€
|
||||
89=‰
|
||||
8A=Љ
|
||||
8B=‹
|
||||
8C=Њ
|
||||
8D=Ќ
|
||||
8E=Ћ
|
||||
8F=Џ
|
||||
90=ђ
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98
|
||||
99=™
|
||||
9A=љ
|
||||
9B=›
|
||||
9C=њ
|
||||
9D=ќ
|
||||
9E=ћ
|
||||
9F=џ
|
||||
A0=
|
||||
A1=Ў
|
||||
A2=ў
|
||||
A3=Ј
|
||||
A4=¤
|
||||
A5=Ґ
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=Ё
|
||||
A9=©
|
||||
AA=Є
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=Ї
|
||||
B0=°
|
||||
B1=±
|
||||
B2=І
|
||||
B3=і
|
||||
B4=ґ
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=ё
|
||||
B9=№
|
||||
BA=є
|
||||
BB=»
|
||||
BC=ј
|
||||
BD=Ѕ
|
||||
BE=ѕ
|
||||
BF=ї
|
||||
C0=А
|
||||
C1=Б
|
||||
C2=В
|
||||
C3=Г
|
||||
C4=Д
|
||||
C5=Е
|
||||
C6=Ж
|
||||
C7=З
|
||||
C8=И
|
||||
C9=Й
|
||||
CA=К
|
||||
CB=Л
|
||||
CC=М
|
||||
CD=Н
|
||||
CE=О
|
||||
CF=П
|
||||
D0=Р
|
||||
D1=С
|
||||
D2=Т
|
||||
D3=У
|
||||
D4=Ф
|
||||
D5=Х
|
||||
D6=Ц
|
||||
D7=Ч
|
||||
D8=Ш
|
||||
D9=Щ
|
||||
DA=Ъ
|
||||
DB=Ы
|
||||
DC=Ь
|
||||
DD=Э
|
||||
DE=Ю
|
||||
DF=Я
|
||||
E0=а
|
||||
E1=б
|
||||
E2=в
|
||||
E3=г
|
||||
E4=д
|
||||
E5=е
|
||||
E6=ж
|
||||
E7=з
|
||||
E8=и
|
||||
E9=й
|
||||
EA=к
|
||||
EB=л
|
||||
EC=м
|
||||
ED=н
|
||||
EE=о
|
||||
EF=п
|
||||
F0=р
|
||||
F1=с
|
||||
F2=т
|
||||
F3=у
|
||||
F4=ф
|
||||
F5=х
|
||||
F6=ц
|
||||
F7=ч
|
||||
F8=ш
|
||||
F9=щ
|
||||
FA=ъ
|
||||
FB=ы
|
||||
FC=ь
|
||||
FD=э
|
||||
FE=ю
|
||||
FF=я
|
||||
256
encodings/eastern_europe_iso.tbl
Normal file
256
encodings/eastern_europe_iso.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=
|
||||
81=
|
||||
82=
|
||||
83=
|
||||
84=
|
||||
85=
|
||||
86=
|
||||
87=
|
||||
88=
|
||||
89=
|
||||
8A=
|
||||
8B=
|
||||
8C=
|
||||
8D=
|
||||
8E=
|
||||
8F=
|
||||
90=
|
||||
91=
|
||||
92=
|
||||
93=
|
||||
94=
|
||||
95=
|
||||
96=
|
||||
97=
|
||||
98=
|
||||
99=
|
||||
9A=
|
||||
9B=
|
||||
9C=
|
||||
9D=
|
||||
9E=
|
||||
9F=
|
||||
A0=
|
||||
A1=Ą
|
||||
A2=˘
|
||||
A3=Ł
|
||||
A4=¤
|
||||
A5=Ľ
|
||||
A6=Ś
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=Š
|
||||
AA=Ş
|
||||
AB=Ť
|
||||
AC=Ź
|
||||
AD=
|
||||
AE=Ž
|
||||
AF=Ż
|
||||
B0=°
|
||||
B1=ą
|
||||
B2=˛
|
||||
B3=ł
|
||||
B4=´
|
||||
B5=ľ
|
||||
B6=ś
|
||||
B7=ˇ
|
||||
B8=¸
|
||||
B9=š
|
||||
BA=ş
|
||||
BB=ť
|
||||
BC=ź
|
||||
BD=˝
|
||||
BE=ž
|
||||
BF=ż
|
||||
C0=Ŕ
|
||||
C1=Á
|
||||
C2=Â
|
||||
C3=Ă
|
||||
C4=Ä
|
||||
C5=Ĺ
|
||||
C6=Ć
|
||||
C7=Ç
|
||||
C8=Č
|
||||
C9=É
|
||||
CA=Ę
|
||||
CB=Ë
|
||||
CC=Ě
|
||||
CD=Í
|
||||
CE=Î
|
||||
CF=Ď
|
||||
D0=Đ
|
||||
D1=Ń
|
||||
D2=Ň
|
||||
D3=Ó
|
||||
D4=Ô
|
||||
D5=Ő
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ř
|
||||
D9=Ů
|
||||
DA=Ú
|
||||
DB=Ű
|
||||
DC=Ü
|
||||
DD=Ý
|
||||
DE=Ţ
|
||||
DF=ß
|
||||
E0=ŕ
|
||||
E1=á
|
||||
E2=â
|
||||
E3=ă
|
||||
E4=ä
|
||||
E5=ĺ
|
||||
E6=ć
|
||||
E7=ç
|
||||
E8=č
|
||||
E9=é
|
||||
EA=ę
|
||||
EB=ë
|
||||
EC=ě
|
||||
ED=í
|
||||
EE=î
|
||||
EF=ď
|
||||
F0=đ
|
||||
F1=ń
|
||||
F2=ň
|
||||
F3=ó
|
||||
F4=ô
|
||||
F5=ő
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ř
|
||||
F9=ů
|
||||
FA=ú
|
||||
FB=ű
|
||||
FC=ü
|
||||
FD=ý
|
||||
FE=ţ
|
||||
FF=˙
|
||||
256
encodings/eastern_europe_windows.tbl
Normal file
256
encodings/eastern_europe_windows.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82=‚
|
||||
83
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88
|
||||
89=‰
|
||||
8A=Š
|
||||
8B=‹
|
||||
8C=Ś
|
||||
8D=Ť
|
||||
8E=Ž
|
||||
8F=Ź
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98
|
||||
99=™
|
||||
9A=š
|
||||
9B=›
|
||||
9C=ś
|
||||
9D=ť
|
||||
9E=ž
|
||||
9F=ź
|
||||
A0=
|
||||
A1=ˇ
|
||||
A2=˘
|
||||
A3=Ł
|
||||
A4=¤
|
||||
A5=Ą
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=Ş
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=Ż
|
||||
B0=°
|
||||
B1=±
|
||||
B2=˛
|
||||
B3=ł
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=ą
|
||||
BA=ş
|
||||
BB=»
|
||||
BC=Ľ
|
||||
BD=˝
|
||||
BE=ľ
|
||||
BF=ż
|
||||
C0=Ŕ
|
||||
C1=Á
|
||||
C2=Â
|
||||
C3=Ă
|
||||
C4=Ä
|
||||
C5=Ĺ
|
||||
C6=Ć
|
||||
C7=Ç
|
||||
C8=Č
|
||||
C9=É
|
||||
CA=Ę
|
||||
CB=Ë
|
||||
CC=Ě
|
||||
CD=Í
|
||||
CE=Î
|
||||
CF=Ď
|
||||
D0=Đ
|
||||
D1=Ń
|
||||
D2=Ň
|
||||
D3=Ó
|
||||
D4=Ô
|
||||
D5=Ő
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ř
|
||||
D9=Ů
|
||||
DA=Ú
|
||||
DB=Ű
|
||||
DC=Ü
|
||||
DD=Ý
|
||||
DE=Ţ
|
||||
DF=ß
|
||||
E0=ŕ
|
||||
E1=á
|
||||
E2=â
|
||||
E3=ă
|
||||
E4=ä
|
||||
E5=ĺ
|
||||
E6=ć
|
||||
E7=ç
|
||||
E8=č
|
||||
E9=é
|
||||
EA=ę
|
||||
EB=ë
|
||||
EC=ě
|
||||
ED=í
|
||||
EE=î
|
||||
EF=ď
|
||||
F0=đ
|
||||
F1=ń
|
||||
F2=ň
|
||||
F3=ó
|
||||
F4=ô
|
||||
F5=ő
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ř
|
||||
F9=ů
|
||||
FA=ú
|
||||
FB=ű
|
||||
FC=ü
|
||||
FD=ý
|
||||
FE=ţ
|
||||
FF=˙
|
||||
256
encodings/ebcdic.tbl
Normal file
256
encodings/ebcdic.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=
|
||||
05=TAB
|
||||
06=
|
||||
07=DEL
|
||||
08=
|
||||
09=
|
||||
0A=
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=
|
||||
15=
|
||||
16=BS
|
||||
17=
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=
|
||||
1B=
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=
|
||||
22=
|
||||
23=
|
||||
24=
|
||||
25=LF
|
||||
26=ETB
|
||||
27=ESC
|
||||
28=
|
||||
29=
|
||||
2A=
|
||||
2B=
|
||||
2C=
|
||||
2D=ENQ
|
||||
2E=ACK
|
||||
2F=BEL
|
||||
30=
|
||||
31=
|
||||
32=SYN
|
||||
33=
|
||||
34=
|
||||
35=
|
||||
36=
|
||||
37=EOT
|
||||
38=
|
||||
39=
|
||||
3A=
|
||||
3B=
|
||||
3C=DC4
|
||||
3D=NAK
|
||||
3E=
|
||||
3F=SUB
|
||||
40=
|
||||
41=
|
||||
42=â
|
||||
43=ä
|
||||
44=à
|
||||
45=á
|
||||
46=ã
|
||||
47=å
|
||||
48=ç
|
||||
49=ñ
|
||||
4A=¢
|
||||
4B=.
|
||||
4C=<
|
||||
4D=(
|
||||
4E=+
|
||||
4F=|
|
||||
50=&
|
||||
51=é
|
||||
52=ê
|
||||
53=ë
|
||||
54=è
|
||||
55=í
|
||||
56=î
|
||||
57=ï
|
||||
58=ì
|
||||
59=ß
|
||||
5A=!
|
||||
5B=$
|
||||
5C=*
|
||||
5D=)
|
||||
5E=;
|
||||
5F=¬
|
||||
60=-
|
||||
61=/
|
||||
62=Â
|
||||
63=Ä
|
||||
64=À
|
||||
65=Á
|
||||
66=Ã
|
||||
67=Å
|
||||
68=Ç
|
||||
69=Ñ
|
||||
6A=¦
|
||||
6B=,
|
||||
6C=%
|
||||
6D=_
|
||||
6E=>
|
||||
6F=?
|
||||
70=ø
|
||||
71=É
|
||||
72=Ê
|
||||
73=Ë
|
||||
74=È
|
||||
75=Í
|
||||
76=Î
|
||||
77=Ï
|
||||
78=Ì
|
||||
79=`
|
||||
7A=:
|
||||
7B=#
|
||||
7C=@
|
||||
7D='
|
||||
7E==
|
||||
7F="
|
||||
80=Ø
|
||||
81=a
|
||||
82=b
|
||||
83=c
|
||||
84=d
|
||||
85=e
|
||||
86=f
|
||||
87=g
|
||||
88=h
|
||||
89=i
|
||||
8A=«
|
||||
8B=»
|
||||
8C=ð
|
||||
8D=ý
|
||||
8E=þ
|
||||
8F=±
|
||||
90=°
|
||||
91=j
|
||||
92=k
|
||||
93=l
|
||||
94=m
|
||||
95=n
|
||||
96=o
|
||||
97=p
|
||||
98=q
|
||||
99=r
|
||||
9A=ª
|
||||
9B=º
|
||||
9C=æ
|
||||
9D=¸
|
||||
9E=Æ
|
||||
9F=¤
|
||||
A0=µ
|
||||
A1=~
|
||||
A2=s
|
||||
A3=t
|
||||
A4=u
|
||||
A5=v
|
||||
A6=w
|
||||
A7=x
|
||||
A8=y
|
||||
A9=z
|
||||
AA=¡
|
||||
AB=¿
|
||||
AC=Ð
|
||||
AD=Ý
|
||||
AE=Þ
|
||||
AF=®
|
||||
B0=^
|
||||
B1=£
|
||||
B2=¥
|
||||
B3=·
|
||||
B4=©
|
||||
B5=§
|
||||
B6=¶
|
||||
B7=¼
|
||||
B8=½
|
||||
B9=¾
|
||||
BA=[
|
||||
BB=]
|
||||
BC=¯
|
||||
BD=¨
|
||||
BE=´
|
||||
BF=×
|
||||
C0={
|
||||
C1=A
|
||||
C2=B
|
||||
C3=C
|
||||
C4=D
|
||||
C5=E
|
||||
C6=F
|
||||
C7=G
|
||||
C8=H
|
||||
C9=I
|
||||
CA=
|
||||
CB=ô
|
||||
CC=ö
|
||||
CD=ò
|
||||
CE=ó
|
||||
CF=õ
|
||||
D0=}
|
||||
D1=J
|
||||
D2=K
|
||||
D3=L
|
||||
D4=M
|
||||
D5=N
|
||||
D6=O
|
||||
D7=P
|
||||
D8=Q
|
||||
D9=R
|
||||
DA=¹
|
||||
DB=û
|
||||
DC=ü
|
||||
DD=ù
|
||||
DE=ú
|
||||
DF=ÿ
|
||||
E0=\
|
||||
E1=÷
|
||||
E2=S
|
||||
E3=T
|
||||
E4=U
|
||||
E5=V
|
||||
E6=W
|
||||
E7=X
|
||||
E8=Y
|
||||
E9=Z
|
||||
EA=²
|
||||
EB=Ô
|
||||
EC=Ö
|
||||
ED=Ò
|
||||
EE=Ó
|
||||
EF=Õ
|
||||
F0=0
|
||||
F1=1
|
||||
F2=2
|
||||
F3=3
|
||||
F4=4
|
||||
F5=5
|
||||
F6=6
|
||||
F7=7
|
||||
F8=8
|
||||
F9=9
|
||||
FA=³
|
||||
FB=Û
|
||||
FC=Ü
|
||||
FD=Ù
|
||||
FE=Ú
|
||||
FF=
|
||||
16674
encodings/euc_kr.tbl
Normal file
16674
encodings/euc_kr.tbl
Normal file
File diff suppressed because it is too large
Load Diff
256
encodings/greek_iso.tbl
Normal file
256
encodings/greek_iso.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=
|
||||
81=
|
||||
82=
|
||||
83=
|
||||
84=
|
||||
85=
|
||||
86=
|
||||
87=
|
||||
88=
|
||||
89=
|
||||
8A=
|
||||
8B=
|
||||
8C=
|
||||
8D=
|
||||
8E=
|
||||
8F=
|
||||
90=
|
||||
91=
|
||||
92=
|
||||
93=
|
||||
94=
|
||||
95=
|
||||
96=
|
||||
97=
|
||||
98=
|
||||
99=
|
||||
9A=
|
||||
9B=
|
||||
9C=
|
||||
9D=
|
||||
9E=
|
||||
9F=
|
||||
A0=
|
||||
A1=‘
|
||||
A2=’
|
||||
A3=£
|
||||
A4
|
||||
A5
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE
|
||||
AF=―
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=΄
|
||||
B5=΅
|
||||
B6=Ά
|
||||
B7=·
|
||||
B8=Έ
|
||||
B9=Ή
|
||||
BA=Ί
|
||||
BB=»
|
||||
BC=Ό
|
||||
BD=½
|
||||
BE=Ύ
|
||||
BF=Ώ
|
||||
C0=ΐ
|
||||
C1=Α
|
||||
C2=Β
|
||||
C3=Γ
|
||||
C4=Δ
|
||||
C5=Ε
|
||||
C6=Ζ
|
||||
C7=Η
|
||||
C8=Θ
|
||||
C9=Ι
|
||||
CA=Κ
|
||||
CB=Λ
|
||||
CC=Μ
|
||||
CD=Ν
|
||||
CE=Ξ
|
||||
CF=Ο
|
||||
D0=Π
|
||||
D1=Ρ
|
||||
D2
|
||||
D3=Σ
|
||||
D4=Τ
|
||||
D5=Υ
|
||||
D6=Φ
|
||||
D7=Χ
|
||||
D8=Ψ
|
||||
D9=Ω
|
||||
DA=Ϊ
|
||||
DB=Ϋ
|
||||
DC=ά
|
||||
DD=έ
|
||||
DE=ή
|
||||
DF=ί
|
||||
E0=ΰ
|
||||
E1=α
|
||||
E2=β
|
||||
E3=γ
|
||||
E4=δ
|
||||
E5=ε
|
||||
E6=ζ
|
||||
E7=η
|
||||
E8=θ
|
||||
E9=ι
|
||||
EA=κ
|
||||
EB=λ
|
||||
EC=μ
|
||||
ED=ν
|
||||
EE=ξ
|
||||
EF=ο
|
||||
F0=π
|
||||
F1=ρ
|
||||
F2=ς
|
||||
F3=σ
|
||||
F4=τ
|
||||
F5=υ
|
||||
F6=φ
|
||||
F7=χ
|
||||
F8=ψ
|
||||
F9=ω
|
||||
FA=ϊ
|
||||
FB=ϋ
|
||||
FC=ό
|
||||
FD=ύ
|
||||
FE=ώ
|
||||
FF
|
||||
256
encodings/greek_windows.tbl
Normal file
256
encodings/greek_windows.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82=‚
|
||||
83=ƒ
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88
|
||||
89=‰
|
||||
8A
|
||||
8B=‹
|
||||
8C
|
||||
8D
|
||||
8E
|
||||
8F
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98
|
||||
99=™
|
||||
9A
|
||||
9B=›
|
||||
9C
|
||||
9D
|
||||
9E
|
||||
9F
|
||||
A0=
|
||||
A1=΅
|
||||
A2=Ά
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=―
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=΄
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=Έ
|
||||
B9=Ή
|
||||
BA=Ί
|
||||
BB=»
|
||||
BC=Ό
|
||||
BD=½
|
||||
BE=Ύ
|
||||
BF=Ώ
|
||||
C0=ΐ
|
||||
C1=Α
|
||||
C2=Β
|
||||
C3=Γ
|
||||
C4=Δ
|
||||
C5=Ε
|
||||
C6=Ζ
|
||||
C7=Η
|
||||
C8=Θ
|
||||
C9=Ι
|
||||
CA=Κ
|
||||
CB=Λ
|
||||
CC=Μ
|
||||
CD=Ν
|
||||
CE=Ξ
|
||||
CF=Ο
|
||||
D0=Π
|
||||
D1=Ρ
|
||||
D2
|
||||
D3=Σ
|
||||
D4=Τ
|
||||
D5=Υ
|
||||
D6=Φ
|
||||
D7=Χ
|
||||
D8=Ψ
|
||||
D9=Ω
|
||||
DA=Ϊ
|
||||
DB=Ϋ
|
||||
DC=ά
|
||||
DD=έ
|
||||
DE=ή
|
||||
DF=ί
|
||||
E0=ΰ
|
||||
E1=α
|
||||
E2=β
|
||||
E3=γ
|
||||
E4=δ
|
||||
E5=ε
|
||||
E6=ζ
|
||||
E7=η
|
||||
E8=θ
|
||||
E9=ι
|
||||
EA=κ
|
||||
EB=λ
|
||||
EC=μ
|
||||
ED=ν
|
||||
EE=ξ
|
||||
EF=ο
|
||||
F0=π
|
||||
F1=ρ
|
||||
F2=ς
|
||||
F3=σ
|
||||
F4=τ
|
||||
F5=υ
|
||||
F6=φ
|
||||
F7=χ
|
||||
F8=ψ
|
||||
F9=ω
|
||||
FA=ϊ
|
||||
FB=ϋ
|
||||
FC=ό
|
||||
FD=ύ
|
||||
FE=ώ
|
||||
FF
|
||||
256
encodings/hebrew_iso.tbl
Normal file
256
encodings/hebrew_iso.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=
|
||||
81=
|
||||
82=
|
||||
83=
|
||||
84=
|
||||
85=
|
||||
86=
|
||||
87=
|
||||
88=
|
||||
89=
|
||||
8A=
|
||||
8B=
|
||||
8C=
|
||||
8D=
|
||||
8E=
|
||||
8F=
|
||||
90=
|
||||
91=
|
||||
92=
|
||||
93=
|
||||
94=
|
||||
95=
|
||||
96=
|
||||
97=
|
||||
98=
|
||||
99=
|
||||
9A=
|
||||
9B=
|
||||
9C=
|
||||
9D=
|
||||
9E=
|
||||
9F=
|
||||
A0=
|
||||
A1
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=×
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=‾
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=¹
|
||||
BA=÷
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF
|
||||
C0
|
||||
C1
|
||||
C2
|
||||
C3
|
||||
C4
|
||||
C5
|
||||
C6
|
||||
C7
|
||||
C8
|
||||
C9
|
||||
CA
|
||||
CB
|
||||
CC
|
||||
CD
|
||||
CE
|
||||
CF
|
||||
D0
|
||||
D1
|
||||
D2
|
||||
D3
|
||||
D4
|
||||
D5
|
||||
D6
|
||||
D7
|
||||
D8
|
||||
D9
|
||||
DA
|
||||
DB
|
||||
DC
|
||||
DD
|
||||
DE
|
||||
DF=‗
|
||||
E0=א
|
||||
E1=ב
|
||||
E2=ג
|
||||
E3=ד
|
||||
E4=ה
|
||||
E5=ו
|
||||
E6=ז
|
||||
E7=ח
|
||||
E8=ט
|
||||
E9=י
|
||||
EA=ך
|
||||
EB=כ
|
||||
EC=ל
|
||||
ED=ם
|
||||
EE=מ
|
||||
EF=ן
|
||||
F0=נ
|
||||
F1=ס
|
||||
F2=ע
|
||||
F3=ף
|
||||
F4=פ
|
||||
F5=ץ
|
||||
F6=צ
|
||||
F7=ק
|
||||
F8=ר
|
||||
F9=ש
|
||||
FA=ת
|
||||
FB
|
||||
FC
|
||||
FD
|
||||
FE
|
||||
FF
|
||||
256
encodings/hebrew_windows.tbl
Normal file
256
encodings/hebrew_windows.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82=‚
|
||||
83=ƒ
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88=ˆ
|
||||
89=‰
|
||||
8A
|
||||
8B=‹
|
||||
8C
|
||||
8D
|
||||
8E
|
||||
8F
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98=˜
|
||||
99=™
|
||||
9A
|
||||
9B=›
|
||||
9C
|
||||
9D
|
||||
9E
|
||||
9F
|
||||
A0=
|
||||
A1=¡
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=₪
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=×
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=¯
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=¹
|
||||
BA=÷
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=¿
|
||||
C0=ְ
|
||||
C1=ֱ
|
||||
C2=ֲ
|
||||
C3=ֳ
|
||||
C4=ִ
|
||||
C5=ֵ
|
||||
C6=ֶ
|
||||
C7=ַ
|
||||
C8=ָ
|
||||
C9=ֹ
|
||||
CA
|
||||
CB=ֻ
|
||||
CC=ּ
|
||||
CD=ֽ
|
||||
CE=־
|
||||
CF=ֿ
|
||||
D0=׀
|
||||
D1=ׁ
|
||||
D2=ׂ
|
||||
D3=׃
|
||||
D4=װ
|
||||
D5=ױ
|
||||
D6=ײ
|
||||
D7=׳
|
||||
D8=״
|
||||
D9
|
||||
DA
|
||||
DB
|
||||
DC
|
||||
DD
|
||||
DE
|
||||
DF
|
||||
E0=א
|
||||
E1=ב
|
||||
E2=ג
|
||||
E3=ד
|
||||
E4=ה
|
||||
E5=ו
|
||||
E6=ז
|
||||
E7=ח
|
||||
E8=ט
|
||||
E9=י
|
||||
EA=ך
|
||||
EB=כ
|
||||
EC=ל
|
||||
ED=ם
|
||||
EE=מ
|
||||
EF=ן
|
||||
F0=נ
|
||||
F1=ס
|
||||
F2=ע
|
||||
F3=ף
|
||||
F4=פ
|
||||
F5=ץ
|
||||
F6=צ
|
||||
F7=ק
|
||||
F8=ר
|
||||
F9=ש
|
||||
FA=ת
|
||||
FB
|
||||
FC
|
||||
FD=
|
||||
FE=
|
||||
FF
|
||||
256
encodings/macintosh.tbl
Normal file
256
encodings/macintosh.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=Ä
|
||||
81=Å
|
||||
82=Ç
|
||||
83=É
|
||||
84=Ñ
|
||||
85=Ö
|
||||
86=Ü
|
||||
87=á
|
||||
88=à
|
||||
89=â
|
||||
8A=ä
|
||||
8B=ã
|
||||
8C=å
|
||||
8D=ç
|
||||
8E=é
|
||||
8F=è
|
||||
90=ê
|
||||
91=ë
|
||||
92=í
|
||||
93=ì
|
||||
94=î
|
||||
95=ï
|
||||
96=ñ
|
||||
97=ó
|
||||
98=ò
|
||||
99=ô
|
||||
9A=ö
|
||||
9B=õ
|
||||
9C=ú
|
||||
9D=ù
|
||||
9E=û
|
||||
9F=ü
|
||||
A0=†
|
||||
A1=°
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=§
|
||||
A5=•
|
||||
A6=¶
|
||||
A7=ß
|
||||
A8=®
|
||||
A9=©
|
||||
AA=™
|
||||
AB=´
|
||||
AC=¨
|
||||
AD=≠
|
||||
AE=Æ
|
||||
AF=Ø
|
||||
B0=∞
|
||||
B1=±
|
||||
B2=≤
|
||||
B3=≥
|
||||
B4=¥
|
||||
B5=µ
|
||||
B6=∂
|
||||
B7=∑
|
||||
B8=∏
|
||||
B9=π
|
||||
BA=∫
|
||||
BB=ª
|
||||
BC=º
|
||||
BD=Ω
|
||||
BE=æ
|
||||
BF=ø
|
||||
C0=¿
|
||||
C1=¡
|
||||
C2=¬
|
||||
C3=√
|
||||
C4=ƒ
|
||||
C5=≈
|
||||
C6=∆
|
||||
C7=«
|
||||
C8=»
|
||||
C9=…
|
||||
CA=
|
||||
CB=À
|
||||
CC=Ã
|
||||
CD=Õ
|
||||
CE=Œ
|
||||
CF=œ
|
||||
D0=–
|
||||
D1=—
|
||||
D2=“
|
||||
D3=”
|
||||
D4=‘
|
||||
D5=’
|
||||
D6=÷
|
||||
D7=◊
|
||||
D8=ÿ
|
||||
D9=Ÿ
|
||||
DA=⁄
|
||||
DB=€
|
||||
DC=‹
|
||||
DD=›
|
||||
DE=fi
|
||||
DF=fl
|
||||
E0=‡
|
||||
E1=·
|
||||
E2=‚
|
||||
E3=„
|
||||
E4=‰
|
||||
E5=Â
|
||||
E6=Ê
|
||||
E7=Á
|
||||
E8=Ë
|
||||
E9=È
|
||||
EA=Í
|
||||
EB=Î
|
||||
EC=Ï
|
||||
ED=Ì
|
||||
EE=Ó
|
||||
EF=Ô
|
||||
F0=
|
||||
F1=Ò
|
||||
F2=Ú
|
||||
F3=Û
|
||||
F4=Ù
|
||||
F5=ı
|
||||
F6=ˆ
|
||||
F7=˜
|
||||
F8=¯
|
||||
F9=˘
|
||||
FA=˙
|
||||
FB=˚
|
||||
FC=¸
|
||||
FD=˝
|
||||
FE=˛
|
||||
FF=ˇ
|
||||
7120
encodings/ms932.tbl
Normal file
7120
encodings/ms932.tbl
Normal file
File diff suppressed because it is too large
Load Diff
255
encodings/pokegen1_en.tbl
Normal file
255
encodings/pokegen1_en.tbl
Normal file
@@ -0,0 +1,255 @@
|
||||
00=NUL
|
||||
01
|
||||
02
|
||||
03
|
||||
04
|
||||
05
|
||||
06
|
||||
07
|
||||
08
|
||||
09
|
||||
0A
|
||||
0B
|
||||
0C
|
||||
0D
|
||||
0E
|
||||
0F
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
1A
|
||||
1B
|
||||
1C
|
||||
1D
|
||||
1E
|
||||
1F
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
2A
|
||||
2B
|
||||
2C
|
||||
2D
|
||||
2E
|
||||
2F
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
3A
|
||||
3B
|
||||
3C
|
||||
3D
|
||||
3E
|
||||
3F
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49=page
|
||||
4A=PkMn
|
||||
4B=_cont
|
||||
4C=autocont
|
||||
4D
|
||||
4E=next line
|
||||
4F=bottom line
|
||||
50=end
|
||||
51=paragraph
|
||||
52=player name
|
||||
53=rival name
|
||||
54=Poké
|
||||
55=cont
|
||||
56=......
|
||||
57=done
|
||||
58=prompt
|
||||
59=target
|
||||
5A=user
|
||||
5B=PC
|
||||
5C=TM
|
||||
5D=TRAINER
|
||||
5E=ROCKET
|
||||
5F=dex
|
||||
60=A
|
||||
61=B
|
||||
62=C
|
||||
63=D
|
||||
64=E
|
||||
65=F
|
||||
66=G
|
||||
67=H
|
||||
68=I
|
||||
69=V
|
||||
6A=S
|
||||
6B=L
|
||||
6C=M
|
||||
6D=:
|
||||
6E=ぃ
|
||||
6F=ぅ
|
||||
70=‘
|
||||
71=’
|
||||
72=“
|
||||
73=”
|
||||
74=・
|
||||
75=⋯
|
||||
76=ぁ
|
||||
77=ぇ
|
||||
78=ぉ
|
||||
79
|
||||
7A
|
||||
7B
|
||||
7C
|
||||
7D
|
||||
7E
|
||||
7F
|
||||
80=A
|
||||
81=B
|
||||
82=C
|
||||
83=D
|
||||
84=E
|
||||
85=F
|
||||
86=G
|
||||
87=H
|
||||
88=I
|
||||
89=J
|
||||
8A=K
|
||||
8B=L
|
||||
8C=M
|
||||
8D=N
|
||||
8E=O
|
||||
8F=P
|
||||
90=Q
|
||||
91=R
|
||||
92=S
|
||||
93=T
|
||||
94=U
|
||||
95=V
|
||||
96=W
|
||||
97=X
|
||||
98=Y
|
||||
99=Z
|
||||
9A=(
|
||||
9B=)
|
||||
9C=
|
||||
9D=;
|
||||
9E=[
|
||||
9F=]
|
||||
A0=a
|
||||
A1=b
|
||||
A2=c
|
||||
A3=d
|
||||
A4=e
|
||||
A5=f
|
||||
A6=g
|
||||
A7=h
|
||||
A8=i
|
||||
A9=j
|
||||
AA=k
|
||||
AB=l
|
||||
AC=m
|
||||
AD=n
|
||||
AE=o
|
||||
AF=p
|
||||
B0=q
|
||||
B1=r
|
||||
B2=s
|
||||
B3=t
|
||||
B4=u
|
||||
B5=v
|
||||
B6=w
|
||||
B7=x
|
||||
B8=y
|
||||
B9=z
|
||||
BA=é
|
||||
BB='d
|
||||
BC='l
|
||||
BD='s
|
||||
BE='t
|
||||
BF='v
|
||||
C0
|
||||
C1
|
||||
C2
|
||||
C3
|
||||
C4
|
||||
C5
|
||||
C6
|
||||
C7
|
||||
C8
|
||||
C9
|
||||
CA
|
||||
CB
|
||||
CC
|
||||
CD
|
||||
CE
|
||||
CF
|
||||
D0
|
||||
D1
|
||||
D2
|
||||
D3
|
||||
D4
|
||||
D5
|
||||
D6
|
||||
D7
|
||||
D8
|
||||
D9
|
||||
DA
|
||||
DB
|
||||
DC
|
||||
DD
|
||||
DE
|
||||
DF
|
||||
E0='
|
||||
E1=Pk
|
||||
E2=Mn
|
||||
E3=-
|
||||
E4='r
|
||||
E5='m
|
||||
E6=?
|
||||
E7=!
|
||||
E8=.
|
||||
E9=ァ
|
||||
EA=ゥ
|
||||
EB=ェ
|
||||
EC=▷
|
||||
ED=▶
|
||||
EE=▼
|
||||
EF=♂
|
||||
F0=$
|
||||
F1=×
|
||||
F2=.
|
||||
F3=/
|
||||
F4=,
|
||||
F5=♀
|
||||
F6=0
|
||||
F7=1
|
||||
F8=2
|
||||
F9=3
|
||||
FA=4
|
||||
FB=5
|
||||
FC=6
|
||||
FD=7
|
||||
FE=8
|
||||
FF=9
|
||||
256
encodings/pokegen3_en.tbl
Normal file
256
encodings/pokegen3_en.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00
|
||||
01=À
|
||||
02=Á
|
||||
03=Â
|
||||
04=Ç
|
||||
05=È
|
||||
06=È
|
||||
07=Ê
|
||||
08=Ë
|
||||
09=Ì
|
||||
0a
|
||||
0b=Î
|
||||
0c=Ï
|
||||
0d=Ò
|
||||
0e=Ó
|
||||
0f=Ô
|
||||
10=Œ
|
||||
11=Ù
|
||||
12=Ú
|
||||
13=Û
|
||||
14=Ñ
|
||||
15=ß
|
||||
16=à
|
||||
17=á
|
||||
18
|
||||
19=ç
|
||||
1a=è
|
||||
1b=é
|
||||
1c=ê
|
||||
1d=ë
|
||||
1e=ì
|
||||
1f
|
||||
20=î
|
||||
21=ï
|
||||
22=ò
|
||||
23=ó
|
||||
24=ô
|
||||
25=œ
|
||||
26=ù
|
||||
27=ú
|
||||
28=û
|
||||
29=ñ
|
||||
2a=º
|
||||
2b=ª
|
||||
2c=ᵉʳ
|
||||
2d=&
|
||||
2e=+
|
||||
2f
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35==
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
3a
|
||||
3b
|
||||
3c
|
||||
3d
|
||||
3e
|
||||
3f
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
4a
|
||||
4b
|
||||
4c
|
||||
4d
|
||||
4e
|
||||
4f
|
||||
50
|
||||
51=¿
|
||||
52=¡
|
||||
53=Pk
|
||||
54=Mn
|
||||
55=Po
|
||||
56=Ké
|
||||
57
|
||||
58
|
||||
59
|
||||
5a=Í
|
||||
5b=%
|
||||
5c=(
|
||||
5d=)
|
||||
5e
|
||||
5f
|
||||
60
|
||||
61
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
67
|
||||
68=â
|
||||
69
|
||||
6a
|
||||
6b
|
||||
6c
|
||||
6d
|
||||
6e
|
||||
6f=í
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76
|
||||
77
|
||||
78
|
||||
79=⬆
|
||||
7a=⬇
|
||||
7b=⬅
|
||||
7c=➡
|
||||
7d
|
||||
7e
|
||||
7f
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
8a
|
||||
8b
|
||||
8c
|
||||
8d
|
||||
8e
|
||||
8f
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97
|
||||
98
|
||||
99
|
||||
9a
|
||||
9b
|
||||
9c
|
||||
9d
|
||||
9e
|
||||
9f
|
||||
a0
|
||||
a1=0
|
||||
a2=1
|
||||
a3=2
|
||||
a4=3
|
||||
a5=4
|
||||
a6=5
|
||||
a7=6
|
||||
a8=7
|
||||
a9=8
|
||||
aa=9
|
||||
ab=!
|
||||
ac=?
|
||||
ad=.
|
||||
ae=-
|
||||
af=・
|
||||
b0
|
||||
b1=“
|
||||
b2=”
|
||||
b3=‘
|
||||
b4=’
|
||||
b5=♂
|
||||
b6=♀
|
||||
b7
|
||||
b8=,
|
||||
b9=×
|
||||
ba=/
|
||||
bb=A
|
||||
bc=B
|
||||
bd=C
|
||||
be=D
|
||||
bf=E
|
||||
c0=F
|
||||
c1=G
|
||||
c2=H
|
||||
c3=I
|
||||
c4=J
|
||||
c5=K
|
||||
c6=L
|
||||
c7=M
|
||||
c8=N
|
||||
c9=O
|
||||
ca=P
|
||||
cb=Q
|
||||
cc=R
|
||||
cd=S
|
||||
ce=T
|
||||
cf=U
|
||||
d0=V
|
||||
d1=W
|
||||
d2=X
|
||||
d3=Y
|
||||
d4=Z
|
||||
d5=a
|
||||
d6=b
|
||||
d7=c
|
||||
d8=d
|
||||
d9=e
|
||||
da=f
|
||||
db=g
|
||||
dc=h
|
||||
dd=i
|
||||
de=j
|
||||
df=k
|
||||
e0=l
|
||||
e1=m
|
||||
e2=n
|
||||
e3=o
|
||||
e4=p
|
||||
e5=q
|
||||
e6=r
|
||||
e7=s
|
||||
e8=t
|
||||
e9=u
|
||||
ea=v
|
||||
eb=w
|
||||
ec=x
|
||||
ed=y
|
||||
ee=z
|
||||
ef=▶
|
||||
f0=:
|
||||
f1=Ä
|
||||
f2=Ö
|
||||
f3=Ü
|
||||
f4=ä
|
||||
f5=ö
|
||||
f6=ü
|
||||
f7
|
||||
f8
|
||||
f9
|
||||
fa
|
||||
fb
|
||||
fc
|
||||
fd
|
||||
fe
|
||||
ff
|
||||
@@ -1,6 +1,3 @@
|
||||
00=()
|
||||
090D=(R)
|
||||
0A=(BR)
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
@@ -124,12 +121,12 @@
|
||||
8159=〆
|
||||
815A=〇
|
||||
815B=ー
|
||||
815C=―
|
||||
815C=—
|
||||
815D=‐
|
||||
815E=/
|
||||
815F=\
|
||||
8160=~
|
||||
8161=∥
|
||||
8160=〜
|
||||
8161=‖
|
||||
8162=|
|
||||
8163=…
|
||||
8164=‥
|
||||
@@ -156,7 +153,7 @@
|
||||
8179=【
|
||||
817A=】
|
||||
817B=+
|
||||
817C=-
|
||||
817C=−
|
||||
817D=±
|
||||
817E=×
|
||||
8180=÷
|
||||
@@ -176,8 +173,8 @@
|
||||
818E=℃
|
||||
818F=¥
|
||||
8190=$
|
||||
8191=¢
|
||||
8192=£
|
||||
8191=¢
|
||||
8192=£
|
||||
8193=%
|
||||
8194=#
|
||||
8195=&
|
||||
@@ -190,6 +187,7 @@
|
||||
819C=●
|
||||
819D=◎
|
||||
819E=◇
|
||||
819F=◆
|
||||
81A0=□
|
||||
81A1=■
|
||||
81A2=△
|
||||
@@ -213,7 +211,7 @@
|
||||
81BF=∩
|
||||
81C8=∧
|
||||
81C9=∨
|
||||
81CA=¬
|
||||
81CA=¬
|
||||
81CB=⇒
|
||||
81CC=⇔
|
||||
81CD=∀
|
||||
@@ -619,89 +617,6 @@
|
||||
84BC=┥
|
||||
84BD=┸
|
||||
84BE=╂
|
||||
8740=①
|
||||
8741=②
|
||||
8742=③
|
||||
8743=④
|
||||
8744=⑤
|
||||
8745=⑥
|
||||
8746=⑦
|
||||
8747=⑧
|
||||
8748=⑨
|
||||
8749=⑩
|
||||
874A=⑪
|
||||
874B=⑫
|
||||
874C=⑬
|
||||
874D=⑭
|
||||
874E=⑮
|
||||
874F=⑯
|
||||
8750=⑰
|
||||
8751=⑱
|
||||
8752=⑲
|
||||
8753=⑳
|
||||
8754=Ⅰ
|
||||
8755=Ⅱ
|
||||
8756=Ⅲ
|
||||
8757=Ⅳ
|
||||
8758=Ⅴ
|
||||
8759=Ⅵ
|
||||
875A=Ⅶ
|
||||
875B=Ⅷ
|
||||
875C=Ⅸ
|
||||
875D=Ⅹ
|
||||
875F=㍉
|
||||
8760=㌔
|
||||
8761=㌢
|
||||
8762=㍍
|
||||
8763=㌘
|
||||
8764=㌧
|
||||
8765=㌃
|
||||
8766=㌶
|
||||
8767=㍑
|
||||
8768=㍗
|
||||
8769=㌍
|
||||
876A=㌦
|
||||
876B=㌣
|
||||
876C=㌫
|
||||
876D=㍊
|
||||
876E=㌻
|
||||
876F=㎜
|
||||
8770=㎝
|
||||
8771=㎞
|
||||
8772=㎎
|
||||
8773=㎏
|
||||
8774=㏄
|
||||
8775=㎡
|
||||
877E=㍻
|
||||
8780=〝
|
||||
8781=〟
|
||||
8782=№
|
||||
8783=㏍
|
||||
8784=℡
|
||||
8785=㊤
|
||||
8786=㊥
|
||||
8787=㊦
|
||||
8788=㊧
|
||||
8789=㊨
|
||||
878A=㈱
|
||||
878B=㈲
|
||||
878C=㈹
|
||||
878D=㍾
|
||||
878E=㍽
|
||||
878F=㍼
|
||||
8790=≒
|
||||
8791=≡
|
||||
8792=∫
|
||||
8793=∮
|
||||
8794=∑
|
||||
8795=√
|
||||
8796=⊥
|
||||
8797=∠
|
||||
8798=∟
|
||||
8799=⊿
|
||||
879A=∵
|
||||
879B=∩
|
||||
879C=∪
|
||||
889F=亜
|
||||
88A0=唖
|
||||
88A1=娃
|
||||
@@ -7120,4 +7035,3 @@ EAA1=遙
|
||||
EAA2=瑤
|
||||
EAA3=凜
|
||||
EAA4=熙
|
||||
FA5B=∵
|
||||
|
||||
256
encodings/thai.tbl
Normal file
256
encodings/thai.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85=…
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
8A
|
||||
8B
|
||||
8C
|
||||
8D
|
||||
8E
|
||||
8F
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98
|
||||
99
|
||||
9A
|
||||
9B
|
||||
9C
|
||||
9D
|
||||
9E
|
||||
9F
|
||||
A0
|
||||
A1=ก
|
||||
A2=ข
|
||||
A3=ฃ
|
||||
A4=ค
|
||||
A5=ฅ
|
||||
A6=ฆ
|
||||
A7=ง
|
||||
A8=จ
|
||||
A9=ฉ
|
||||
AA=ช
|
||||
AB=ซ
|
||||
AC=ฌ
|
||||
AD=ญ
|
||||
AE=ฎ
|
||||
AF=ฏ
|
||||
B0=ฐ
|
||||
B1=ฑ
|
||||
B2=ฒ
|
||||
B3=ณ
|
||||
B4=ด
|
||||
B5=ต
|
||||
B6=ถ
|
||||
B7=ท
|
||||
B8=ธ
|
||||
B9=น
|
||||
BA=บ
|
||||
BB=ป
|
||||
BC=ผ
|
||||
BD=ฝ
|
||||
BE=พ
|
||||
BF=ฟ
|
||||
C0=ภ
|
||||
C1=ม
|
||||
C2=ย
|
||||
C3=ร
|
||||
C4=ฤ
|
||||
C5=ล
|
||||
C6=ฦ
|
||||
C7=ว
|
||||
C8=ศ
|
||||
C9=ษ
|
||||
CA=ส
|
||||
CB=ห
|
||||
CC=ฬ
|
||||
CD=อ
|
||||
CE=ฮ
|
||||
CF=ฯ
|
||||
D0=ะ
|
||||
D1=ั
|
||||
D2=า
|
||||
D3=ำ
|
||||
D4=ิ
|
||||
D5=ี
|
||||
D6=ึ
|
||||
D7=ื
|
||||
D8=ุ
|
||||
D9=ู
|
||||
DA=ฺ
|
||||
DB
|
||||
DC
|
||||
DD
|
||||
DE
|
||||
DF=฿
|
||||
E0=เ
|
||||
E1=แ
|
||||
E2=โ
|
||||
E3=ใ
|
||||
E4=ไ
|
||||
E5=ๅ
|
||||
E6=ๆ
|
||||
E7=็
|
||||
E8=่
|
||||
E9=้
|
||||
EA=๊
|
||||
EB=๋
|
||||
EC=์
|
||||
ED=ํ
|
||||
EE=๎
|
||||
EF=๏
|
||||
F0=๐
|
||||
F1=๑
|
||||
F2=๒
|
||||
F3=๓
|
||||
F4=๔
|
||||
F5=๕
|
||||
F6=๖
|
||||
F7=๗
|
||||
F8=๘
|
||||
F9=๙
|
||||
FA=๚
|
||||
FB=๛
|
||||
FC
|
||||
FD
|
||||
FE
|
||||
FF
|
||||
256
encodings/turkish_iso.tbl
Normal file
256
encodings/turkish_iso.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=
|
||||
81=
|
||||
82=
|
||||
83=
|
||||
84=
|
||||
85=
|
||||
86=
|
||||
87=
|
||||
88=
|
||||
89=
|
||||
8A=
|
||||
8B=
|
||||
8C=
|
||||
8D=
|
||||
8E=
|
||||
8F=
|
||||
90=
|
||||
91=
|
||||
92=
|
||||
93=
|
||||
94=
|
||||
95=
|
||||
96=
|
||||
97=
|
||||
98=
|
||||
99=
|
||||
9A=
|
||||
9B=
|
||||
9C=
|
||||
9D=
|
||||
9E=
|
||||
9F=
|
||||
A0=
|
||||
A1=¡
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=ª
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=¯
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=¹
|
||||
BA=º
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=¿
|
||||
C0=À
|
||||
C1=Á
|
||||
C2=Â
|
||||
C3=Ã
|
||||
C4=Ä
|
||||
C5=Å
|
||||
C6=Æ
|
||||
C7=Ç
|
||||
C8=È
|
||||
C9=É
|
||||
CA=Ê
|
||||
CB=Ë
|
||||
CC=Ì
|
||||
CD=Í
|
||||
CE=Î
|
||||
CF=Ï
|
||||
D0=Ğ
|
||||
D1=Ñ
|
||||
D2=Ò
|
||||
D3=Ó
|
||||
D4=Ô
|
||||
D5=Õ
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ø
|
||||
D9=Ù
|
||||
DA=Ú
|
||||
DB=Û
|
||||
DC=Ü
|
||||
DD=İ
|
||||
DE=Ş
|
||||
DF=ß
|
||||
E0=à
|
||||
E1=á
|
||||
E2=â
|
||||
E3=ã
|
||||
E4=ä
|
||||
E5=å
|
||||
E6=æ
|
||||
E7=ç
|
||||
E8=è
|
||||
E9=é
|
||||
EA=ê
|
||||
EB=ë
|
||||
EC=ì
|
||||
ED=í
|
||||
EE=î
|
||||
EF=ï
|
||||
F0=ğ
|
||||
F1=ñ
|
||||
F2=ò
|
||||
F3=ó
|
||||
F4=ô
|
||||
F5=õ
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ø
|
||||
F9=ù
|
||||
FA=ú
|
||||
FB=û
|
||||
FC=ü
|
||||
FD=ı
|
||||
FE=ş
|
||||
FF=ÿ
|
||||
256
encodings/turkish_windows.tbl
Normal file
256
encodings/turkish_windows.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82=‚
|
||||
83=ƒ
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88=ˆ
|
||||
89=‰
|
||||
8A=Š
|
||||
8B=‹
|
||||
8C=Œ
|
||||
8D
|
||||
8E
|
||||
8F
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98=˜
|
||||
99=™
|
||||
9A=š
|
||||
9B=›
|
||||
9C=œ
|
||||
9D
|
||||
9E
|
||||
9F=Ÿ
|
||||
A0=
|
||||
A1=¡
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=ª
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=¯
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=¹
|
||||
BA=º
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=¿
|
||||
C0=À
|
||||
C1=Á
|
||||
C2=Â
|
||||
C3=Ã
|
||||
C4=Ä
|
||||
C5=Å
|
||||
C6=Æ
|
||||
C7=Ç
|
||||
C8=È
|
||||
C9=É
|
||||
CA=Ê
|
||||
CB=Ë
|
||||
CC=Ì
|
||||
CD=Í
|
||||
CE=Î
|
||||
CF=Ï
|
||||
D0=Ğ
|
||||
D1=Ñ
|
||||
D2=Ò
|
||||
D3=Ó
|
||||
D4=Ô
|
||||
D5=Õ
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ø
|
||||
D9=Ù
|
||||
DA=Ú
|
||||
DB=Û
|
||||
DC=Ü
|
||||
DD=İ
|
||||
DE=Ş
|
||||
DF=ß
|
||||
E0=à
|
||||
E1=á
|
||||
E2=â
|
||||
E3=ã
|
||||
E4=ä
|
||||
E5=å
|
||||
E6=æ
|
||||
E7=ç
|
||||
E8=è
|
||||
E9=é
|
||||
EA=ê
|
||||
EB=ë
|
||||
EC=ì
|
||||
ED=í
|
||||
EE=î
|
||||
EF=ï
|
||||
F0=ğ
|
||||
F1=ñ
|
||||
F2=ò
|
||||
F3=ó
|
||||
F4=ô
|
||||
F5=õ
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ø
|
||||
F9=ù
|
||||
FA=ú
|
||||
FB=û
|
||||
FC=ü
|
||||
FD=ı
|
||||
FE=ş
|
||||
FF=ÿ
|
||||
143713
encodings/utf8.tbl
Normal file
143713
encodings/utf8.tbl
Normal file
File diff suppressed because it is too large
Load Diff
256
encodings/vietnamese.tbl
Normal file
256
encodings/vietnamese.tbl
Normal file
@@ -0,0 +1,256 @@
|
||||
00=NUL
|
||||
01=SOH
|
||||
02=STX
|
||||
03=ETX
|
||||
04=EOT
|
||||
05=ENQ
|
||||
06=ACK
|
||||
07=BEL
|
||||
08=BS
|
||||
09=TAB
|
||||
0A=LF
|
||||
0B=VT
|
||||
0C=FF
|
||||
0D=CR
|
||||
0E=SO
|
||||
0F=SI
|
||||
10=DLE
|
||||
11=DC1
|
||||
12=DC2
|
||||
13=DC3
|
||||
14=DC4
|
||||
15=NAK
|
||||
16=SYN
|
||||
17=ETB
|
||||
18=CAN
|
||||
19=EM
|
||||
1A=SUB
|
||||
1B=ESC
|
||||
1C=FS
|
||||
1D=GS
|
||||
1E=RS
|
||||
1F=US
|
||||
20=
|
||||
21=!
|
||||
22="
|
||||
23=#
|
||||
24=$
|
||||
25=%
|
||||
26=&
|
||||
27='
|
||||
28=(
|
||||
29=)
|
||||
2A=*
|
||||
2B=+
|
||||
2C=,
|
||||
2D=-
|
||||
2E=.
|
||||
2F=/
|
||||
30=0
|
||||
31=1
|
||||
32=2
|
||||
33=3
|
||||
34=4
|
||||
35=5
|
||||
36=6
|
||||
37=7
|
||||
38=8
|
||||
39=9
|
||||
3A=:
|
||||
3B=;
|
||||
3C=<
|
||||
3D==
|
||||
3E=>
|
||||
3F=?
|
||||
40=@
|
||||
41=A
|
||||
42=B
|
||||
43=C
|
||||
44=D
|
||||
45=E
|
||||
46=F
|
||||
47=G
|
||||
48=H
|
||||
49=I
|
||||
4A=J
|
||||
4B=K
|
||||
4C=L
|
||||
4D=M
|
||||
4E=N
|
||||
4F=O
|
||||
50=P
|
||||
51=Q
|
||||
52=R
|
||||
53=S
|
||||
54=T
|
||||
55=U
|
||||
56=V
|
||||
57=W
|
||||
58=X
|
||||
59=Y
|
||||
5A=Z
|
||||
5B=[
|
||||
5C=\
|
||||
5D=]
|
||||
5E=^
|
||||
5F=_
|
||||
60=`
|
||||
61=a
|
||||
62=b
|
||||
63=c
|
||||
64=d
|
||||
65=e
|
||||
66=f
|
||||
67=g
|
||||
68=h
|
||||
69=i
|
||||
6A=j
|
||||
6B=k
|
||||
6C=l
|
||||
6D=m
|
||||
6E=n
|
||||
6F=o
|
||||
70=p
|
||||
71=q
|
||||
72=r
|
||||
73=s
|
||||
74=t
|
||||
75=u
|
||||
76=v
|
||||
77=w
|
||||
78=x
|
||||
79=y
|
||||
7A=z
|
||||
7B={
|
||||
7C=|
|
||||
7D=}
|
||||
7E=~
|
||||
7F=DEL
|
||||
80=€
|
||||
81
|
||||
82=‚
|
||||
83=ƒ
|
||||
84=„
|
||||
85=…
|
||||
86=†
|
||||
87=‡
|
||||
88=ˆ
|
||||
89=‰
|
||||
8A
|
||||
8B=‹
|
||||
8C=Œ
|
||||
8D
|
||||
8E
|
||||
8F
|
||||
90
|
||||
91=‘
|
||||
92=’
|
||||
93=“
|
||||
94=”
|
||||
95=•
|
||||
96=–
|
||||
97=—
|
||||
98=˜
|
||||
99=™
|
||||
9A
|
||||
9B=›
|
||||
9C=œ
|
||||
9D
|
||||
9E
|
||||
9F=Ÿ
|
||||
A0=
|
||||
A1=¡
|
||||
A2=¢
|
||||
A3=£
|
||||
A4=¤
|
||||
A5=¥
|
||||
A6=¦
|
||||
A7=§
|
||||
A8=¨
|
||||
A9=©
|
||||
AA=ª
|
||||
AB=«
|
||||
AC=¬
|
||||
AD=
|
||||
AE=®
|
||||
AF=¯
|
||||
B0=°
|
||||
B1=±
|
||||
B2=²
|
||||
B3=³
|
||||
B4=´
|
||||
B5=µ
|
||||
B6=¶
|
||||
B7=·
|
||||
B8=¸
|
||||
B9=¹
|
||||
BA=º
|
||||
BB=»
|
||||
BC=¼
|
||||
BD=½
|
||||
BE=¾
|
||||
BF=¿
|
||||
C0=À
|
||||
C1=Á
|
||||
C2=Â
|
||||
C3=Ă
|
||||
C4=Ä
|
||||
C5=Å
|
||||
C6=Æ
|
||||
C7=Ç
|
||||
C8=È
|
||||
C9=É
|
||||
CA=Ê
|
||||
CB=Ë
|
||||
CC=̀
|
||||
CD=Í
|
||||
CE=Î
|
||||
CF=Ï
|
||||
D0=Đ
|
||||
D1=Ñ
|
||||
D2=̉
|
||||
D3=Ó
|
||||
D4=Ô
|
||||
D5=Ơ
|
||||
D6=Ö
|
||||
D7=×
|
||||
D8=Ø
|
||||
D9=Ù
|
||||
DA=Ú
|
||||
DB=Û
|
||||
DC=Ü
|
||||
DD=Ư
|
||||
DE=̃
|
||||
DF=ß
|
||||
E0=à
|
||||
E1=á
|
||||
E2=â
|
||||
E3=ă
|
||||
E4=ä
|
||||
E5=å
|
||||
E6=æ
|
||||
E7=ç
|
||||
E8=è
|
||||
E9=é
|
||||
EA=ê
|
||||
EB=ë
|
||||
EC=́
|
||||
ED=í
|
||||
EE=î
|
||||
EF=ï
|
||||
F0=đ
|
||||
F1=ñ
|
||||
F2=̣
|
||||
F3=ó
|
||||
F4=ô
|
||||
F5=ơ
|
||||
F6=ö
|
||||
F7=÷
|
||||
F8=ø
|
||||
F9=ù
|
||||
FA=ú
|
||||
FB=û
|
||||
FC=ü
|
||||
FD=ư
|
||||
FE=₫
|
||||
FF=ÿ
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
using uint8_t = u8;
|
||||
using uint16_t = u16;
|
||||
using uint32_t = u32;
|
||||
using uint64_t = u64;
|
||||
using uint128_t = u128;
|
||||
|
||||
using int8_t = s8;
|
||||
using int16_t = s16;
|
||||
using int32_t = s32;
|
||||
using int64_t = s64;
|
||||
using int128_t = s128;
|
||||
|
||||
using size_t = u32;
|
||||
using ssize_t = s32;
|
||||
40
includes/hex/core.pat
Normal file
40
includes/hex/core.pat
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/impl/imhex_check.pat>
|
||||
|
||||
/*!
|
||||
Core intrinsic functions to interact with the ImHex Hex Editor
|
||||
*/
|
||||
|
||||
namespace hex::core {
|
||||
|
||||
/**
|
||||
A type representing a selection in the hex editor
|
||||
*/
|
||||
struct Selection {
|
||||
bool valid;
|
||||
u64 address, size;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the current selection in the hex editor
|
||||
@return The current selection
|
||||
*/
|
||||
fn get_selection() {
|
||||
u128 result = builtin::hex::core::get_selection();
|
||||
|
||||
Selection result;
|
||||
if (result == u128(-1)) {
|
||||
result.valid = false;
|
||||
result.address = 0x00;
|
||||
result.size = 0x00;
|
||||
} else {
|
||||
result.valid = true;
|
||||
result.address = result >> 64;
|
||||
result.size = result & u64(-1);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
}
|
||||
20
includes/hex/dec.pat
Normal file
20
includes/hex/dec.pat
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/impl/imhex_check.pat>
|
||||
|
||||
/*!
|
||||
Library to allow decoding of more complex values
|
||||
*/
|
||||
|
||||
namespace hex::dec {
|
||||
|
||||
/**
|
||||
Demangles a mangled name into a human readable name
|
||||
@param mangled_name The mangled name
|
||||
@return The demangled name
|
||||
*/
|
||||
fn demangle(str mangled_name) {
|
||||
return builtin::hex::dec::demangle(mangled_name);
|
||||
};
|
||||
|
||||
}
|
||||
20
includes/hex/http.pat
Normal file
20
includes/hex/http.pat
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/impl/imhex_check.pat>
|
||||
|
||||
/*!
|
||||
Library to do HTTP requests
|
||||
*/
|
||||
|
||||
namespace hex::http {
|
||||
|
||||
/**
|
||||
Performs a HTTP GET request to the given URL and returns the response body
|
||||
@param url URL to perform the request to
|
||||
@return Response body
|
||||
*/
|
||||
fn get(str url) {
|
||||
return builtin::hex::http::get(url);
|
||||
};
|
||||
|
||||
}
|
||||
7
includes/hex/impl/imhex_check.pat
Normal file
7
includes/hex/impl/imhex_check.pat
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef __PL_UNIT_TESTS__
|
||||
#ifndef __IMHEX__
|
||||
|
||||
#error This library is only available in the ImHex Hex editor
|
||||
|
||||
#endif
|
||||
#endif
|
||||
43
includes/hex/provider.pat
Normal file
43
includes/hex/provider.pat
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/impl/imhex_check.pat>
|
||||
|
||||
/*!
|
||||
Library to interact with the currently loaded provider.
|
||||
*/
|
||||
|
||||
namespace hex::prv {
|
||||
|
||||
|
||||
/**
|
||||
Queries information from the currently loaded provider. The kind of information that's available depends on the provider that's loaded
|
||||
|
||||
> **Available information**
|
||||
> - File Provider
|
||||
> - `file_path() -> str`
|
||||
> - `file_name() -> str`
|
||||
> - `file_extension() -> str`
|
||||
> - `creation_time() -> time_t`
|
||||
> - `access_time() -> time_t`
|
||||
> - `modification_time() -> time_t`
|
||||
> - `permissions() -> u16`
|
||||
> - Disk Provider
|
||||
> - `file_path() -> str`
|
||||
> - `sector_size() -> u128`
|
||||
> - GDB Provider
|
||||
> - `ip() -> str`
|
||||
> - `port() -> u16`
|
||||
> - Process Memory Provider
|
||||
> - `region_address(regionName) -> u64`
|
||||
> - `region_size(regionName) -> u64`
|
||||
> - `process_id() -> u32`
|
||||
> - `process_name() -> str`
|
||||
|
||||
@param category Information category
|
||||
@param argument Extra argument to pass along
|
||||
*/
|
||||
fn get_information(str category, str argument = "") {
|
||||
return builtin::hex::prv::get_information(category, argument);
|
||||
};
|
||||
|
||||
}
|
||||
30
includes/hex/type/mangled.pat
Normal file
30
includes/hex/type/mangled.pat
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/mem.pat>
|
||||
|
||||
#include <hex/impl/imhex_check.pat>
|
||||
#include <hex/dec.pat>
|
||||
|
||||
/*!
|
||||
Types to automatically decode mangled names
|
||||
*/
|
||||
|
||||
namespace hex::type {
|
||||
|
||||
/**
|
||||
A mangled name string that gets demangled when displayed
|
||||
*/
|
||||
struct MangledName {
|
||||
char value[];
|
||||
} [[sealed, format("hex::type::impl::format_mangled_name")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_mangled_name(ref MangledName name) {
|
||||
return hex::dec::demangle(name.value);
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
19
includes/std/array.pat
Normal file
19
includes/std/array.pat
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
The array library contains a helper type to make it easier to create multi-dimensional arrays
|
||||
and pass arrays to functions as parameters.
|
||||
*/
|
||||
|
||||
namespace std {
|
||||
|
||||
/**
|
||||
Simple one dimensional array wrapper
|
||||
@tparam T The array types
|
||||
@tparam Size Size of the array
|
||||
*/
|
||||
struct Array<T, auto Size> {
|
||||
T data[Size] [[inline]];
|
||||
};
|
||||
|
||||
}
|
||||
@@ -2,8 +2,17 @@
|
||||
|
||||
#include <std/limits.pat>
|
||||
|
||||
/*!
|
||||
This library contains various helper functions for common bit operations.
|
||||
*/
|
||||
|
||||
namespace std::bit {
|
||||
|
||||
/**
|
||||
Calculates the number of 1 bits in a given number
|
||||
@param x The number
|
||||
@return The number of bits set to 1 in `x`
|
||||
*/
|
||||
fn popcount(u128 x) {
|
||||
x = (x & (std::limits::u128_max() / 3)) + ((x >> 1) & (std::limits::u128_max() / 3));
|
||||
x = (x & (std::limits::u128_max() / 5)) + ((x >> 2) & (std::limits::u128_max() / 5));
|
||||
@@ -12,10 +21,20 @@ namespace std::bit {
|
||||
return x % 0xFF;
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if only a single bit is set to 1 in a given number
|
||||
@param x The number
|
||||
@return True if there's a single bit set to 1 in `x`, false otherwise
|
||||
*/
|
||||
fn has_single_bit(u128 x) {
|
||||
return x != 0 && (x & (x - 1)) == 0;
|
||||
};
|
||||
|
||||
/**
|
||||
Rounds the given number up to the next bigger power of two
|
||||
@param x The number
|
||||
@return Next bigger power of two that can fit `x`
|
||||
*/
|
||||
fn bit_ceil(u128 x) {
|
||||
if (x == 0) return 0;
|
||||
|
||||
@@ -25,7 +44,12 @@ namespace std::bit {
|
||||
|
||||
return 1 << i;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Rounds the given number down to the next bigger power of two
|
||||
@param x The number
|
||||
@return Next smaller power of two
|
||||
*/
|
||||
fn bit_floor(u128 x) {
|
||||
if (x == 0) return 0;
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace std {
|
||||
|
||||
using uint8_t = u8;
|
||||
using uint16_t = u16;
|
||||
using uint32_t = u32;
|
||||
using uint64_t = u64;
|
||||
using uint128_t = u128;
|
||||
|
||||
using int8_t = s8;
|
||||
using int16_t = s16;
|
||||
using int32_t = s32;
|
||||
using int64_t = s64;
|
||||
using int128_t = s128;
|
||||
|
||||
using float32_t = float;
|
||||
using float64_t = double;
|
||||
|
||||
using size_t = u64;
|
||||
using ssize_t = s64;
|
||||
|
||||
}
|
||||
149
includes/std/core.pat
Normal file
149
includes/std/core.pat
Normal file
@@ -0,0 +1,149 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/mem.pat>
|
||||
|
||||
/*!
|
||||
The core library contains intrinsics and "compiler magic" functions that
|
||||
get extra help from the runtime to fulfill their purpose.
|
||||
*/
|
||||
|
||||
namespace std::core {
|
||||
|
||||
/**
|
||||
The layout order of each field after byte-endianness has been handled.
|
||||
|
||||
`LeftToRight` and `RightToLeft` are deprecated in favor of the clearer `MostToLeastSignificant` and `LeastToMostSignificant` names.
|
||||
*/
|
||||
enum BitfieldOrder : u8 {
|
||||
/**
|
||||
@warning deprecated
|
||||
*/
|
||||
LeftToRight = 0,
|
||||
/**
|
||||
@warning deprecated
|
||||
*/
|
||||
RightToLeft = 1,
|
||||
MostToLeastSignificant = 0,
|
||||
LeastToMostSignificant = 1
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Checks if a pattern has a specific attribute assigned to it
|
||||
@param pattern The pattern to check
|
||||
@param attribute The attribute's name to check for
|
||||
*/
|
||||
fn has_attribute(ref auto pattern, str attribute) {
|
||||
return builtin::std::core::has_attribute(pattern, attribute);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the first parameter of the attribute of a pattern if it has one
|
||||
@param pattern The pattern to check
|
||||
@param attribute The attribute's name to query
|
||||
*/
|
||||
fn get_attribute_value(ref auto pattern, str attribute) {
|
||||
return builtin::std::core::get_attribute_value(pattern, attribute);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Sets the current default endianess.
|
||||
Any patterns created following this attribute will be created using the set endianess.
|
||||
@param endian The new default endianess
|
||||
*/
|
||||
fn set_endian(std::mem::Endian endian) {
|
||||
builtin::std::core::set_endian(u32(endian));
|
||||
};
|
||||
|
||||
/**
|
||||
Gets the current default endianess.
|
||||
@return The currently set default endianess
|
||||
*/
|
||||
fn get_endian() {
|
||||
return builtin::std::core::get_endian();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@warning Removed in 1.28.0
|
||||
*/
|
||||
fn set_bitfield_order(BitfieldOrder order) {
|
||||
builtin::std::error("Runtime default bitfield order is no longer supported.\nConsider using `be` or `le` on your bitfield variables,\nor attach attribute `bitfield_order` to the bitfield.");
|
||||
};
|
||||
|
||||
/**
|
||||
@warning Removed in 1.28.0
|
||||
*/
|
||||
fn get_bitfield_order() {
|
||||
builtin::std::error("Runtime default bitfield order is no longer supported.\nConsider using `be` or `le` on your bitfield variables,\nor attach attribute `bitfield_order` to the bitfield.");
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
When used inside of a pattern that's being created using a pattern,
|
||||
returns the current array index that's being processed.
|
||||
If used outside of an array, always yields 0.
|
||||
@return The current array index
|
||||
*/
|
||||
fn array_index() {
|
||||
return builtin::std::core::array_index();
|
||||
};
|
||||
|
||||
/**
|
||||
Queries the number of members of a struct, union or bitfield or the number of entries in an array
|
||||
@param pattern The pattern to check
|
||||
@return The number of members in `pattern`
|
||||
*/
|
||||
fn member_count(ref auto pattern) {
|
||||
return builtin::std::core::member_count(pattern);
|
||||
};
|
||||
|
||||
/**
|
||||
Checks whether or not a given pattern has a member with a given name
|
||||
@param pattern The pattern to check
|
||||
@param name The name of the member to look for
|
||||
@return True if a member called `name` exists, false otherwise
|
||||
*/
|
||||
fn has_member(ref auto pattern, str name) {
|
||||
return builtin::std::core::has_member(pattern, name);
|
||||
};
|
||||
|
||||
/**
|
||||
Formats a pattern using it's default formatter or its custom formatter function set through
|
||||
the `[[format]]` or `[[format_read]]` attribute
|
||||
@param pattern The pattern to format
|
||||
@return Formatted string representation of `pattern`
|
||||
*/
|
||||
fn formatted_value(ref auto pattern) {
|
||||
return builtin::std::core::formatted_value(pattern);
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given enum value corresponds has a corresponding constant
|
||||
@param pattern The enum value to check
|
||||
@return True if pattern has a valid enum representation, false if not
|
||||
*/
|
||||
fn is_valid_enum(ref auto pattern) {
|
||||
return builtin::std::core::is_valid_enum(pattern);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Changes the color of the given pattern to a new color
|
||||
@param pattern The pattern to modify
|
||||
@param color The RGBA8 color
|
||||
*/
|
||||
fn set_pattern_color(ref auto pattern, u32 color) {
|
||||
builtin::std::core::set_pattern_color(pattern, color);
|
||||
};
|
||||
|
||||
/**
|
||||
Changes the display name of a given pattern
|
||||
@param pattern The pattern to modify
|
||||
@param name The new display name of the pattern
|
||||
*/
|
||||
fn set_display_name(ref auto pattern, str name) {
|
||||
builtin::std::core::set_display_name(pattern, name);
|
||||
};
|
||||
}
|
||||
@@ -1,51 +1,116 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
The ctype library has functions to check if a character is part of a specific category
|
||||
of ASCII characters.
|
||||
*/
|
||||
|
||||
namespace std::ctype {
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a digit between '0' and '9'
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isdigit(char c) {
|
||||
return c >= '0' && c <= '9';
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a hexadecimal digit between '0' and '9', `A` and `F` or `a` and `f`
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isxdigit(char c) {
|
||||
return std::ctype::isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a upper case letter between 'A' and 'Z'
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isupper(char c) {
|
||||
return c >= 'A' && c <= 'Z';
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a lower case letter between 'a' and 'z'
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn islower(char c) {
|
||||
return c >= 'a' && c <= 'z';
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is either a upper or lower case letter between 'A' and 'Z' or 'a' and 'z'
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isalpha(char c) {
|
||||
return std::ctype::isupper(c) || std::ctype::islower(c);
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a upper or lower case letter or a number
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isalnum(char c) {
|
||||
return std::ctype::isalpha(c) || std::ctype::isdigit(c);
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a space character
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isspace(char c) {
|
||||
return (c >= 0x09 && c <= 0x0D) || c == 0x20;
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a invisible character
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isblank(char c) {
|
||||
return c == 0x09 || c == ' ';
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` has a printable glyph
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isprint(char c) {
|
||||
return c >= '0' && c <= '~';
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a control code
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn iscntrl(char c) {
|
||||
return !std::ctype::isprint(c);
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` has a visible glyph
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn isgraph(char c) {
|
||||
return std::ctype::isprint(c) && !std::ctype::isspace(c);
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if the given character `c` is a punctuation character
|
||||
@param c The character to check
|
||||
@return True if `c` is part of this range, false otherwise
|
||||
*/
|
||||
fn ispunct(char c) {
|
||||
return std::ctype::isgraph(c) && !std::ctype::isalnum(c);
|
||||
};
|
||||
|
||||
@@ -1,9 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
The File library allows reading and writing from/to external files using
|
||||
a C-like File IO API.
|
||||
|
||||
**These functions are considered dangerous and require the user to manually permit them**
|
||||
*/
|
||||
|
||||
namespace std::file {
|
||||
|
||||
/**
|
||||
A handle representing a file that has been opened
|
||||
*/
|
||||
using Handle = s32;
|
||||
|
||||
/**
|
||||
The mode to open a file in.
|
||||
Read opens the file in read-only mode
|
||||
Write opens the file in read and write mode
|
||||
Create creates a new file if it doesn't exist and overwrites an existing file
|
||||
*/
|
||||
enum Mode : u8 {
|
||||
Read = 1,
|
||||
Write = 2,
|
||||
@@ -11,37 +27,84 @@ namespace std::file {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Opens a file
|
||||
@param path The path to the file to open
|
||||
@param mode File open mode
|
||||
@return Handle to the newly opened file
|
||||
*/
|
||||
fn open(str path, Mode mode) {
|
||||
return builtin::std::file::open(path, mode);
|
||||
return builtin::std::file::open(path, u32(mode));
|
||||
};
|
||||
|
||||
/**
|
||||
Closes a file handle that has been opened previously
|
||||
@param handle The handle to close
|
||||
*/
|
||||
fn close(Handle handle) {
|
||||
builtin::std::file::close(handle);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Reads the content of a file into a string
|
||||
@param handle The file handle to read from
|
||||
@param size Number of bytes to read
|
||||
@return String containing the read data
|
||||
*/
|
||||
fn read(Handle handle, u64 size) {
|
||||
return builtin::std::file::read(handle, size);
|
||||
};
|
||||
|
||||
fn write(Handle handle, str data) {
|
||||
return builtin::std::file::write(handle, data);
|
||||
/**
|
||||
Writes the content of a string into a file
|
||||
@param handle The file handle to write to
|
||||
@param data String or Pattern to write to the file
|
||||
*/
|
||||
fn write(Handle handle, auto data) {
|
||||
builtin::std::file::write(handle, data);
|
||||
};
|
||||
|
||||
/**
|
||||
Sets the current cursor position in the given file handle
|
||||
@param handle The file handle to set the cursor position in
|
||||
@param offset The offset to move the cursor to
|
||||
*/
|
||||
fn seek(Handle handle, u64 offset) {
|
||||
builtin::std::file::seek(handle, offset);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Queries the size of a file
|
||||
@param handle The handle of the file to get the size of
|
||||
@return The file's size
|
||||
*/
|
||||
fn size(Handle handle) {
|
||||
return builtin::std::file::size(handle);
|
||||
};
|
||||
|
||||
/**
|
||||
Resizes a file
|
||||
@param handle The handle of the file to resize
|
||||
*/
|
||||
fn resize(Handle handle, u64 size) {
|
||||
builtin::std::file::resize(handle, size);
|
||||
};
|
||||
|
||||
/**
|
||||
Flushes changes made to a file to disk
|
||||
@param handle The handle of the file to flush
|
||||
*/
|
||||
fn flush(Handle handle) {
|
||||
builtin::std::file::remove(handle);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Deletes a file from disk. This will also automatically close this file
|
||||
@param handle The handle of the file to delete
|
||||
*/
|
||||
fn remove(Handle handle) {
|
||||
builtin::std::file::remove(handle);
|
||||
};
|
||||
|
||||
@@ -1,33 +1,87 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Library for doing arithmetic with fixed point numbers and converting them from/to floating point numbers.
|
||||
*/
|
||||
|
||||
namespace std::fxpt {
|
||||
|
||||
/**
|
||||
A fixed point value
|
||||
*/
|
||||
using fixed = s128;
|
||||
|
||||
/**
|
||||
Converts a fixed point value into a floating point value
|
||||
@param fxt The fixed point value to convert
|
||||
@param precision The bits of precision the new value should have
|
||||
@return The floating point representation of fxt
|
||||
*/
|
||||
fn to_float(fixed fxt, u32 precision) {
|
||||
return double(fxt) / double((1 << precision));
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a floating point value into a fixed point value
|
||||
@param flt The floating point value to convert
|
||||
@param precision The bits of precision the new value should have
|
||||
@return The fixed point representation of flt
|
||||
*/
|
||||
fn to_fixed(double flt, u32 precision) {
|
||||
return fixed((flt * (1 << precision)));
|
||||
return s128((flt * (1 << precision)));
|
||||
};
|
||||
|
||||
/**
|
||||
Changes the number of bits used to represent the decimal part of the given fixed point number
|
||||
@param value The fixed point value to convert
|
||||
@param start_precision The current number of bits used
|
||||
@param end_precision The new number of bits used
|
||||
@return `value` as a new fixed point number with `end_precision` bits of precision
|
||||
*/
|
||||
fn change_precision(fixed value, u32 start_precision, u32 end_precision) {
|
||||
return std::fxpt::to_fixed(std::fxpt::to_float(value, start_precision), end_precision);
|
||||
};
|
||||
|
||||
/**
|
||||
Adds two fixed point numbers with a given precision together
|
||||
@param a First fixed point number
|
||||
@param b Second fixed point number
|
||||
@param precision The precision of `a` and `b`
|
||||
@return Result of the addition of `a` and `b`
|
||||
*/
|
||||
fn add(fixed a, fixed b, u32 precision) {
|
||||
return a + b;
|
||||
};
|
||||
|
||||
/**
|
||||
Subtracts two fixed point numbers with a given precision together
|
||||
@param a First fixed point number
|
||||
@param b Second fixed point number
|
||||
@param precision The precision of `a` and `b`
|
||||
@return Result of the subtraction of `a` and `b`
|
||||
*/
|
||||
fn subtract(fixed a, fixed b, u32 precision) {
|
||||
return a - b;
|
||||
};
|
||||
|
||||
/**
|
||||
Multiplies two fixed point numbers with a given precision together
|
||||
@param a First fixed point number
|
||||
@param b Second fixed point number
|
||||
@param precision The precision of `a` and `b`
|
||||
@return Result of the multiplication of `a` and `b`
|
||||
*/
|
||||
fn multiply(fixed a, fixed b, u32 precision) {
|
||||
return (a * b) / (1 << precision);
|
||||
};
|
||||
|
||||
/**
|
||||
Divides two fixed point numbers with a given precision together
|
||||
@param a First fixed point number
|
||||
@param b Second fixed point number
|
||||
@param precision The precision of `a` and `b`
|
||||
@return Result of the division of `a` and `b`
|
||||
*/
|
||||
fn divide(fixed a, fixed b, u32 precision) {
|
||||
return (a << precision) / b;
|
||||
};
|
||||
|
||||
@@ -1,29 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
The hash library contains various data hash functions
|
||||
*/
|
||||
|
||||
namespace std::hash {
|
||||
|
||||
fn crc32(u128 address, u64 size, u32 init, u32 poly) {
|
||||
u8 byte;
|
||||
u32 crc, mask;
|
||||
|
||||
crc = init;
|
||||
|
||||
u64 i;
|
||||
while (i < size) {
|
||||
byte = std::mem::read_unsigned(address + i, 1);
|
||||
crc = crc ^ byte;
|
||||
|
||||
u8 j;
|
||||
while (j < 8) {
|
||||
mask = u32(-(crc & 1));
|
||||
crc = (crc >> 1) ^ (poly & mask);
|
||||
j = j + 1;
|
||||
}
|
||||
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
return u32(~crc);
|
||||
/**
|
||||
Calculates the CRC32 hash of the bytes inside of a given pattern
|
||||
@param pattern The pattern to calculate the crc32 hash of
|
||||
@param init The CRC32 init value
|
||||
@param poly The CRC32 polynomial
|
||||
@param xorout The CRC32 XOR-Out value
|
||||
@param reflect_in Whether or not the input bytes should be reflected
|
||||
@param reflect_out Whether or not the output should be reflected
|
||||
@return Calculated CRC32 hash
|
||||
*/
|
||||
fn crc32(ref auto pattern, u32 init, u32 poly, u32 xorout, bool reflect_in, bool reflect_out) {
|
||||
return builtin::std::hash::crc32(pattern, init, poly, xorout, reflect_in, reflect_out);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace std::http {
|
||||
|
||||
fn get(str url) {
|
||||
return builtin::std::http::get(url);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,20 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
The IO library allows formatting strings and outputting text to the console
|
||||
*/
|
||||
|
||||
namespace std {
|
||||
|
||||
/**
|
||||
Formats the given arguments using the format string and prints the result to the console
|
||||
This function uses the C++20 `std::format` or libfmt's `fmt::format` syntax.
|
||||
@param fmt Format string
|
||||
@param args Values to use in the formatting
|
||||
*/
|
||||
fn print(str fmt, auto ... args) {
|
||||
builtin::std::print(fmt, args);
|
||||
};
|
||||
|
||||
/**
|
||||
Formats the given arguments using the format string and returns the result as a string
|
||||
This function uses the C++20 `std::format` or libfmt's `fmt::format` syntax.
|
||||
@param fmt Format string
|
||||
@param args Values to use in the formatting
|
||||
@return The formatted string
|
||||
*/
|
||||
fn format(str fmt, auto ... args) {
|
||||
return builtin::std::format(fmt, args);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Aborts evaluation of the code immediately and prints a error message to the console
|
||||
@param message The message to print
|
||||
*/
|
||||
fn error(str message) {
|
||||
builtin::std::error(message);
|
||||
};
|
||||
|
||||
/**
|
||||
Prints a warning message to the console
|
||||
@param message The message to print
|
||||
*/
|
||||
fn warning(str message) {
|
||||
builtin::std::warning(message);
|
||||
};
|
||||
|
||||
@@ -1,85 +1,169 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Library to calculate the minimum and maximum values that fit into a given data type
|
||||
*/
|
||||
|
||||
namespace std::limits {
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `u8`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn u8_min() {
|
||||
return u8(0);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `u8`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn u8_max() {
|
||||
return u8(-1);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `s8`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn s8_min() {
|
||||
return -s8((std::limits::u8_max() / 2)) - 1;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `s8`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn s8_max() {
|
||||
return s8((u8_max() / 2));
|
||||
return s8((std::limits::u8_max() / 2));
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `u16`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn u16_min() {
|
||||
return u16(0);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `u16`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn u16_max() {
|
||||
return u16(-1);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `s16`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn s16_min() {
|
||||
return -s16((std::limits::u16_max() / 2)) - 1;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `s16`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn s16_max() {
|
||||
return s16((u16_max() / 2));
|
||||
return s16((std::limits::u16_max() / 2));
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `u32`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn u32_min() {
|
||||
return u32(0);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `u32`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn u32_max() {
|
||||
return u32(-1);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `s32`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn s32_min() {
|
||||
return -s32((std::limits::u32_max() / 2)) - 1;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `s32`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn s32_max() {
|
||||
return s32((u32_max() / 2));
|
||||
return s32((std::limits::u32_max() / 2));
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `u64`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn u64_min() {
|
||||
return u64(0);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `u64`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn u64_max() {
|
||||
return u64(-1);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `s64`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn s64_min() {
|
||||
return -s64((std::limits::u64_max() / 2)) - 1;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `s64`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn s64_max() {
|
||||
return s64((u64_max() / 2));
|
||||
return s64((std::limits::u64_max() / 2));
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `u128`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn u128_min() {
|
||||
return u128(0);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `u128`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn u128_max() {
|
||||
return u128(-1);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the minimum value that can be stored in a `s128`.
|
||||
@return Minimum value
|
||||
*/
|
||||
fn s128_min() {
|
||||
return -s128((std::limits::u128_max() / 2)) - 1;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the maximum value that can be stored in a `s128`.
|
||||
@return Maximum value
|
||||
*/
|
||||
fn s128_max() {
|
||||
return s128((u128_max() / 2));
|
||||
return s128((std::limits::u128_max() / 2));
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/mem.pat>
|
||||
|
||||
/*!
|
||||
Library containing more advanced mathematical operations.
|
||||
*/
|
||||
|
||||
namespace std::math {
|
||||
|
||||
/**
|
||||
Compares the values `a` and `b` with each other and returns the smaller of the two
|
||||
@param a First value
|
||||
@param b Second value
|
||||
@return `a` if `a` is smaller than `b`, otherwise `b`
|
||||
*/
|
||||
fn min(auto a, auto b) {
|
||||
if (a < b)
|
||||
return a;
|
||||
@@ -9,6 +21,12 @@ namespace std::math {
|
||||
return b;
|
||||
};
|
||||
|
||||
/**
|
||||
Compares the values `a` and `b` with each other and returns the bigger of the two
|
||||
@param a First value
|
||||
@param b Second value
|
||||
@return `a` if `a` is bigger than `b`, otherwise `b`
|
||||
*/
|
||||
fn max(auto a, auto b) {
|
||||
if (a > b)
|
||||
return a;
|
||||
@@ -16,6 +34,13 @@ namespace std::math {
|
||||
return b;
|
||||
};
|
||||
|
||||
/**
|
||||
Clamps the value of `x` between `min` and `max`.
|
||||
@param x Value
|
||||
@param min Minimum value
|
||||
@param max Maximum value
|
||||
@return `min` if `x` is smaller than `min`, `max` if `x` is bigger than `max`, `x` otherwise
|
||||
*/
|
||||
fn clamp(auto x, auto min, auto max) {
|
||||
if (x < min)
|
||||
return min;
|
||||
@@ -25,6 +50,11 @@ namespace std::math {
|
||||
return x;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the absolute value of `x`.
|
||||
@param x Value
|
||||
@return `x` if `x` is positive, `-x` otherwise
|
||||
*/
|
||||
fn abs(auto x) {
|
||||
if (x < 0)
|
||||
return -x;
|
||||
@@ -32,6 +62,11 @@ namespace std::math {
|
||||
return x;
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the sign of `x`.
|
||||
@param x Value
|
||||
@return `1` if `x` is positive, `-1` if `x` is negative, `0` if `x` is zero
|
||||
*/
|
||||
fn sign(auto x) {
|
||||
if (x > 0)
|
||||
return 1;
|
||||
@@ -41,6 +76,12 @@ namespace std::math {
|
||||
return 0;
|
||||
};
|
||||
|
||||
/**
|
||||
Copies the sign of `y` to `x`.
|
||||
@param x Value
|
||||
@param y Value
|
||||
@return `x` if `y` is positive, `-x` if `y` is negative
|
||||
*/
|
||||
fn copy_sign(auto x, auto y) {
|
||||
if (y >= 0)
|
||||
return std::math::abs(x);
|
||||
@@ -48,6 +89,11 @@ namespace std::math {
|
||||
return -std::math::abs(x);
|
||||
};
|
||||
|
||||
/**
|
||||
Calculates the factorial of `x`.
|
||||
@param x Value
|
||||
@return Factorial of `x`
|
||||
*/
|
||||
fn factorial(u128 x) {
|
||||
u128 result;
|
||||
|
||||
@@ -60,6 +106,12 @@ namespace std::math {
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
Calculates the binomial coefficient of `n` and `k`.
|
||||
@param n Value
|
||||
@param k Value
|
||||
@return Binomial coefficient of `n` and `k`
|
||||
*/
|
||||
fn comb(u128 n, u128 k) {
|
||||
if (k > n)
|
||||
return 0;
|
||||
@@ -67,6 +119,12 @@ namespace std::math {
|
||||
return std::math::factorial(n) / (std::math::factorial(k) * std::math::factorial(n - k));
|
||||
};
|
||||
|
||||
/**
|
||||
Calculates the permutation of `n` and `k`.
|
||||
@param n Value
|
||||
@param k Value
|
||||
@return Permutation of `n` and `k`
|
||||
*/
|
||||
fn perm(u128 n, u128 k) {
|
||||
if (k > n)
|
||||
return 0;
|
||||
@@ -74,36 +132,208 @@ namespace std::math {
|
||||
return std::math::factorial(n) / std::math::factorial(n - k);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Floors the value of `value`.
|
||||
@param value Value
|
||||
@return `value` floored
|
||||
*/
|
||||
fn floor(auto value) { return builtin::std::math::floor(value); };
|
||||
|
||||
/**
|
||||
Ceils the value of `value`.
|
||||
@param value Value
|
||||
@return `value` ceiled
|
||||
*/
|
||||
fn ceil(auto value) { return builtin::std::math::ceil(value); };
|
||||
|
||||
/**
|
||||
Rounds the value of `value`.
|
||||
@param value Value
|
||||
@return `value` rounded
|
||||
*/
|
||||
fn round(auto value) { return builtin::std::math::round(value); };
|
||||
|
||||
/**
|
||||
Truncates the value of `value`.
|
||||
@param value Value
|
||||
@return `value` truncated
|
||||
*/
|
||||
fn trunc(auto value) { return builtin::std::math::trunc(value); };
|
||||
|
||||
|
||||
/**
|
||||
Calculates the logarithm of `value` with base 10.
|
||||
@param value Value
|
||||
@return Logarithm of `value` with base 10
|
||||
*/
|
||||
fn log10(auto value) { return builtin::std::math::log10(value); };
|
||||
|
||||
/**
|
||||
Calculates the logarithm of `value` with base 2.
|
||||
@param value Value
|
||||
@return Logarithm of `value` with base 2
|
||||
*/
|
||||
fn log2(auto value) { return builtin::std::math::log2(value); };
|
||||
|
||||
/**
|
||||
Calculates the natural logarithm of `value`.
|
||||
@param value Value
|
||||
@return Logarithm of `value` with base `e`
|
||||
*/
|
||||
fn ln(auto value) { return builtin::std::math::ln(value); };
|
||||
|
||||
/**
|
||||
Calculates the floating point modulus of `value`.
|
||||
@param value Value
|
||||
@return Floating point modulus of `value`
|
||||
*/
|
||||
fn fmod(auto value) { return builtin::std::math::fmod(value); };
|
||||
|
||||
/**
|
||||
Calculates the value of `base` raised to the power of `exp`.
|
||||
@param base Base
|
||||
@param exp Exponent
|
||||
@return `base` raised to the power of `exp`
|
||||
*/
|
||||
fn pow(auto base, auto exp) { return builtin::std::math::pow(base, exp); };
|
||||
|
||||
/**
|
||||
Calculates the value of the natural number `e` raised to the power of `value`.
|
||||
@param value Exponent
|
||||
@return `e` raised to the power of `value`
|
||||
*/
|
||||
fn exp(auto value) { return builtin::std::math::exp(value); };
|
||||
|
||||
/**
|
||||
Calculates the square root of `value`.
|
||||
@param value Value
|
||||
@return Square root of `value`
|
||||
*/
|
||||
fn sqrt(auto value) { return builtin::std::math::sqrt(value); };
|
||||
|
||||
/**
|
||||
Calculates the cubic root of `value`.
|
||||
@param value Value
|
||||
@return Cubic root of `value`
|
||||
*/
|
||||
fn cbrt(auto value) { return builtin::std::math::cbrt(value); };
|
||||
|
||||
/**
|
||||
Calculates the sine of `value`.
|
||||
@param value Angle value in radians
|
||||
@return Sine of `value`
|
||||
*/
|
||||
fn sin(auto value) { return builtin::std::math::sin(value); };
|
||||
|
||||
/**
|
||||
Calculates the cosine of `value`.
|
||||
@param value Angle value in radians
|
||||
@return Cosine of `value`
|
||||
*/
|
||||
fn cos(auto value) { return builtin::std::math::cos(value); };
|
||||
|
||||
/**
|
||||
Calculates the tangent of `value`.
|
||||
@param value Angle value in radians
|
||||
@return Tangent of `value`
|
||||
*/
|
||||
fn tan(auto value) { return builtin::std::math::tan(value); };
|
||||
|
||||
/**
|
||||
Calculates the arc sine of `value`.
|
||||
@param value Angle value in radians
|
||||
@return Arc sine of `value`
|
||||
*/
|
||||
fn asin(auto value) { return builtin::std::math::asin(value); };
|
||||
|
||||
/**
|
||||
Calculates the arc cosine of `value`.
|
||||
@param value Value
|
||||
@return Arc cosine of `value` in radians
|
||||
*/
|
||||
fn acos(auto value) { return builtin::std::math::acos(value); };
|
||||
|
||||
/**
|
||||
Calculates the arc tangent of `value`.
|
||||
@param value Value
|
||||
@return Arc tangent of `value` in radians between `-pi/2` and `pi/2`
|
||||
*/
|
||||
fn atan(auto value) { return builtin::std::math::atan(value); };
|
||||
|
||||
/**
|
||||
Calculates the arc tangent of `value`.
|
||||
@param value Value
|
||||
@return Arc tangent of `value` in radians between `-pi` and `pi`
|
||||
*/
|
||||
fn atan2(auto value) { return builtin::std::math::atan2(value); };
|
||||
|
||||
/**
|
||||
Calculates the hyperbolic sine of `value`.
|
||||
@param value Angle value in radians
|
||||
@return Hyperbolic sine of `value`
|
||||
*/
|
||||
fn sinh(auto value) { return builtin::std::math::sinh(value); };
|
||||
|
||||
/**
|
||||
Calculates the hyperbolic cosine of `value`.
|
||||
@param value Angle value in radians
|
||||
@return Hyperbolic cosine of `value`
|
||||
*/
|
||||
fn cosh(auto value) { return builtin::std::math::cosh(value); };
|
||||
|
||||
/**
|
||||
Calculates the hyperbolic tangent of `value`.
|
||||
@param value Angle value in radians
|
||||
@return Hyperbolic tangent of `value`
|
||||
*/
|
||||
fn tanh(auto value) { return builtin::std::math::tanh(value); };
|
||||
|
||||
|
||||
/**
|
||||
Calculates the arc hyperbolic sine of `value`.
|
||||
@param value Value
|
||||
@return Arc hyperbolic sine of `value`
|
||||
*/
|
||||
fn asinh(auto value) { return builtin::std::math::asinh(value); };
|
||||
|
||||
/**
|
||||
Calculates the arc hyperbolic cosine of `value`.
|
||||
@param value Value
|
||||
@return Arc hyperbolic cosine of `value`
|
||||
*/
|
||||
fn acosh(auto value) { return builtin::std::math::acosh(value); };
|
||||
|
||||
/**
|
||||
Calculates the arc hyperbolic tangent of `value`.
|
||||
@param value Value
|
||||
@return Arc hyperbolic tangent of `value`
|
||||
*/
|
||||
fn atanh(auto value) { return builtin::std::math::atanh(value); };
|
||||
|
||||
|
||||
/**
|
||||
Options to use with the `std::math::accumulate` function.
|
||||
*/
|
||||
enum AccumulateOperation : u8 {
|
||||
Add = 0,
|
||||
Multiply = 1,
|
||||
Modulo = 2,
|
||||
Min = 3,
|
||||
Max = 4
|
||||
};
|
||||
|
||||
/**
|
||||
Calculates the sum of all values in the specified memory range.
|
||||
@param start Start address
|
||||
@param end End address
|
||||
@param valueSize Size of each value in bytes
|
||||
@param section Section to use
|
||||
@param operation Operation to use
|
||||
@param endian Endianness to use
|
||||
@return Sum of all values in the specified memory range
|
||||
*/
|
||||
fn accumulate(u128 start, u128 end, u128 valueSize, std::mem::Section section = 0, AccumulateOperation operation = AccumulateOperation::Add, std::mem::Endian endian = std::mem::Endian::Native) {
|
||||
return builtin::std::math::accumulate(start, end, valueSize, section, u128(operation), u128(endian));
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Library for doing raw memory accesses and other low-level operations.
|
||||
*/
|
||||
|
||||
namespace std::mem {
|
||||
|
||||
/**
|
||||
A Handle for a custom Section
|
||||
*/
|
||||
using Section = u128;
|
||||
|
||||
/**
|
||||
The Endianess of a value
|
||||
*/
|
||||
enum Endian : u8 {
|
||||
Native = 0,
|
||||
Big = 1,
|
||||
Little = 2
|
||||
};
|
||||
|
||||
/**
|
||||
Function that returns true if the cursor position is at the end of the memory
|
||||
This is usually used in while-sized arrays in the form of `u8 array[while(!std::mem::eof())]`
|
||||
@return True if the cursor is at the end of the memory
|
||||
*/
|
||||
fn eof() {
|
||||
return $ >= std::mem::size();
|
||||
};
|
||||
|
||||
/**
|
||||
Aligns the given value to the given alignment
|
||||
@param alignment The alignment to align to
|
||||
@param value The value to align
|
||||
@return The aligned value
|
||||
*/
|
||||
fn align_to(u128 alignment, u128 value) {
|
||||
u128 remainder = value % alignment;
|
||||
|
||||
@@ -13,32 +42,201 @@ namespace std::mem {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Gets the base address of the memory
|
||||
@return The base address of the memory
|
||||
*/
|
||||
fn base_address() {
|
||||
return builtin::std::mem::base_address();
|
||||
};
|
||||
|
||||
/**
|
||||
Gets the size of the memory
|
||||
@return The size of the memory
|
||||
*/
|
||||
fn size() {
|
||||
return builtin::std::mem::size();
|
||||
};
|
||||
|
||||
/**
|
||||
Finds a sequence of bytes in the memory
|
||||
@param occurrence_index The index of the occurrence to find
|
||||
@param bytes The bytes to find
|
||||
@return The address of the sequence
|
||||
*/
|
||||
fn find_sequence(u128 occurrence_index, auto ... bytes) {
|
||||
return builtin::std::mem::find_sequence_in_range(occurrence_index, builtin::std::mem::base_address(), builtin::std::mem::size(), bytes);
|
||||
};
|
||||
|
||||
/**
|
||||
Finds a sequence of bytes in a specific region of the memory
|
||||
@param occurrence_index The index of the occurrence to find
|
||||
@param offsetFrom The offset from which to start searching
|
||||
@param offsetTo The offset to which to search
|
||||
@param bytes The bytes to find
|
||||
@return The address of the sequence
|
||||
*/
|
||||
fn find_sequence_in_range(u128 occurrence_index, u128 offsetFrom, u128 offsetTo, auto ... bytes) {
|
||||
return builtin::std::mem::find_sequence_in_range(occurrence_index, offsetFrom, offsetTo, bytes);
|
||||
};
|
||||
|
||||
fn read_unsigned(u128 address, u8 size) {
|
||||
return builtin::std::mem::read_unsigned(address, size);
|
||||
/**
|
||||
Reads a unsigned value from the memory
|
||||
@param address The address to read from
|
||||
@param size The size of the value to read
|
||||
@param endian The endianess of the value to read
|
||||
@return The value read
|
||||
*/
|
||||
fn read_unsigned(u128 address, u8 size, Endian endian = Endian::Native) {
|
||||
return builtin::std::mem::read_unsigned(address, size, u32(endian));
|
||||
};
|
||||
|
||||
fn read_signed(u128 address, u8 size) {
|
||||
return builtin::std::mem::read_signed(address, size);
|
||||
/**
|
||||
Reads a signed value from the memory
|
||||
@param address The address to read from
|
||||
@param size The size of the value to read
|
||||
@param endian The endianess of the value to read
|
||||
@return The value read
|
||||
*/
|
||||
fn read_signed(u128 address, u8 size, Endian endian = Endian::Native) {
|
||||
return builtin::std::mem::read_signed(address, size, u32(endian));
|
||||
};
|
||||
|
||||
/**
|
||||
Reads a string value from the memory
|
||||
@param address The address to read from
|
||||
@param size The size of the value to read
|
||||
@return The value read
|
||||
*/
|
||||
fn read_string(u128 address, u8 size) {
|
||||
return builtin::std::mem::read_string(address, size);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Gets the current bit offset within the current byte that a bitfield will read.
|
||||
*/
|
||||
fn current_bit_offset() {
|
||||
return builtin::std::mem::current_bit_offset();
|
||||
};
|
||||
|
||||
/**
|
||||
Reads a number of bits from the specified bit offset within the specified byte
|
||||
@param byteOffset The byte offset within the data
|
||||
@param bitOffset The bit offset to start the read at within the current byte
|
||||
@param bitSize The total number of bits to read
|
||||
@return A u128 containing the value read
|
||||
*/
|
||||
fn read_bits(u128 byteOffset, u128 bitOffset, u64 bitSize) {
|
||||
byteOffset += bitOffset >> 3;
|
||||
bitOffset = bitOffset & 0x7;
|
||||
return builtin::std::mem::read_bits(byteOffset, bitOffset, bitSize);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Creates a new custom section with the given name
|
||||
@param name The name of the section
|
||||
@return The handle to the section
|
||||
*/
|
||||
fn create_section(str name) {
|
||||
return builtin::std::mem::create_section(name);
|
||||
};
|
||||
|
||||
/**
|
||||
Deletes a custom section
|
||||
@param section The handle to the section
|
||||
*/
|
||||
fn delete_section(Section section) {
|
||||
builtin::std::mem::delete_section(section);
|
||||
};
|
||||
|
||||
/**
|
||||
Gets the size of a custom section
|
||||
@param section The handle to the section
|
||||
@return The size of the section
|
||||
*/
|
||||
fn get_section_size(Section section) {
|
||||
return builtin::std::mem::get_section_size(section);
|
||||
};
|
||||
|
||||
/**
|
||||
Copies a range of bytes from one section into another
|
||||
@param from_section The section to copy from
|
||||
@param from_address The address to copy from
|
||||
@param to_section The section to copy to
|
||||
@param to_address The address to copy to
|
||||
@param size The size of the range to copy
|
||||
*/
|
||||
fn copy_section_to_section(Section from_section, u64 from_address, Section to_section, u64 to_address, u64 size) {
|
||||
builtin::std::mem::copy_to_section(from_section, from_address, to_section, to_address, size);
|
||||
};
|
||||
|
||||
/**
|
||||
Copies a range of bytes from the main section into a custom section
|
||||
@param value The pattern whose bytes should be copied
|
||||
@param to_section The section to copy to
|
||||
@param to_address The address to copy to
|
||||
*/
|
||||
fn copy_value_to_section(ref auto value, Section to_section, u64 to_address) {
|
||||
builtin::std::mem::copy_value_to_section(value, to_section, to_address);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Searches for a sequence of bytes and places the given type at that address
|
||||
@tparam Magic The magic sequence to search for
|
||||
@tparam T The type to place at the address
|
||||
*/
|
||||
struct MagicSearch<auto Magic, T> {
|
||||
if ($ < (std::mem::size() - std::string::length(Magic) - 1)) {
|
||||
char __potentialMagic__[std::string::length(Magic)] [[hidden, no_unique_address]];
|
||||
|
||||
if (__potentialMagic__ == Magic) {
|
||||
T data [[inline]];
|
||||
} else {
|
||||
padding[1];
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
padding[1];
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
Reinterprets a value as a different one
|
||||
@tparam From The type to reinterpret from
|
||||
@tparam To The type to reinterpret to
|
||||
*/
|
||||
union Reinterpreter<From, To> {
|
||||
From from;
|
||||
To to;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Aligns the cursor to the given alignment
|
||||
@tparam alignment The alignment to align to
|
||||
*/
|
||||
struct AlignTo<auto Alignment> {
|
||||
padding[Alignment - ((($ - 1) % Alignment) + 1)];
|
||||
} [[hidden, sealed]];
|
||||
|
||||
/**
|
||||
A type representing a sequence of bytes without any specific meaning
|
||||
@tparam Size The size of the sequence
|
||||
*/
|
||||
struct Bytes<auto Size> {
|
||||
u8 bytes[Size];
|
||||
} [[sealed, format("std::mem::impl::format_bytes")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_bytes(auto bytes) {
|
||||
return "";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +1,67 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
The Pointer library contains helper functions to deal with pointer types.
|
||||
The `relative_to` functions are meant to be used with the `[[pointer_base]]` attribute
|
||||
*/
|
||||
|
||||
namespace std::ptr {
|
||||
|
||||
/**
|
||||
Use the offset of the current pointer as start address
|
||||
@param offset The pointer's value
|
||||
@return The new pointer base
|
||||
*/
|
||||
fn relative_to_pointer(u128 offset) {
|
||||
return $;
|
||||
};
|
||||
|
||||
/**
|
||||
Use the offset of the pointer's parent as start address
|
||||
@param offset The pointer's value
|
||||
@return The new pointer base
|
||||
*/
|
||||
fn relative_to_parent(u128 offset) {
|
||||
return addressof(parent);
|
||||
};
|
||||
|
||||
/**
|
||||
Use the end of the file as pointer base address and use its value as offset backwards from there
|
||||
@param offset The pointer's value
|
||||
@return The new pointer base
|
||||
*/
|
||||
fn relative_to_end(u128 offset) {
|
||||
return std::mem::size() - offset * 2;
|
||||
};
|
||||
|
||||
/**
|
||||
A nullable pointer, generic over both the pointee type and pointer type.
|
||||
|
||||
By nullable, we mean that if the pointer's value is zero (`0x0`), then the
|
||||
value will appear as padding rather than a pointer to something, but
|
||||
if the pointer's value is non-zero, that non-zero value will be treated as
|
||||
a pointer of type `PointerTy` which points to an element of type `PointeeTy`.
|
||||
|
||||
Example:
|
||||
A struct field called `p_myInfo` which is a nullable 64-bit pointer to an
|
||||
element of type `MyInfoTy` would be written as:
|
||||
```
|
||||
struct MyStruct {
|
||||
std::ptr::NullablePtr<MyInfoTy, u64> p_myInfo;
|
||||
}
|
||||
```
|
||||
*/
|
||||
struct NullablePtr<PointeeTy, PointerTy> {
|
||||
// `pointerValue` is `no_unique_address` because we don't want to advance
|
||||
// the current memory location after reading the value of the pointer itself;
|
||||
// we want to examine the value at this address to determine what should be
|
||||
// displayed. It's also `hidden` so the editor only displays either thee
|
||||
// padding or the populated pointer/pointee field.
|
||||
PointerTy pointerValue [[no_unique_address, hidden]];
|
||||
if (pointerValue == 0x0) {
|
||||
padding[sizeof(PointerTy)];
|
||||
} else {
|
||||
PointeeTy *data : PointerTy;
|
||||
}
|
||||
};
|
||||
}
|
||||
81
includes/std/random.pat
Normal file
81
includes/std/random.pat
Normal file
@@ -0,0 +1,81 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/limits.pat>
|
||||
|
||||
/*!
|
||||
Library to generate random numbers. Supports various different distribution types.
|
||||
*/
|
||||
|
||||
namespace std::random {
|
||||
|
||||
/**
|
||||
Represents the type of distribution to use to generate a random number
|
||||
*/
|
||||
enum Distribution : u8 {
|
||||
Uniform = 0,
|
||||
Normal = 1,
|
||||
Exponential = 2,
|
||||
Gamma = 3,
|
||||
Weibull = 4,
|
||||
ExtremeValue = 5,
|
||||
ChiSquared = 6,
|
||||
Cauchy = 7,
|
||||
FisherF = 8,
|
||||
StudentT = 9,
|
||||
LogNormal = 10,
|
||||
Bernoulli = 11,
|
||||
Binomial = 12,
|
||||
NegativeBinomial = 13,
|
||||
Geometric = 14,
|
||||
Poisson = 15
|
||||
};
|
||||
|
||||
/**
|
||||
Sets the seed of the random number generator
|
||||
@param seed Seed to use
|
||||
*/
|
||||
fn set_seed(u64 seed) {
|
||||
builtin::std::random::set_seed(seed);
|
||||
};
|
||||
|
||||
/**
|
||||
Generates a random number using the given distribution with the given parameters.
|
||||
The random number generator used internally is C++'s std::mt19937_64 Mersenne Twister implementation.
|
||||
|
||||
> **Distributions**
|
||||
> - `Uniform(min, max) -> i128`
|
||||
> - `Normal(mean, stddev) -> double`
|
||||
> - `Exponential(lambda) -> double`
|
||||
> - `Gamma(alpha, beta) -> double`
|
||||
> - `Weibull(a, b) -> double`
|
||||
> - `ExtremeValue(a, b) -> double`
|
||||
> - `ChiSquared(n) -> double`
|
||||
> - `Cauchy(a, b) -> double`
|
||||
> - `FisherF(m, n) -> double`
|
||||
> - `StudentT(n) -> double`
|
||||
> - `LogNormal(m, s) -> double`
|
||||
> - `Bernoulli(p) -> bool`
|
||||
> - `Binomial(t, p) -> i128`
|
||||
> - `NegativeBinomial(k, p) -> i128`
|
||||
> - `Geometric(p) -> i128`
|
||||
> - `Poisson(mean) -> i128`
|
||||
|
||||
@param distribution Distribution to use
|
||||
@param param1 This parameter depends on the type of distribution used.
|
||||
@param param2 This parameter depends on the type of distribution used.
|
||||
*/
|
||||
fn generate_using(Distribution distribution, auto param1 = 0, auto param2 = 0) {
|
||||
return builtin::std::random::generate(u32(distribution), param1, param2);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Generates a uniformly distributed random number between `min` and `max`
|
||||
@param min Minimum number
|
||||
@param max Maximum number
|
||||
*/
|
||||
fn generate(u64 min = std::limits::u64_min(), u64 max = std::limits::u64_max()) {
|
||||
return std::random::generate_using(Distribution::Uniform, min, max);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace std {
|
||||
|
||||
using i8 = s8;
|
||||
using i16 = s16;
|
||||
using i32 = s32;
|
||||
using i64 = s64;
|
||||
using i128 = s128;
|
||||
|
||||
using f32 = float;
|
||||
using f64 = double;
|
||||
|
||||
using usize = u64;
|
||||
using isize = s64;
|
||||
|
||||
}
|
||||
@@ -2,57 +2,145 @@
|
||||
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Libray to interact with strings.
|
||||
*/
|
||||
|
||||
namespace std::string {
|
||||
|
||||
/**
|
||||
Base type for sized strings. Represents a string with its size preceeding it.
|
||||
@tparam SizeType The type of the size field.
|
||||
@tparam DataType The type of the characters.
|
||||
*/
|
||||
struct SizedStringBase<SizeType, DataType> {
|
||||
SizeType size;
|
||||
DataType data[size];
|
||||
} [[sealed, format("std::string::impl::format_sized_string"), transform("std::string::impl::format_sized_string")]];
|
||||
|
||||
/**
|
||||
A ASCII string with a prefixed size.
|
||||
@tparam SizeType The type of the size field.
|
||||
*/
|
||||
using SizedString<SizeType> = SizedStringBase<SizeType, char>;
|
||||
|
||||
/**
|
||||
A UTF-16 string with a prefixed size.
|
||||
@tparam SizeType The type of the size field.
|
||||
*/
|
||||
using SizedString16<SizeType> = SizedStringBase<SizeType, char16>;
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_sized_string(ref auto string) {
|
||||
return string.data;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Gets the length of a string.
|
||||
@param string The string to get the length of.
|
||||
@return The length of the string.
|
||||
*/
|
||||
fn length(str string) {
|
||||
return builtin::std::string::length(string);
|
||||
};
|
||||
|
||||
/**
|
||||
Gets the character at a given index.
|
||||
@param string The string to get the character from.
|
||||
@param index The index of the character to get.
|
||||
@return The character at the given index.
|
||||
*/
|
||||
fn at(str string, u32 index) {
|
||||
return builtin::std::string::at(string, index);
|
||||
};
|
||||
|
||||
/**
|
||||
Gets a substring of a string.
|
||||
@param string The string to get the substring from.
|
||||
@param pos The position of the first character of the substring.
|
||||
@param count The number of characters to get.
|
||||
@return The substring.
|
||||
*/
|
||||
fn substr(str string, u32 pos, u32 count) {
|
||||
return builtin::std::string::substr(string, pos, count);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Converts a string to an integer.
|
||||
@param string The string to convert.
|
||||
@param base The base of the number.
|
||||
@return The integer.
|
||||
*/
|
||||
fn parse_int(str string, u8 base) {
|
||||
return builtin::std::string::parse_int(string, base);
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a string to a float.
|
||||
@param string The string to convert.
|
||||
@return The float.
|
||||
*/
|
||||
fn parse_float(str string) {
|
||||
return builtin::std::string::parse_float(string);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Converts any type to a string.
|
||||
@param x The value to convert.
|
||||
@return The string.
|
||||
*/
|
||||
fn to_string(auto x) {
|
||||
return std::format("{}", x);
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if a string starts with a given substring.
|
||||
@param string The string to check.
|
||||
@param part The substring to check for.
|
||||
@return True if the string starts with the substring, false otherwise.
|
||||
*/
|
||||
fn starts_with(str string, str part) {
|
||||
return std::string::substr(string, 0, std::string::length(part)) == part;
|
||||
};
|
||||
|
||||
/**
|
||||
Checks if a string ends with a given substring.
|
||||
@param string The string to check.
|
||||
@param part The substring to check for.
|
||||
@return True if the string ends with the substring, false otherwise.
|
||||
*/
|
||||
fn ends_with(str string, str part) {
|
||||
return std::string::substr(string, std::string::length(string) - std::string::length(part), std::string::length(part)) == part;
|
||||
};
|
||||
|
||||
fn contains(str a, str b) {
|
||||
s32 a_len, b_len;
|
||||
a_len = std::string::length(a);
|
||||
b_len = std::string::length(b);
|
||||
/**
|
||||
Checks if a string contains a given substring.
|
||||
@param string The string to check.
|
||||
@param part The substring to check for.
|
||||
@return True if the string contains the substring, false otherwise.
|
||||
*/
|
||||
fn contains(str string, str part) {
|
||||
s32 string_len = std::string::length(string);
|
||||
s32 part_len = std::string::length(part);
|
||||
|
||||
s32 i;
|
||||
while (i < a_len - b_len) {
|
||||
if (std::string::substr(a, i, b_len) == b)
|
||||
for (s32 i = 0, i <= (string_len - part_len), i += 1) {
|
||||
if (std::string::substr(string, i, part_len) == part)
|
||||
return true;
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
Reverses a string.
|
||||
@param string The string to reverse.
|
||||
@return The reversed string.
|
||||
*/
|
||||
fn reverse(str string) {
|
||||
str result;
|
||||
|
||||
@@ -66,6 +154,11 @@ namespace std::string {
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a string to upper case.
|
||||
@param string The string to convert.
|
||||
@return The converted string.
|
||||
*/
|
||||
fn to_upper(str string) {
|
||||
str result;
|
||||
|
||||
@@ -85,6 +178,11 @@ namespace std::string {
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a string to lower case.
|
||||
@param string The string to convert.
|
||||
@return The converted string.
|
||||
*/
|
||||
fn to_lower(str string) {
|
||||
str result;
|
||||
|
||||
@@ -104,6 +202,13 @@ namespace std::string {
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
Replaces all occurrences of a substring with another substring.
|
||||
@param string The string to replace in.
|
||||
@param pattern The substring to replace.
|
||||
@param replace The substring to replace with.
|
||||
@return The string with the replacements.
|
||||
*/
|
||||
fn replace(str string, str pattern, str replace) {
|
||||
u32 string_len, pattern_len, replace_len;
|
||||
string_len = std::string::length(string);
|
||||
|
||||
@@ -2,14 +2,28 @@
|
||||
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Basic helper functions
|
||||
*/
|
||||
|
||||
namespace std {
|
||||
|
||||
/**
|
||||
Asserts that a given value is true. If it's not, abort evaluation and print the given message to the console
|
||||
@param conditoon The condition that is required to be true
|
||||
@param message The message to print in case the assertion doesn't hold
|
||||
*/
|
||||
fn assert(bool condition, str message) {
|
||||
if (!condition) {
|
||||
std::error(std::format("assertion failed '{0}'", message));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
Asserts that a given value is true. If it's not, print the given message to the console as a warning
|
||||
@param conditoon The condition that is required to be true
|
||||
@param message The message to print in case the assertion doesn't hold
|
||||
*/
|
||||
fn assert_warn(bool condition, str message) {
|
||||
if (!condition) {
|
||||
std::warning(std::format("assertion failed '{0}'", message));
|
||||
@@ -17,10 +31,20 @@ namespace std {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Queries the value of a set environment variable given it's name
|
||||
@param name The name of the env variable
|
||||
@return The value of that variable
|
||||
*/
|
||||
fn env(str name) {
|
||||
return builtin::std::env(name);
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the number of parameters in a parameter pack.
|
||||
@param pack The pack to check
|
||||
@return Number of parameters in `pack`
|
||||
*/
|
||||
fn sizeof_pack(auto ... pack) {
|
||||
return builtin::std::sizeof_pack(pack);
|
||||
};
|
||||
|
||||
191
includes/std/time.pat
Normal file
191
includes/std/time.pat
Normal file
@@ -0,0 +1,191 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Library to handle time and date related operations.
|
||||
*/
|
||||
|
||||
namespace std::time {
|
||||
|
||||
/**
|
||||
A structured representation of a time and date.
|
||||
*/
|
||||
struct Time {
|
||||
u8 sec;
|
||||
u8 min;
|
||||
u8 hour;
|
||||
u8 mday;
|
||||
u8 mon;
|
||||
u16 year;
|
||||
u8 wday;
|
||||
u16 yday;
|
||||
bool isdst;
|
||||
} [[sealed]];
|
||||
|
||||
/**
|
||||
A helper type to convert between Time and u128.
|
||||
*/
|
||||
union TimeConverter {
|
||||
Time time;
|
||||
u128 value;
|
||||
};
|
||||
|
||||
/**
|
||||
A type to represent a time in seconds since the epoch.
|
||||
*/
|
||||
using EpochTime = u128;
|
||||
|
||||
/**
|
||||
A type to represent a time zone.
|
||||
*/
|
||||
enum TimeZone : u8 {
|
||||
Local,
|
||||
UTC
|
||||
};
|
||||
|
||||
/**
|
||||
A type to represent a DOS date.
|
||||
*/
|
||||
bitfield DOSDate {
|
||||
day: 5;
|
||||
month: 4;
|
||||
year: 7;
|
||||
} [[sealed]];
|
||||
|
||||
/**
|
||||
A type to represent a DOS time.
|
||||
*/
|
||||
bitfield DOSTime {
|
||||
seconds: 5;
|
||||
minutes: 6;
|
||||
hours: 5;
|
||||
} [[sealed]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
union DOSDateConverter {
|
||||
DOSDate date;
|
||||
u16 value;
|
||||
};
|
||||
|
||||
union DOSTimeConverter {
|
||||
DOSTime time;
|
||||
u16 value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Returns the current time in seconds since the epoch.
|
||||
@return The current time in seconds since the epoch.
|
||||
*/
|
||||
fn epoch() {
|
||||
return builtin::std::time::epoch();
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a time in seconds since the epoch to a local time.
|
||||
@param epoch_time The time in seconds since the epoch.
|
||||
@return The local time.
|
||||
*/
|
||||
fn to_local(EpochTime epoch_time) {
|
||||
TimeConverter converter;
|
||||
|
||||
converter.value = builtin::std::time::to_local(epoch_time);
|
||||
|
||||
return converter.time;
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a time in seconds since the epoch to a UTC time.
|
||||
@param epoch_time The time in seconds since the epoch.
|
||||
@return The UTC time.
|
||||
*/
|
||||
fn to_utc(EpochTime epoch_time) {
|
||||
TimeConverter converter;
|
||||
|
||||
converter.value = builtin::std::time::to_utc(epoch_time);
|
||||
|
||||
return converter.time;
|
||||
};
|
||||
|
||||
/**
|
||||
Queries the current time in the specified time zone.
|
||||
@param time_zone The time zone to query.
|
||||
@return The current time in the specified time zone.
|
||||
*/
|
||||
fn now(TimeZone time_zone = TimeZone::Local) {
|
||||
TimeConverter converter;
|
||||
|
||||
if (time_zone == TimeZone::Local)
|
||||
converter.value = builtin::std::time::to_local(std::time::epoch());
|
||||
else if (time_zone == TimeZone::UTC)
|
||||
converter.value = builtin::std::time::to_utc(std::time::epoch());
|
||||
else
|
||||
converter.value = 0x00;
|
||||
|
||||
return converter.time;
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a value to a DOS date.
|
||||
@param value The value to convert.
|
||||
@return The DOS date.
|
||||
*/
|
||||
fn to_dos_date(u16 value) {
|
||||
impl::DOSDateConverter converter;
|
||||
|
||||
converter.value = value;
|
||||
|
||||
return converter.date;
|
||||
};
|
||||
|
||||
/**
|
||||
Converts a value to a DOS time.
|
||||
@param value The value to convert.
|
||||
@return The DOS time.
|
||||
*/
|
||||
fn to_dos_time(u16 value) {
|
||||
impl::DOSTimeConverter converter;
|
||||
|
||||
converter.value = value;
|
||||
|
||||
return converter.time;
|
||||
};
|
||||
|
||||
/**
|
||||
Formats a time according to the specified format string.
|
||||
@param time The time to format.
|
||||
@param format_string The format string to use.
|
||||
@return The formatted time.
|
||||
*/
|
||||
fn format(Time time, str format_string = "%c") {
|
||||
TimeConverter converter;
|
||||
converter.time = time;
|
||||
|
||||
return builtin::std::time::format(format_string, converter.value);
|
||||
};
|
||||
|
||||
/**
|
||||
Formats a DOS date according to the specified format string.
|
||||
@param date The DOS date to format.
|
||||
@param format_string The format string to use.
|
||||
@return The formatted DOS date.
|
||||
*/
|
||||
fn format_dos_date(DOSDate date, str format_string = "{}/{}/{}") {
|
||||
return std::format(format_string, date.day, date.month, date.year + 1980);
|
||||
};
|
||||
|
||||
/**
|
||||
Formats a DOS time according to the specified format string.
|
||||
@param time The DOS time to format.
|
||||
@param format_string The format string to use.
|
||||
@return The formatted DOS time.
|
||||
*/
|
||||
fn format_dos_time(DOSTime time, str format_string = "{:02}:{:02}:{:02}") {
|
||||
return std::format(format_string, time.hours, time.minutes, time.seconds * 2);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
#include <std/io.pat>
|
||||
#include <std/math.pat>
|
||||
|
||||
namespace std::type {
|
||||
|
||||
struct GUID {
|
||||
u32 time_low;
|
||||
u16 time_mid;
|
||||
u16 time_high_and_version;
|
||||
u8 clock_seq_and_reserved;
|
||||
u8 clock_seq_low;
|
||||
u8 node[6];
|
||||
} [[format("std::type::guid_formatter"), single_color]];
|
||||
|
||||
fn guid_formatter(GUID guid) {
|
||||
bool valid = ((le u16(guid.time_high_and_version) >> 12) <= 5) && (((guid.clock_seq_and_reserved >> 4) >= 8) || ((guid.clock_seq_and_reserved >> 4) == 0));
|
||||
|
||||
return std::format("{}{{{:08X}-{:04X}-{:04X}-{:02X}{:02X}-{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}}}",
|
||||
valid ? "" : "Invalid ",
|
||||
le u32(guid.time_low),
|
||||
le u16(guid.time_mid),
|
||||
le u16(guid.time_high_and_version),
|
||||
guid.clock_seq_and_reserved,
|
||||
guid.clock_seq_low,
|
||||
guid.node[0],
|
||||
guid.node[1],
|
||||
guid.node[2],
|
||||
guid.node[3],
|
||||
guid.node[4],
|
||||
guid.node[5]);
|
||||
};
|
||||
|
||||
|
||||
using float16 = u16 [[format("std::type::float16_formatter")]];
|
||||
|
||||
fn float16_formatter(float16 value) {
|
||||
float sign = (value >> 15) == 0b01 ? -1.0 : 1.0;
|
||||
float exponent = std::math::pow(2.0, float((value >> 10) & 0x1F) - 14);
|
||||
u16 mantissa = value & 0x3FF;
|
||||
|
||||
float fraction = 0;
|
||||
for (s8 i = 9, i >= 0, i -= 1) {
|
||||
if ((mantissa & (1 << i)) != 0) {
|
||||
fraction += 1.0 / std::math::pow(2.0, (10.0 - i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return std::format("{:f}", sign * exponent * fraction);
|
||||
|
||||
};
|
||||
|
||||
|
||||
bitfield Bits {
|
||||
bit0 : 1;
|
||||
bit1 : 1;
|
||||
bit2 : 1;
|
||||
bit3 : 1;
|
||||
bit4 : 1;
|
||||
bit5 : 1;
|
||||
bit6 : 1;
|
||||
bit7 : 1;
|
||||
} [[format("std::type::bits_formatter"), right_to_left]];
|
||||
|
||||
bitfield Nibbles {
|
||||
low : 4;
|
||||
high : 4;
|
||||
} [[format("std::type::nibble_formatter")]];
|
||||
|
||||
union Byte {
|
||||
u8 value;
|
||||
Bits bits;
|
||||
Nibbles nibbles;
|
||||
} [[format("std::type::byte_formatter"), single_color]];
|
||||
|
||||
fn byte_formatter(Byte byte) {
|
||||
return std::format("0x{0:02X} (0b{1:08b}) LSB:{2}, MSB:{3}",
|
||||
byte.value,
|
||||
byte.value,
|
||||
byte.bits.bit0,
|
||||
byte.bits.bit7);
|
||||
};
|
||||
|
||||
fn bits_formatter(Bits bits) {
|
||||
return std::format("0b{}{}{}{}{}{}{}{}",
|
||||
bits.bit7,
|
||||
bits.bit6,
|
||||
bits.bit5,
|
||||
bits.bit4,
|
||||
bits.bit6,
|
||||
bits.bit2,
|
||||
bits.bit1,
|
||||
bits.bit0);
|
||||
};
|
||||
|
||||
fn nibble_formatter(Nibbles nibbles) {
|
||||
return std::format("{{ {0:0X}, {1:0X} }}", nibbles.high, nibbles.low);
|
||||
};
|
||||
|
||||
}
|
||||
55
includes/type/base.pat
Normal file
55
includes/type/base.pat
Normal file
@@ -0,0 +1,55 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/math.pat>
|
||||
|
||||
/*!
|
||||
Types used to change the base of the displayed integer value.
|
||||
Used like `type::Hex<u32> hexNumber;`, `type::Oct<u16> octalNumber;`
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Integer type representing a Hexadecimal value. Displays its value in hexadecimal format.
|
||||
@tparam T Integer type to use
|
||||
*/
|
||||
using Hex<T> = T [[format("type::impl::format_hex")]];
|
||||
|
||||
/**
|
||||
Integer type representing a Octal value. Displays its value in octal format.
|
||||
@tparam T Integer type to use
|
||||
*/
|
||||
using Oct<T> = T [[format("type::impl::format_oct")]];
|
||||
|
||||
/**
|
||||
Integer type representing a Decimal value. Displays its value in decimal format.
|
||||
@tparam T Integer type to use
|
||||
*/
|
||||
using Dec<T> = T [[format("type::impl::format_dec")]];
|
||||
|
||||
/**
|
||||
Integer type representing a Binary value. Displays its value in binary format.
|
||||
@tparam T Integer type to use
|
||||
*/
|
||||
using Bin<T> = T [[format("type::impl::format_bin")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_number(auto value, str fmt) {
|
||||
bool negative = value < 0;
|
||||
|
||||
if (negative)
|
||||
return std::format("-" + fmt, std::math::abs(value));
|
||||
else
|
||||
return std::format(fmt, value);
|
||||
};
|
||||
|
||||
fn format_hex(auto value) { return type::impl::format_number(value, "0x{:02X}"); };
|
||||
fn format_oct(auto value) { return type::impl::format_number(value, "0o{:03o}"); };
|
||||
fn format_dec(auto value) { return type::impl::format_number(value, "{}"); };
|
||||
fn format_bin(auto value) { return type::impl::format_number(value, "0b{:08b}"); };
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
63
includes/type/base64.pat
Normal file
63
includes/type/base64.pat
Normal file
@@ -0,0 +1,63 @@
|
||||
#include <std/io.pat>
|
||||
#include <std/string.pat>
|
||||
#include <std/mem.pat>
|
||||
|
||||
/*!
|
||||
Type representing a Base64 encoded string
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Type representing a Base64 encoded string
|
||||
@tparam T String type
|
||||
*/
|
||||
struct Base64<T> {
|
||||
T string;
|
||||
} [[sealed, format("type::impl::transform_base64")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn get_decoded_value(char c) {
|
||||
if (c >= 'A' && c <= 'Z') return c - 'A';
|
||||
if (c >= 'a' && c <= 'z') return c - 'a' + 26;
|
||||
if (c >= '0' && c <= '9') return c - '0' + 52;
|
||||
if (c == '+') return 62;
|
||||
if (c == '/') return 63;
|
||||
return -1; // Invalid character
|
||||
};
|
||||
|
||||
fn decode_base64(str input) {
|
||||
u64 inputLength = std::string::length(input);
|
||||
str result;
|
||||
|
||||
s32 val = 0;
|
||||
s32 bits = -8;
|
||||
for (u32 i = 0, i < inputLength, i += 1) {
|
||||
char c = input[i];
|
||||
if (c == '=')
|
||||
break;
|
||||
|
||||
s32 index = type::impl::get_decoded_value(c);
|
||||
if (index == -1)
|
||||
continue;
|
||||
|
||||
val = (val << 6) + index;
|
||||
bits += 6;
|
||||
|
||||
if (bits >= 0) {
|
||||
result += char((val >> bits) & 0xFF);
|
||||
bits -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
fn transform_base64(ref auto base64) {
|
||||
return type::impl::decode_base64(base64.string);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
37
includes/type/bcd.pat
Normal file
37
includes/type/bcd.pat
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Type to decode a BCD (Binary Coded Decimal) number
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Decodes a BCD value where one byte represents a single digit
|
||||
@tparam Digits Number of digits
|
||||
*/
|
||||
struct BCD<auto Digits> {
|
||||
u8 bytes[Digits];
|
||||
} [[sealed, format_read("type::impl::format_bcd")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_bcd(ref auto bcd) {
|
||||
str result;
|
||||
|
||||
for (u32 i = 0, i < sizeof(bcd.bytes), i += 1) {
|
||||
u8 byte = bcd.bytes[i];
|
||||
if (byte >= 10)
|
||||
return "Invalid";
|
||||
|
||||
result += std::format("{}", byte);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
71
includes/type/byte.pat
Normal file
71
includes/type/byte.pat
Normal file
@@ -0,0 +1,71 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Types to display single bytes using various different representations
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Type visualizing the value of each individual bit
|
||||
*/
|
||||
bitfield Bits {
|
||||
bit0 : 1;
|
||||
bit1 : 1;
|
||||
bit2 : 1;
|
||||
bit3 : 1;
|
||||
bit4 : 1;
|
||||
bit5 : 1;
|
||||
bit6 : 1;
|
||||
bit7 : 1;
|
||||
} [[format("type::impl::format_bits"), right_to_left]];
|
||||
|
||||
/**
|
||||
Type visualizing the value of the two nibbles
|
||||
*/
|
||||
bitfield Nibbles {
|
||||
low : 4;
|
||||
high : 4;
|
||||
} [[format("type::impl::format_nibbles")]];
|
||||
|
||||
/**
|
||||
Type representing a single Byte. Decodes the byte as it's hexadeicmal value, individual bits and nibbles
|
||||
*/
|
||||
union Byte {
|
||||
u8 value;
|
||||
Bits bits;
|
||||
Nibbles nibbles;
|
||||
} [[format("type::impl::format_byte"), single_color]];
|
||||
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_byte(Byte byte) {
|
||||
return std::format("0x{0:02X} (0b{1:08b}) LSB:{2}, MSB:{3}",
|
||||
byte.value,
|
||||
byte.value,
|
||||
byte.bits.bit0,
|
||||
byte.bits.bit7);
|
||||
};
|
||||
|
||||
fn format_bits(Bits bits) {
|
||||
return std::format("0b{}{}{}{}{}{}{}{}",
|
||||
bits.bit7,
|
||||
bits.bit6,
|
||||
bits.bit5,
|
||||
bits.bit4,
|
||||
bits.bit6,
|
||||
bits.bit2,
|
||||
bits.bit1,
|
||||
bits.bit0);
|
||||
};
|
||||
|
||||
fn format_nibbles(Nibbles nibbles) {
|
||||
return std::format("{{ {0:0X}, {1:0X} }}", nibbles.high, nibbles.low);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
80
includes/type/color.pat
Normal file
80
includes/type/color.pat
Normal file
@@ -0,0 +1,80 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/core.pat>
|
||||
|
||||
/*!
|
||||
Types representing RGB or RGBA colors. The decoded color will be displayed in their color field
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Type representing a generic RGBA color with a variable number of bits for each color
|
||||
@tparam R Number of bits used for the red component
|
||||
@tparam G Number of bits used for the green component
|
||||
@tparam B Number of bits used for the blue component
|
||||
@tparam A Number of bits used for the alpha component
|
||||
*/
|
||||
bitfield RGBA<auto R, auto G, auto B, auto A> {
|
||||
r : R;
|
||||
g : G;
|
||||
b : B;
|
||||
if (A > 0) a : A;
|
||||
} [[sealed, format("type::impl::format_color"), color(std::format("{0:02X}{1:02X}{2:02X}FF", r, g, b))]];
|
||||
|
||||
/**
|
||||
Type representing a generic RGB color with a variable number of bits for each color
|
||||
@tparam R Number of bits used for the red component
|
||||
@tparam G Number of bits used for the green component
|
||||
@tparam B Number of bits used for the blue component
|
||||
*/
|
||||
using RGB<auto R, auto G, auto B> = RGBA<R,G,B,0>;
|
||||
|
||||
|
||||
/**
|
||||
Type representing a RGBA color with 8 bits for the red component, 8 bits for green, 8 bits for blue and 8 bits for alpha
|
||||
*/
|
||||
using RGBA8 = RGBA<8,8,8,8>;
|
||||
|
||||
/**
|
||||
Type representing a RGB color with 8 bits for the red component, 8 bits for green and 8 bits for blue
|
||||
*/
|
||||
using RGB8 = RGB<8,8,8>;
|
||||
|
||||
/**
|
||||
Type representing a RGB color with 5 bits for the red component, 6 bits for green and 5 bits for blue
|
||||
*/
|
||||
using RGB565 = RGB<5,6,5>;
|
||||
|
||||
/**
|
||||
Type representing a RGBA color with 4 bits for the red component, 4 bits for green, 4 bits for blue and 4 bits for alpha
|
||||
*/
|
||||
using RGB4444 = RGBA<4,4,4,4>;
|
||||
|
||||
/**
|
||||
Type representing a RGBA color with 5 bits for the red component, 5 bits for green, 5 bits for blue and 1 bits for alpha
|
||||
*/
|
||||
using RGBA5551 = RGBA<5,5,5,1>;
|
||||
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_color(ref auto color) {
|
||||
if (!std::core::has_member(color, "a")) {
|
||||
return std::format("#{0:02X}{1:02X}{2:02X} | rgb({0}, {1}, {2})",
|
||||
color.r,
|
||||
color.g,
|
||||
color.b);
|
||||
} else {
|
||||
return std::format("#{0:02X}{1:02X}{2:02X}{3:02X} | rgba({0}, {1}, {2}, {3})",
|
||||
color.r,
|
||||
color.g,
|
||||
color.b,
|
||||
color.a);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
60
includes/type/float16.pat
Normal file
60
includes/type/float16.pat
Normal file
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/math.pat>
|
||||
#include <std/mem.pat>
|
||||
|
||||
/*!
|
||||
Type representing a 16 bit half precision floating point number
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Type representing a 16 bit half precision floating point number
|
||||
*/
|
||||
using float16 = u16 [[format("type::impl::format_float16")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
union U32ToFloatConverter {
|
||||
u32 intValue;
|
||||
float floatValue;
|
||||
};
|
||||
|
||||
fn format_float16(float16 value) {
|
||||
u32 sign = value >> 15;
|
||||
u32 exponent = (value >> 10) & 0x1F;
|
||||
u32 mantissa = value & 0x3FF;
|
||||
|
||||
u32 result = 0x00;
|
||||
|
||||
if (exponent == 0) {
|
||||
if (mantissa == 0) {
|
||||
result = sign << 31;
|
||||
} else {
|
||||
exponent = 0x7F - 14;
|
||||
|
||||
while ((mantissa & (1 << 10)) == 0) {
|
||||
exponent -= 1;
|
||||
mantissa <<= 1;
|
||||
}
|
||||
|
||||
mantissa &= 0x3FF;
|
||||
result = (sign << 31) | (exponent << 23) | (mantissa << 13);
|
||||
}
|
||||
} else if (exponent == 0x1F) {
|
||||
result = (sign << 31) | (0xFF << 23) | (mantissa << 13);
|
||||
} else {
|
||||
result = (sign << 31) | ((exponent + (0x7F - 15)) << 23) | (mantissa << 13);
|
||||
}
|
||||
|
||||
std::mem::Reinterpreter<u32, float> converter;
|
||||
converter.from = result;
|
||||
|
||||
return std::format("{}", converter.to);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
50
includes/type/guid.pat
Normal file
50
includes/type/guid.pat
Normal file
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Types to deal with UUIDs (Universally Unique Identifiers) / GUIDs (Globally Unique Identifiers) as described in RFC 4122
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Type representing a GUID value
|
||||
*/
|
||||
struct GUID {
|
||||
u32 time_low;
|
||||
u16 time_mid;
|
||||
u16 time_high_and_version;
|
||||
u8 clock_seq_and_reserved;
|
||||
u8 clock_seq_low;
|
||||
u8 node[6];
|
||||
} [[sealed, format("type::impl::format_guid")]];
|
||||
|
||||
/**
|
||||
Alias name for GUID
|
||||
*/
|
||||
using UUID = GUID;
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_guid(GUID guid) {
|
||||
bool valid = ((le u16(guid.time_high_and_version) >> 12) <= 5) && (((guid.clock_seq_and_reserved >> 4) >= 8) || ((guid.clock_seq_and_reserved >> 4) == 0));
|
||||
|
||||
return std::format("{}{{{:08X}-{:04X}-{:04X}-{:02X}{:02X}-{:02X}{:02X}{:02X}{:02X}{:02X}{:02X}}}",
|
||||
valid ? "" : "Invalid ",
|
||||
le u32(guid.time_low),
|
||||
le u16(guid.time_mid),
|
||||
le u16(guid.time_high_and_version),
|
||||
guid.clock_seq_and_reserved,
|
||||
guid.clock_seq_low,
|
||||
guid.node[0],
|
||||
guid.node[1],
|
||||
guid.node[2],
|
||||
guid.node[3],
|
||||
guid.node[4],
|
||||
guid.node[5]);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
67
includes/type/ip.pat
Normal file
67
includes/type/ip.pat
Normal file
@@ -0,0 +1,67 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/string.pat>
|
||||
|
||||
/*!
|
||||
Types used to decode IP addresses
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
A 4 byte IPv4 Address as described in RFC 791
|
||||
*/
|
||||
struct IPv4Address {
|
||||
u8 bytes[4];
|
||||
} [[sealed, format("type::impl::format_ipv4_address")]];
|
||||
|
||||
/**
|
||||
A 16 byte IPv6 Address as described in RFC 8200
|
||||
*/
|
||||
struct IPv6Address {
|
||||
be u16 words[8];
|
||||
} [[sealed, format("type::impl::format_ipv6_address")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_ipv4_address(IPv4Address address) {
|
||||
return std::format("{}.{}.{}.{}",
|
||||
address.bytes[0],
|
||||
address.bytes[1],
|
||||
address.bytes[2],
|
||||
address.bytes[3]);
|
||||
};
|
||||
|
||||
fn format_ipv6_address(IPv6Address address) {
|
||||
str result;
|
||||
|
||||
bool hadZeros = false;
|
||||
s8 startIndex = -1;
|
||||
|
||||
for (u8 i = 0, i < 8, i += 1) {
|
||||
if (address.words[i] == 0x00 && !hadZeros) {
|
||||
hadZeros = true;
|
||||
startIndex = i;
|
||||
|
||||
while (i < 7) {
|
||||
if (address.words[i + 1] != 0x00)
|
||||
break;
|
||||
i += 1;
|
||||
}
|
||||
|
||||
if (startIndex == 0 || i == 7)
|
||||
result += ":";
|
||||
} else {
|
||||
result += std::format("{:X}", address.words[i]);
|
||||
}
|
||||
|
||||
result += ":";
|
||||
}
|
||||
|
||||
return std::string::substr(result, 0, std::string::length(result) - 1);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
72
includes/type/leb128.pat
Normal file
72
includes/type/leb128.pat
Normal file
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/mem.pat>
|
||||
|
||||
/*!
|
||||
Types used to decode Little Endian Base 128 numbers used to store large numbers as space efficiently as possible
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Base LEB128 type. Use `uLEB128` and `sLEB128` instead.
|
||||
*/
|
||||
struct LEB128Base {
|
||||
u8 array[while($ == addressof(this) || std::mem::read_unsigned($-1, 1) & 0x80 != 0)] [[hidden]];
|
||||
} [[sealed]];
|
||||
|
||||
/**
|
||||
A unsigned variant of a LEB128 number
|
||||
*/
|
||||
using uLEB128 = LEB128Base [[format("type::impl::format_uleb128"), transform("type::impl::transform_uleb128")]];
|
||||
|
||||
/**
|
||||
A signed variant of a LEB128 number
|
||||
*/
|
||||
using sLEB128 = LEB128Base [[format("type::impl::format_sleb128"), transform("type::impl::transform_sleb128")]];
|
||||
|
||||
/**
|
||||
Legacy alias for uLEB128
|
||||
*/
|
||||
using LEB128 = uLEB128;
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn transform_uleb128_array(ref auto array) {
|
||||
u128 res = array[0] & 0x7f;
|
||||
for(u8 i = 1, array[i-1] & 0x80 != 0, i+=1) {
|
||||
res |= u128(array[i] & 0x7f) << 7 * i;
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
fn transform_sleb128_array(ref auto array) {
|
||||
s128 res = type::impl::transform_uleb128_array(array);
|
||||
if (res & 0x40 != 0) {
|
||||
res |= ~0 << (sizeof(array) / sizeof(u8)) * 7;
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
fn format_uleb128(ref auto leb128) {
|
||||
u128 res = type::impl::transform_uleb128_array(leb128.array);
|
||||
return std::format("{} ({:#x})", res, res);
|
||||
};
|
||||
|
||||
fn transform_uleb128(ref auto leb128) {
|
||||
return type::impl::transform_uleb128_array(leb128.array);
|
||||
};
|
||||
|
||||
fn format_sleb128(ref auto leb128) {
|
||||
s128 res = type::impl::transform_sleb128_array(leb128.array);
|
||||
return std::format("{} ({:#x})", res, res);
|
||||
};
|
||||
|
||||
fn transform_sleb128(ref auto leb128) {
|
||||
return type::impl::transform_sleb128_array(leb128.array);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
32
includes/type/mac.pat
Normal file
32
includes/type/mac.pat
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Types used to decode MAC Addresses
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
A MAC Address as used in the Internet Protocol
|
||||
*/
|
||||
struct MACAddress {
|
||||
u8 bytes[6];
|
||||
} [[sealed, format("type::impl::format_mac_address")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_mac_address(MACAddress address) {
|
||||
return std::format("{:02X}:{:02X}:{:02X}:{:02X}:{:02X}:{:02X}",
|
||||
address.bytes[0],
|
||||
address.bytes[1],
|
||||
address.bytes[2],
|
||||
address.bytes[3],
|
||||
address.bytes[4],
|
||||
address.bytes[5]);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
38
includes/type/magic.pat
Normal file
38
includes/type/magic.pat
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <std/string.pat>
|
||||
#include <std/sys.pat>
|
||||
#include <std/io.pat>
|
||||
#include <std/ctype.pat>
|
||||
|
||||
/*!
|
||||
Types used to parse and enforce specific magic numbers
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
A Magic number. Throws an error if the magic number does not match the expected value
|
||||
@tparam ExpectedValue A string representing the expected value
|
||||
*/
|
||||
struct Magic<auto ExpectedValue> {
|
||||
char value[std::string::length(ExpectedValue)];
|
||||
std::assert(value == ExpectedValue, std::format("Invalid magic value! Expected \"{}\", got \"{}\".", ExpectedValue, value));
|
||||
} [[sealed, format("type::impl::format_magic")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_magic(ref auto magic) {
|
||||
str result;
|
||||
for (u32 i = 0, i < sizeof(magic.value), i += 1) {
|
||||
char c = magic.value[i];
|
||||
|
||||
if (std::ctype::isprint(c))
|
||||
result += c;
|
||||
else
|
||||
result += std::format("\\x{:02X}", u8(c));
|
||||
}
|
||||
return std::format("\"{}\"", result);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
53
includes/type/path.pat
Normal file
53
includes/type/path.pat
Normal file
@@ -0,0 +1,53 @@
|
||||
#include <std/mem.pat>
|
||||
|
||||
/*!
|
||||
Types dealing with various kinds of resource paths
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
Type representing a single path segment. Use the `Path` type instead of using this on its own
|
||||
@tparam Delimeter The delimeter sequence used to separate two path segments
|
||||
*/
|
||||
struct PathSegment<auto Delimeter> {
|
||||
char string[while(std::mem::read_string($, std::string::length(Delimeter)) != Delimeter && std::mem::read_unsigned($, 1) != 0x00)];
|
||||
char separator [[hidden]];
|
||||
|
||||
if (separator == 0x00) {
|
||||
$ -= 1;
|
||||
break;
|
||||
}
|
||||
} [[sealed, format("type::impl::format_path_segment")]];
|
||||
|
||||
/**
|
||||
A generic type representing a path with an arbitrary delimeter
|
||||
@tparam Delimeter The delimeter sequence used to separate two path segments
|
||||
*/
|
||||
struct Path<auto Delimeter> {
|
||||
PathSegment<Delimeter> segments[while(true)];
|
||||
} [[format("type::impl::format_path")]];
|
||||
|
||||
/**
|
||||
A type representing a Unix path using a '/' forwardslash as delimeter
|
||||
*/
|
||||
using UnixPath = Path<"/">;
|
||||
|
||||
/**
|
||||
A type representing a DOS path using a '\' backslash as delimeter
|
||||
*/
|
||||
using DOSPath = Path<"\\">;
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_path_segment(ref auto segment) {
|
||||
return segment.string;
|
||||
};
|
||||
|
||||
fn format_path(ref auto path) {
|
||||
return std::mem::read_string($, sizeof(path));
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
72
includes/type/size.pat
Normal file
72
includes/type/size.pat
Normal file
@@ -0,0 +1,72 @@
|
||||
#include <std/io.pat>
|
||||
|
||||
/*!
|
||||
Types used to pretty print size values
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
A generic size type which displays its value in Bytes (or kiB, MiB, GiB, TiB, PiB, EiB if larger)
|
||||
@tparam T Underlying type
|
||||
*/
|
||||
using Size<T> = T [[format("type::impl::size_formatter")]];
|
||||
|
||||
/**
|
||||
A 8 bit size type
|
||||
*/
|
||||
using Size8 = Size<u8>;
|
||||
/**
|
||||
A 16 bit size type
|
||||
*/
|
||||
using Size16 = Size<u16>;
|
||||
/**
|
||||
A 32 bit size type
|
||||
*/
|
||||
using Size32 = Size<u32>;
|
||||
/**
|
||||
A 64 bit size type
|
||||
*/
|
||||
using Size64 = Size<u64>;
|
||||
/**
|
||||
A 128 bit size type
|
||||
*/
|
||||
using Size128 = Size<u128>;
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn size_formatter(u128 size) {
|
||||
double sizeFloat = size;
|
||||
|
||||
u32 i = 0;
|
||||
while (sizeFloat >= 1024 && i <= 6) {
|
||||
i += 1;
|
||||
sizeFloat /= 1024;
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
if (size == 1)
|
||||
return std::format("{} Byte", size);
|
||||
else
|
||||
return std::format("{} Bytes", size);
|
||||
} else {
|
||||
str result = std::format("{:.3f} ", sizeFloat);
|
||||
|
||||
if (i == 1)
|
||||
return result + "kiB";
|
||||
else if (i == 2)
|
||||
return result + "MiB";
|
||||
else if (i == 3)
|
||||
return result + "GiB";
|
||||
else if (i == 4)
|
||||
return result + "TiB";
|
||||
else if (i == 5)
|
||||
return result + "PiB";
|
||||
else
|
||||
return result + "EiB";
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
53
includes/type/time.pat
Normal file
53
includes/type/time.pat
Normal file
@@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/time.pat>
|
||||
|
||||
/*!
|
||||
Types used to decode various different time formats
|
||||
*/
|
||||
|
||||
namespace type {
|
||||
|
||||
/**
|
||||
A 32 bit Unix time value
|
||||
*/
|
||||
using time32_t = u32 [[format("type::impl::format_time_t")]];
|
||||
|
||||
/**
|
||||
Alias name for `time32_t`
|
||||
*/
|
||||
using time_t = time32_t;
|
||||
|
||||
/**
|
||||
A 64 bit Unix time value
|
||||
*/
|
||||
using time64_t = u64 [[format("type::impl::format_time_t")]];
|
||||
|
||||
/**
|
||||
A DOS Date value
|
||||
*/
|
||||
using DOSDate = u16 [[format("type::impl::format_dosdate")]];
|
||||
|
||||
/**
|
||||
A DOS Time value
|
||||
*/
|
||||
using DOSTime = u16 [[format("type::impl::format_dostime")]];
|
||||
|
||||
namespace impl {
|
||||
|
||||
fn format_time_t(u128 value) {
|
||||
return std::time::format(std::time::to_utc(value));
|
||||
};
|
||||
|
||||
fn format_dosdate(u16 value) {
|
||||
return std::time::format_dos_date(std::time::to_dos_date(value));
|
||||
};
|
||||
|
||||
fn format_dostime(u16 value) {
|
||||
return std::time::format_dos_time(std::time::to_dos_time(value));
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
66
includes/type/types/010.pat
Normal file
66
includes/type/types/010.pat
Normal file
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Alias types to make it easier to move template definitions over from 010 Editor to ImHex
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
|
||||
// using char = s8;
|
||||
using byte = s8;
|
||||
using CHAR = s8;
|
||||
using BYTE = s8;
|
||||
|
||||
using uchar = u8;
|
||||
using ubyte = u8;
|
||||
using UCHAR = u8;
|
||||
using UBYTE = u8;
|
||||
|
||||
|
||||
using short = s16;
|
||||
using int16 = s16;
|
||||
using SHORT = s16;
|
||||
using INT16 = s16;
|
||||
|
||||
using ushort = u16;
|
||||
using uint16 = u16;
|
||||
using USHORT = u16;
|
||||
using UINT16 = u16;
|
||||
using WORD = u16;
|
||||
|
||||
using int = s32;
|
||||
using int32 = s32;
|
||||
using long = s32;
|
||||
using INT = s32;
|
||||
using INT32 = s32;
|
||||
using LONG = s32;
|
||||
|
||||
using uint = u32;
|
||||
using uint32 = u32;
|
||||
using ulong = u32;
|
||||
using UINT = u32;
|
||||
using UINT32 = u32;
|
||||
using ULONG = u32;
|
||||
using DWORD = u32;
|
||||
|
||||
using int64 = s64;
|
||||
using quad = s64;
|
||||
using QUAD = s64;
|
||||
using INT64 = s64;
|
||||
using __int64 = s64;
|
||||
|
||||
using uint64 = u64;
|
||||
using uquad = u64;
|
||||
using UQUAD = u64;
|
||||
using UINT64 = u64;
|
||||
using QWORD = u64;
|
||||
using __uint64 = u64;
|
||||
|
||||
// using float = float;
|
||||
using FLOAT = float;
|
||||
|
||||
// using double = double;
|
||||
using DOUBLE = double;
|
||||
|
||||
// }
|
||||
43
includes/type/types/c.pat
Normal file
43
includes/type/types/c.pat
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Alias definitions for all C stdint and regular data types
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
|
||||
using uint8_t = u8;
|
||||
using uint16_t = u16;
|
||||
using uint32_t = u32;
|
||||
using uint64_t = u64;
|
||||
using __uint64_t = u64;
|
||||
using uint128_t = u128;
|
||||
using __uint128_t = u128;
|
||||
|
||||
using int8_t = s8;
|
||||
using int16_t = s16;
|
||||
using int32_t = s32;
|
||||
using int64_t = s64;
|
||||
using __int64_t = s64;
|
||||
using int128_t = s128;
|
||||
using __int128_t = s128;
|
||||
|
||||
using size_t = u64;
|
||||
using ssize_t = s64;
|
||||
|
||||
using uintptr_t = u64;
|
||||
using intptr_t = s64;
|
||||
using ptrdiff_t = s64;
|
||||
|
||||
// using char = char;
|
||||
using wchar_t = char16;
|
||||
using char8_t = char;
|
||||
using char16_t = char16;
|
||||
using char32_t = u32;
|
||||
|
||||
using short = s16;
|
||||
using int = s32;
|
||||
using long = s32;
|
||||
|
||||
// }
|
||||
17
includes/type/types/linux.pat
Normal file
17
includes/type/types/linux.pat
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Various data types used in the Linux Kernel
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
|
||||
using le16 = le u16;
|
||||
using be16 = be u16;
|
||||
using le32 = le u32;
|
||||
using be32 = be u32;
|
||||
using le64 = le u64;
|
||||
using be64 = be u64;
|
||||
|
||||
// }
|
||||
28
includes/type/types/rust.pat
Normal file
28
includes/type/types/rust.pat
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Alias definitions for Rust's data types
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
|
||||
// using u8 = u8;
|
||||
// using u16 = u16;
|
||||
// using u32 = u32;
|
||||
// using u64 = u64;
|
||||
// using u128 = u128;
|
||||
|
||||
using i8 = s8;
|
||||
using i16 = s16;
|
||||
using i32 = s32;
|
||||
using i64 = s64;
|
||||
using i128 = s128;
|
||||
|
||||
using f32 = float;
|
||||
using f64 = double;
|
||||
|
||||
using usize = u64;
|
||||
using isize = i64;
|
||||
|
||||
// }
|
||||
57
includes/type/types/win32.pat
Normal file
57
includes/type/types/win32.pat
Normal file
@@ -0,0 +1,57 @@
|
||||
#pragma once
|
||||
|
||||
/*!
|
||||
Alias definitions for various type names used in Windows applications
|
||||
*/
|
||||
|
||||
// Explicitly don't add these types to the `type` namespace for usability
|
||||
// namespace type {
|
||||
|
||||
using BYTE = u8;
|
||||
using WORD = u16;
|
||||
using DWORD = u32;
|
||||
using QWORD = u64;
|
||||
using DWORDLONG = u64;
|
||||
using DWORD32 = u32;
|
||||
using DWORD64 = u64;
|
||||
|
||||
using INT = s32;
|
||||
using UINT = u32;
|
||||
using FLOAT = float;
|
||||
using SHORT = s16;
|
||||
using USHORT = u16;
|
||||
using BOOL = bool;
|
||||
using BOOLEAN = bool;
|
||||
|
||||
using INT8 = s8;
|
||||
using INT16 = s16;
|
||||
using INT32 = s32;
|
||||
using INT64 = s64;
|
||||
using UINT8 = u8;
|
||||
using UINT16 = u16;
|
||||
using UINT32 = u32;
|
||||
using UINT64 = u64;
|
||||
|
||||
using LONG = s32;
|
||||
using ULONG = u32;
|
||||
using LONG32 = s32;
|
||||
using ULONG32 = u32;
|
||||
using LONG64 = s64;
|
||||
using ULONG64 = u64;
|
||||
using LONGLONG = s64;
|
||||
using ULONGLONG = u64;
|
||||
|
||||
using SIZE_T = u64;
|
||||
using SSIZE_T = s64;
|
||||
|
||||
using UCHAR = u8;
|
||||
using CHAR = char;
|
||||
using CCHAR = char;
|
||||
|
||||
using ATOM = WORD;
|
||||
using PVOID = SIZE_T;
|
||||
using HANDLE = PVOID;
|
||||
using HINSTANCE = HANDLE;
|
||||
using HRESULT = LONG;
|
||||
|
||||
// }
|
||||
219
nodes/caesar.hexnode
Normal file
219
nodes/caesar.hexnode
Normal file
@@ -0,0 +1,219 @@
|
||||
{
|
||||
"attrs": [
|
||||
76,
|
||||
77,
|
||||
78
|
||||
],
|
||||
"data": {
|
||||
"nodes": {
|
||||
"links": {
|
||||
"31": {
|
||||
"from": 54,
|
||||
"id": 31,
|
||||
"to": 55
|
||||
},
|
||||
"33": {
|
||||
"from": 59,
|
||||
"id": 33,
|
||||
"to": 56
|
||||
},
|
||||
"34": {
|
||||
"from": 60,
|
||||
"id": 34,
|
||||
"to": 57
|
||||
},
|
||||
"40": {
|
||||
"from": 68,
|
||||
"id": 40,
|
||||
"to": 53
|
||||
},
|
||||
"41": {
|
||||
"from": 66,
|
||||
"id": 41,
|
||||
"to": 69
|
||||
},
|
||||
"42": {
|
||||
"from": 66,
|
||||
"id": 42,
|
||||
"to": 63
|
||||
},
|
||||
"43": {
|
||||
"from": 58,
|
||||
"id": 43,
|
||||
"to": 71
|
||||
},
|
||||
"44": {
|
||||
"from": 70,
|
||||
"id": 44,
|
||||
"to": 72
|
||||
},
|
||||
"45": {
|
||||
"from": 73,
|
||||
"id": 45,
|
||||
"to": 64
|
||||
},
|
||||
"46": {
|
||||
"from": 65,
|
||||
"id": 46,
|
||||
"to": 75
|
||||
}
|
||||
},
|
||||
"nodes": {
|
||||
"19": {
|
||||
"attrs": [
|
||||
66
|
||||
],
|
||||
"data": {
|
||||
"name": "Input",
|
||||
"type": 2
|
||||
},
|
||||
"id": 19,
|
||||
"name": "Input",
|
||||
"pos": {
|
||||
"x": 48.0,
|
||||
"y": 151.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.custom.input"
|
||||
},
|
||||
"20": {
|
||||
"attrs": [
|
||||
68
|
||||
],
|
||||
"data": {
|
||||
"name": "Count",
|
||||
"type": 0
|
||||
},
|
||||
"id": 20,
|
||||
"name": "Count",
|
||||
"pos": {
|
||||
"x": 50.0,
|
||||
"y": 264.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.custom.input"
|
||||
},
|
||||
"21": {
|
||||
"attrs": [
|
||||
53,
|
||||
54
|
||||
],
|
||||
"data": null,
|
||||
"id": 21,
|
||||
"name": "hex.builtin.nodes.casting.int_to_buffer.header",
|
||||
"pos": {
|
||||
"x": 212.0,
|
||||
"y": 315.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.casting.int_to_buffer"
|
||||
},
|
||||
"22": {
|
||||
"attrs": [
|
||||
55,
|
||||
56,
|
||||
57,
|
||||
58
|
||||
],
|
||||
"data": null,
|
||||
"id": 22,
|
||||
"name": "hex.builtin.nodes.buffer.slice.header",
|
||||
"pos": {
|
||||
"x": 384.0,
|
||||
"y": 375.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.buffer.slice"
|
||||
},
|
||||
"23": {
|
||||
"attrs": [
|
||||
59
|
||||
],
|
||||
"data": {
|
||||
"data": 0
|
||||
},
|
||||
"id": 23,
|
||||
"name": "hex.builtin.nodes.constants.int.header",
|
||||
"pos": {
|
||||
"x": 122.0,
|
||||
"y": 423.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.constants.int"
|
||||
},
|
||||
"24": {
|
||||
"attrs": [
|
||||
60
|
||||
],
|
||||
"data": {
|
||||
"data": 1
|
||||
},
|
||||
"id": 24,
|
||||
"name": "hex.builtin.nodes.constants.int.header",
|
||||
"pos": {
|
||||
"x": 120.0,
|
||||
"y": 510.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.constants.int"
|
||||
},
|
||||
"25": {
|
||||
"attrs": [
|
||||
63,
|
||||
64,
|
||||
65
|
||||
],
|
||||
"data": null,
|
||||
"id": 25,
|
||||
"name": "hex.builtin.nodes.bitwise.add.header",
|
||||
"pos": {
|
||||
"x": 720.0,
|
||||
"y": 183.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.bitwise.add"
|
||||
},
|
||||
"26": {
|
||||
"attrs": [
|
||||
69,
|
||||
70
|
||||
],
|
||||
"data": null,
|
||||
"id": 26,
|
||||
"name": "hex.builtin.nodes.buffer.size.header",
|
||||
"pos": {
|
||||
"x": 383.0,
|
||||
"y": 274.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.buffer.size"
|
||||
},
|
||||
"27": {
|
||||
"attrs": [
|
||||
71,
|
||||
72,
|
||||
73
|
||||
],
|
||||
"data": null,
|
||||
"id": 27,
|
||||
"name": "hex.builtin.nodes.buffer.repeat.header",
|
||||
"pos": {
|
||||
"x": 595.0,
|
||||
"y": 445.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.buffer.repeat"
|
||||
},
|
||||
"28": {
|
||||
"attrs": [
|
||||
75
|
||||
],
|
||||
"data": {
|
||||
"name": "Output",
|
||||
"type": 2
|
||||
},
|
||||
"id": 28,
|
||||
"name": "Output",
|
||||
"pos": {
|
||||
"x": 864.0,
|
||||
"y": 330.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.custom.output"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "Caesar Cipher",
|
||||
"type": "hex.builtin.nodes.custom.custom"
|
||||
}
|
||||
223
nodes/xor.hexnode
Normal file
223
nodes/xor.hexnode
Normal file
@@ -0,0 +1,223 @@
|
||||
{
|
||||
"attrs": [
|
||||
36,
|
||||
37,
|
||||
38
|
||||
],
|
||||
"data": {
|
||||
"nodes": {
|
||||
"links": {
|
||||
"11": {
|
||||
"from": 20,
|
||||
"id": 11,
|
||||
"to": 22
|
||||
},
|
||||
"13": {
|
||||
"from": 23,
|
||||
"id": 13,
|
||||
"to": 32
|
||||
},
|
||||
"14": {
|
||||
"from": 17,
|
||||
"id": 14,
|
||||
"to": 19
|
||||
},
|
||||
"15": {
|
||||
"from": 14,
|
||||
"id": 15,
|
||||
"to": 15
|
||||
},
|
||||
"16": {
|
||||
"from": 12,
|
||||
"id": 16,
|
||||
"to": 16
|
||||
},
|
||||
"17": {
|
||||
"from": 9,
|
||||
"id": 17,
|
||||
"to": 11
|
||||
},
|
||||
"18": {
|
||||
"from": 7,
|
||||
"id": 18,
|
||||
"to": 10
|
||||
},
|
||||
"19": {
|
||||
"from": 31,
|
||||
"id": 19,
|
||||
"to": 8
|
||||
},
|
||||
"20": {
|
||||
"from": 30,
|
||||
"id": 20,
|
||||
"to": 6
|
||||
},
|
||||
"22": {
|
||||
"from": 31,
|
||||
"id": 22,
|
||||
"to": 18
|
||||
},
|
||||
"23": {
|
||||
"from": 30,
|
||||
"id": 23,
|
||||
"to": 21
|
||||
}
|
||||
},
|
||||
"nodes": {
|
||||
"10": {
|
||||
"attrs": [
|
||||
14
|
||||
],
|
||||
"data": {
|
||||
"data": 1
|
||||
},
|
||||
"id": 10,
|
||||
"name": "hex.builtin.nodes.constants.int.header",
|
||||
"pos": {
|
||||
"x": 430.0,
|
||||
"y": 364.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.constants.int"
|
||||
},
|
||||
"11": {
|
||||
"attrs": [
|
||||
15,
|
||||
16,
|
||||
17
|
||||
],
|
||||
"data": null,
|
||||
"id": 11,
|
||||
"name": "hex.builtin.nodes.arithmetic.add.header",
|
||||
"pos": {
|
||||
"x": 579.0,
|
||||
"y": 421.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.arithmetic.add"
|
||||
},
|
||||
"12": {
|
||||
"attrs": [
|
||||
18,
|
||||
19,
|
||||
20
|
||||
],
|
||||
"data": null,
|
||||
"id": 12,
|
||||
"name": "hex.builtin.nodes.buffer.repeat.header",
|
||||
"pos": {
|
||||
"x": 661.0,
|
||||
"y": 241.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.buffer.repeat"
|
||||
},
|
||||
"13": {
|
||||
"attrs": [
|
||||
21,
|
||||
22,
|
||||
23
|
||||
],
|
||||
"data": null,
|
||||
"id": 13,
|
||||
"name": "hex.builtin.nodes.bitwise.xor.header",
|
||||
"pos": {
|
||||
"x": 818.0,
|
||||
"y": 163.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.bitwise.xor"
|
||||
},
|
||||
"14": {
|
||||
"attrs": [
|
||||
32
|
||||
],
|
||||
"data": {
|
||||
"name": "Output",
|
||||
"type": 2
|
||||
},
|
||||
"id": 14,
|
||||
"name": "Output",
|
||||
"pos": {
|
||||
"x": 1000.0,
|
||||
"y": 432.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.custom.output"
|
||||
},
|
||||
"4": {
|
||||
"attrs": [
|
||||
30
|
||||
],
|
||||
"data": {
|
||||
"name": "Input",
|
||||
"type": 2
|
||||
},
|
||||
"id": 4,
|
||||
"name": "Input",
|
||||
"pos": {
|
||||
"x": 82.0,
|
||||
"y": 139.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.custom.input"
|
||||
},
|
||||
"5": {
|
||||
"attrs": [
|
||||
31
|
||||
],
|
||||
"data": {
|
||||
"name": "XOR Pad",
|
||||
"type": 2
|
||||
},
|
||||
"id": 5,
|
||||
"name": "XOR Pad",
|
||||
"pos": {
|
||||
"x": 89.0,
|
||||
"y": 328.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.custom.input"
|
||||
},
|
||||
"6": {
|
||||
"attrs": [
|
||||
6,
|
||||
7
|
||||
],
|
||||
"data": null,
|
||||
"id": 6,
|
||||
"name": "hex.builtin.nodes.buffer.size.header",
|
||||
"pos": {
|
||||
"x": 269.0,
|
||||
"y": 403.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.buffer.size"
|
||||
},
|
||||
"7": {
|
||||
"attrs": [
|
||||
8,
|
||||
9
|
||||
],
|
||||
"data": null,
|
||||
"id": 7,
|
||||
"name": "hex.builtin.nodes.buffer.size.header",
|
||||
"pos": {
|
||||
"x": 267.0,
|
||||
"y": 486.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.buffer.size"
|
||||
},
|
||||
"8": {
|
||||
"attrs": [
|
||||
10,
|
||||
11,
|
||||
12
|
||||
],
|
||||
"data": null,
|
||||
"id": 8,
|
||||
"name": "hex.builtin.nodes.arithmetic.div.header",
|
||||
"pos": {
|
||||
"x": 409.0,
|
||||
"y": 465.0
|
||||
},
|
||||
"type": "hex.builtin.nodes.arithmetic.div"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "XOR Pad",
|
||||
"type": "hex.builtin.nodes.custom.custom"
|
||||
}
|
||||
99
patterns/7z.hexpat
Normal file
99
patterns/7z.hexpat
Normal file
@@ -0,0 +1,99 @@
|
||||
#include <std/io.pat>
|
||||
#include <std/mem.pat>
|
||||
#include <std/math.pat>
|
||||
|
||||
|
||||
enum Type:u8{
|
||||
startPosition = 0x00, // Start position
|
||||
sizeStartHeader = 0x20, // Size of start Header
|
||||
};
|
||||
|
||||
enum TypeB:u48{
|
||||
sevenZipSignature = 0x1C27AFBC7A37, // Defining 7z signature
|
||||
};
|
||||
|
||||
struct StartHeader {
|
||||
// File signature
|
||||
u48 signature [[color("FF0000")] ];
|
||||
// Version format
|
||||
u16 formatVersion [[color("00FF00")]];
|
||||
// CRC start header
|
||||
u32 crcOfTheFollowing20Bytes [[color("0000FF")]];
|
||||
// Relative offset of End Header
|
||||
u64 relativeOffsetEndHeader [[color("FFFF00")]];
|
||||
// Length of End Header
|
||||
u64 theLengthOfEndHeader [[color("00FFFF")]];
|
||||
// CRC of End Ender
|
||||
u32 crcOftheEndHeader [[color("FF00FF")]];
|
||||
// File size calculation
|
||||
u64 fileSize = relativeOffsetEndHeader + theLengthOfEndHeader + Type::sizeStartHeader;
|
||||
// Absolute offset calculation End Header
|
||||
u64 startEndHeader = relativeOffsetEndHeader + Type::sizeStartHeader;
|
||||
};
|
||||
|
||||
StartHeader startheader @ Type::startPosition;
|
||||
|
||||
struct CompressedData {
|
||||
// Start of compressed data
|
||||
u8 startOfCompressedData[4] [[color("C0C0C0")]];
|
||||
};
|
||||
|
||||
CompressedData compresseddata @ Type::sizeStartHeader;
|
||||
|
||||
|
||||
struct EndHeader {
|
||||
// Set padding to place End Header in right position
|
||||
padding[startheader.relativeOffsetEndHeader];
|
||||
// Mark link to meta block
|
||||
u8 linkToMetaBlock [[color("FF0000")]];
|
||||
// Mark all End Header
|
||||
char fullEndHeader[startheader.theLengthOfEndHeader] [[color("63954A")]];
|
||||
// Detect LZMA signature
|
||||
u64 lzmaSignaturePosition = std::mem::find_sequence_in_range(0, addressof(fullEndHeader), addressof(fullEndHeader) + sizeof(fullEndHeader), 0x23, 0x03, 0x01, 0x01, 0x05, 0x5D);
|
||||
|
||||
// Mark positions if LZMA signature was detected
|
||||
if(lzmaSignaturePosition != 0xFFFFFFFFFFFFFFFF){
|
||||
u48 lzmaSignature @ lzmaSignaturePosition [[color("0000FF")]];
|
||||
}
|
||||
};
|
||||
|
||||
EndHeader endheader @ Type::sizeStartHeader;
|
||||
|
||||
// Check 7z type
|
||||
if(startheader.signature == TypeB::sevenZipSignature){
|
||||
std::print("It is a 7z File Type");
|
||||
}else{
|
||||
std::print("The file is not 7z type");
|
||||
}
|
||||
|
||||
std::print("Format Version {} ",startheader.formatVersion);
|
||||
|
||||
// Version verification
|
||||
if(startheader.formatVersion == 0x0400){
|
||||
std::print("Major Version 0x00 || 0 - Minor Version 0x04 || 4");
|
||||
}
|
||||
|
||||
// Verification of the compressed method is LZMA, Bzip2 or LZMA2
|
||||
if(compresseddata.startOfCompressedData[0] == Type::startPosition){
|
||||
std::print("Compressed Method LZMA");
|
||||
}else if(compresseddata.startOfCompressedData[0] == 0x42){
|
||||
std::print("Compressed Method Bzip2");
|
||||
}else{
|
||||
std::print("Compressed Method LZMA2");
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::print("CRC Start Header 0x{:X}",startheader.crcOfTheFollowing20Bytes);
|
||||
|
||||
std::print("CRC End Header 0x{:X} ", startheader.crcOftheEndHeader);
|
||||
|
||||
std::print("CompressedData length 0x{:X} || {} bytes ",startheader.relativeOffsetEndHeader, startheader.relativeOffsetEndHeader);
|
||||
|
||||
std::print("Relative Offset of End Header 0x{:X} || {} bytes",startheader.relativeOffsetEndHeader, startheader.relativeOffsetEndHeader);
|
||||
|
||||
std::print("Offset to start End Header 0x{:X} || {} bytes",startheader.startEndHeader,startheader.startEndHeader);
|
||||
|
||||
std::print("End Header length 0x{:X} || {} bytes",startheader.theLengthOfEndHeader,startheader.theLengthOfEndHeader);
|
||||
|
||||
std::print("File size 0x{:X} || {} bytes",startheader.fileSize, startheader.fileSize);
|
||||
73
patterns/Crashlvl.hexpat
Normal file
73
patterns/Crashlvl.hexpat
Normal file
@@ -0,0 +1,73 @@
|
||||
#include <type/magic.pat>
|
||||
#include <std/string.pat>
|
||||
#include <std/array.pat>
|
||||
|
||||
// Crash Bandicoot - Back in Time (fan game) user created tapes
|
||||
// author AdventureT
|
||||
|
||||
struct Header {
|
||||
type::Magic<"CRASHLVL"> magic;
|
||||
u8 version;
|
||||
std::string::SizedString<u8> levelName;
|
||||
std::string::SizedString<u8> author;
|
||||
};
|
||||
|
||||
enum Music : u32 {
|
||||
None,
|
||||
BonusBGM,
|
||||
CrashCreatorBGM,
|
||||
MainMenuBGM,
|
||||
WarpRoomBGM,
|
||||
Level01BGM,
|
||||
Level02BGM,
|
||||
Level03BGM,
|
||||
Level04BGM,
|
||||
Level05BGM,
|
||||
SewerBGM,
|
||||
EgyptBGM,
|
||||
NBrioBGM
|
||||
};
|
||||
|
||||
enum Type : u32 {
|
||||
Unset,
|
||||
Flashback,
|
||||
Trial
|
||||
};
|
||||
|
||||
enum Time : u32 {
|
||||
Night,
|
||||
Day,
|
||||
Storm,
|
||||
Dawn
|
||||
};
|
||||
|
||||
enum Terrain : u32 {
|
||||
None,
|
||||
Machines,
|
||||
Trees,
|
||||
Waterfall,
|
||||
Snow,
|
||||
Fortress,
|
||||
};
|
||||
|
||||
struct Options {
|
||||
Type type;
|
||||
Time time;
|
||||
Terrain terrain;
|
||||
Music music;
|
||||
};
|
||||
|
||||
struct Object {
|
||||
std::string::SizedString<u8> objName;
|
||||
u32 x;
|
||||
u32 y;
|
||||
};
|
||||
|
||||
struct Objects{
|
||||
u32 objCount;
|
||||
std::Array<Object, objCount> objArray;
|
||||
};
|
||||
|
||||
Header header @ 0x0;
|
||||
Options options @ $;
|
||||
Objects objects @ $;
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma endian little
|
||||
|
||||
#include <std/io.pat>
|
||||
#include <std/sys.pat>
|
||||
|
||||
#define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC "AFE2"
|
||||
#define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC_1 "AFE1"
|
||||
@@ -54,4 +55,4 @@ std::assert_warn(ctx.magic == ATMOSPHERE_REBOOT_TO_FATAL_MAGIC,
|
||||
|
||||
|
||||
std::print("Error Description: 0x{:04X}", ctx.error_desc);
|
||||
std::print("Program ID: {:016X}", ctx.program_id);
|
||||
std::print("Program ID: {:016X}", ctx.program_id);
|
||||
|
||||
@@ -17,9 +17,9 @@ struct ARFile {
|
||||
u8 data[std::string::parse_int(this.file_size, 10)];
|
||||
padding[sizeof(data) & 1];
|
||||
}
|
||||
} [[static]];
|
||||
};
|
||||
|
||||
char signature[8] @ 0x00;
|
||||
std::assert(signature == "!<arch>\n", "File is not a valid archive!");
|
||||
|
||||
ARFile files[while($ < std::mem::size())] @ $;
|
||||
ARFile files[while($ < std::mem::size())] @ $;
|
||||
|
||||
73
patterns/bencode.hexpat
Normal file
73
patterns/bencode.hexpat
Normal file
@@ -0,0 +1,73 @@
|
||||
#pragma MIME application/x-bittorrent
|
||||
|
||||
#include <std/ctype.pat>
|
||||
#include <std/mem.pat>
|
||||
#include <std/string.pat>
|
||||
|
||||
namespace bencode {
|
||||
|
||||
struct ASCIIDecimal {
|
||||
char value[while(std::ctype::isdigit(std::mem::read_unsigned($, 1)))];
|
||||
} [[sealed, format("bencode::format_ascii_decimal"), transform("bencode::format_ascii_decimal")]];
|
||||
|
||||
fn format_ascii_decimal(ASCIIDecimal adsasd) {
|
||||
return std::string::parse_int(adsasd.value, 10);
|
||||
};
|
||||
|
||||
enum Type : u8 {
|
||||
Integer = 'i',
|
||||
Dictionary = 'd',
|
||||
List = 'l',
|
||||
|
||||
String0 = '0',
|
||||
String1 = '1',
|
||||
String2 = '2',
|
||||
String3 = '3',
|
||||
String4 = '4',
|
||||
String5 = '5',
|
||||
String6 = '6',
|
||||
String7 = '7',
|
||||
String8 = '8',
|
||||
String9 = '9'
|
||||
};
|
||||
|
||||
struct String {
|
||||
ASCIIDecimal length;
|
||||
char separator [[hidden]];
|
||||
char value[length];
|
||||
} [[sealed, format("bencode::format_string"), transform("bencode::format_string")]];
|
||||
|
||||
fn format_string(String string) {
|
||||
return string.value;
|
||||
};
|
||||
|
||||
using Bencode;
|
||||
using Value;
|
||||
|
||||
struct DictionaryEntry {
|
||||
String key;
|
||||
Value value;
|
||||
};
|
||||
|
||||
struct Value {
|
||||
Type type;
|
||||
|
||||
if (type == Type::Dictionary) {
|
||||
DictionaryEntry entry[while(std::mem::read_unsigned($, 1) != 'e')];
|
||||
} else if (type == Type::Integer) {
|
||||
ASCIIDecimal value;
|
||||
char end;
|
||||
} else {
|
||||
$ -= 1;
|
||||
String value;
|
||||
}
|
||||
};
|
||||
|
||||
struct Bencode {
|
||||
Value value[while(!std::mem::eof())] [[inline]];
|
||||
char end;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
bencode::Bencode bencode @ 0x00;
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma MIME image/bmp
|
||||
#pragma endian little
|
||||
#include <std/mem.pat>
|
||||
|
||||
struct BitmapFileHeader {
|
||||
u8 bfType[2];
|
||||
@@ -31,6 +32,7 @@ struct Colors {
|
||||
};
|
||||
|
||||
struct Bitmap {
|
||||
u8 data[std::mem::size()] [[no_unique_address, hidden]];
|
||||
BitmapFileHeader bmfh;
|
||||
BitmapInfoHeader bmih;
|
||||
|
||||
@@ -46,6 +48,6 @@ struct Bitmap {
|
||||
u8 lineData[bmih.biSizeImage];
|
||||
else
|
||||
u8 lineData[bmfh.bfSize - $];
|
||||
};
|
||||
} [[hex::visualize("image", this.data)]];
|
||||
|
||||
Bitmap bitmap @ 0x00;
|
||||
|
||||
128
patterns/bson.hexpat
Normal file
128
patterns/bson.hexpat
Normal file
@@ -0,0 +1,128 @@
|
||||
#pragma MIME application/bson
|
||||
|
||||
#include <type/time.pat>
|
||||
|
||||
enum Type : u8 {
|
||||
Double = 0x01,
|
||||
String = 0x02,
|
||||
EmbeddedDocument = 0x03,
|
||||
Array = 0x04,
|
||||
Binary = 0x05,
|
||||
Undefined = 0x06,
|
||||
ObjectId = 0x07,
|
||||
Boolean = 0x08,
|
||||
UTCDatetime = 0x09,
|
||||
Null = 0x0A,
|
||||
Regex = 0x0B,
|
||||
DBPointer = 0x0C,
|
||||
JavaScript = 0x0D,
|
||||
Symbol = 0x0E,
|
||||
JavaScriptWithScope = 0x0F,
|
||||
Int32 = 0x10,
|
||||
Timestamp = 0x11,
|
||||
Int64 = 0x12,
|
||||
Decimal128 = 0x13,
|
||||
|
||||
MinKey = 0xFF,
|
||||
MaxKey = 0x7F
|
||||
};
|
||||
|
||||
enum Subtype : u8 {
|
||||
GenericBinarySubtype = 0x00,
|
||||
Function = 0x01,
|
||||
BinaryOld = 0x02,
|
||||
UUIDOld = 0x03,
|
||||
UUID = 0x04,
|
||||
MD5 = 0x05,
|
||||
EncryptedBSONValue = 0x06,
|
||||
CompressedBSONColumn = 0x07,
|
||||
UserDefined = 0x80
|
||||
};
|
||||
|
||||
struct Binary {
|
||||
s32 length;
|
||||
Subtype subtype;
|
||||
u8 data[length];
|
||||
};
|
||||
|
||||
struct String {
|
||||
u32 length [[hidden]];
|
||||
char value[length];
|
||||
} [[sealed, format("format_string")]];
|
||||
|
||||
struct CString {
|
||||
char value[];
|
||||
} [[sealed, format("format_string")]];
|
||||
|
||||
fn format_string(auto string) {
|
||||
return string.value;
|
||||
};
|
||||
|
||||
struct ObjectId {
|
||||
type::time32_t timestamp;
|
||||
u8 randomValue[5];
|
||||
u24 counter;
|
||||
};
|
||||
|
||||
struct DBPointer {
|
||||
String name;
|
||||
ObjectId value;
|
||||
};
|
||||
|
||||
|
||||
using Document;
|
||||
|
||||
struct Element {
|
||||
Type type;
|
||||
|
||||
CString name;
|
||||
|
||||
if (type == Type::Double) {
|
||||
double value;
|
||||
} else if (type == Type::String) {
|
||||
String value;
|
||||
} else if (type == Type::EmbeddedDocument) {
|
||||
Document value;
|
||||
} else if (type == Type::Array) {
|
||||
Document value;
|
||||
} else if (type == Type::Binary) {
|
||||
Binary value;
|
||||
} else if (type == Type::Undefined) {
|
||||
/* undefined */
|
||||
} else if (type == Type::ObjectId) {
|
||||
ObjectId value;
|
||||
} else if (type == Type::Boolean) {
|
||||
bool value;
|
||||
} else if (type == Type::UTCDatetime) {
|
||||
type::time64_t value;
|
||||
} else if (type == Type::Null) {
|
||||
/* null */
|
||||
} else if (type == Type::Regex) {
|
||||
CString regexPattern;
|
||||
CString regexOptions;
|
||||
} else if (type == Type::DBPointer) {
|
||||
DBPointer value;
|
||||
} else if (type == Type::JavaScript) {
|
||||
String value;
|
||||
} else if (type == Type::Symbol) {
|
||||
String value;
|
||||
} else if (type == Type::JavaScriptWithScope) {
|
||||
String value;
|
||||
} else if (type == Type::Int32) {
|
||||
s32 value;
|
||||
} else if (type == Type::Timestamp) {
|
||||
u64 value;
|
||||
} else if (type == Type::Int64) {
|
||||
s64 value;
|
||||
} else if (type == Type::Decimal128) {
|
||||
u128 value;
|
||||
}
|
||||
};
|
||||
|
||||
struct Document {
|
||||
s32 listLength;
|
||||
Element elements[while($ < ((addressof(this) + listLength) - 1))];
|
||||
padding[1];
|
||||
};
|
||||
|
||||
Document document @ 0x00;
|
||||
208
patterns/bsp_goldsrc.hexpat
Normal file
208
patterns/bsp_goldsrc.hexpat
Normal file
@@ -0,0 +1,208 @@
|
||||
#include <std/ptr.pat>
|
||||
#include <std/mem.pat>
|
||||
#include <std/sys.pat>
|
||||
|
||||
#pragma endian little
|
||||
|
||||
#define HEADER_LUMPS 15
|
||||
#define MAX_MAP_HULLS 4
|
||||
#define NUM_AMBIENTS 4
|
||||
#define MAXLIGHTMAPS 4
|
||||
|
||||
enum LumpIndex : u32 {
|
||||
Entities,
|
||||
Planes,
|
||||
Textures,
|
||||
Vertexes,
|
||||
Visibility,
|
||||
Nodes,
|
||||
Texinfo,
|
||||
Faces,
|
||||
Lighting,
|
||||
Clipnodes,
|
||||
Leafs,
|
||||
Marksurfaces,
|
||||
Edges,
|
||||
Surfedges,
|
||||
Models,
|
||||
};
|
||||
|
||||
struct vec3f
|
||||
{
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
struct dlump_t
|
||||
{
|
||||
s32 fileofs;
|
||||
s32 filelen;
|
||||
};
|
||||
|
||||
struct dheader_t
|
||||
{
|
||||
s32 version;
|
||||
dlump_t lumps[HEADER_LUMPS];
|
||||
std::assert(version == 30, "This version of BSP format is unsupported.");
|
||||
};
|
||||
|
||||
struct dmodel_t
|
||||
{
|
||||
vec3f mins;
|
||||
vec3f maxs;
|
||||
vec3f origin; // for sounds or lights
|
||||
s32 headnode[MAX_MAP_HULLS];
|
||||
s32 visleafs; // not including the solid leaf 0
|
||||
s32 firstface;
|
||||
s32 numfaces;
|
||||
};
|
||||
|
||||
struct dplane_t
|
||||
{
|
||||
vec3f normal;
|
||||
float dist;
|
||||
s32 type;
|
||||
};
|
||||
|
||||
struct dtexinfo_t
|
||||
{
|
||||
float vecs[8]; // texmatrix [s/t][xyz offset]
|
||||
s32 miptex;
|
||||
s16 flags;
|
||||
s16 faceinfo; // -1 no face info otherwise dfaceinfo_t
|
||||
};
|
||||
|
||||
struct dleaf_t
|
||||
{
|
||||
s32 contents;
|
||||
s32 visofs; // -1 = no visibility info
|
||||
s16 mins[3];
|
||||
s16 maxs[3];
|
||||
u16 firstmarksurface;
|
||||
u16 nummarksurfaces;
|
||||
u8 ambient_level[NUM_AMBIENTS];
|
||||
};
|
||||
|
||||
struct dnode_t
|
||||
{
|
||||
s32 planenum;
|
||||
s16 children[2]; // negative numbers are -(leafs + 1), not nodes
|
||||
s16 mins[3];
|
||||
s16 maxs[3];
|
||||
u16 firstface;
|
||||
u16 numfaces; // counting both sides
|
||||
};
|
||||
|
||||
struct dface_t
|
||||
{
|
||||
u16 planenum;
|
||||
s16 side;
|
||||
s32 firstedge;
|
||||
s16 numedges;
|
||||
s16 texinfo;
|
||||
u8 styles[MAXLIGHTMAPS];
|
||||
s32 lightofs; // start of [numstyles*surfsize] samples
|
||||
};
|
||||
|
||||
struct dedge_t
|
||||
{
|
||||
u16 v[2]; // indices of vertexes
|
||||
};
|
||||
|
||||
struct dclipnode_t
|
||||
{
|
||||
s32 planenum;
|
||||
s16 children[2];
|
||||
};
|
||||
|
||||
using dmarkface_t = u16;
|
||||
using dsurfedge_t = s32;
|
||||
using dvertex_t = vec3f;
|
||||
|
||||
fn get_miptex_pixeldata_size(auto width, auto height, auto offset) {
|
||||
if (offset != 0) {
|
||||
return std::mem::align_to(4, width * height * 85 / 64 + sizeof(u16) + 768);
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
struct miptex_t
|
||||
{
|
||||
char name[16];
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 offsets[4]; // four mip maps stored
|
||||
u8 pixeldata[get_miptex_pixeldata_size(width, height, offsets[0])];
|
||||
};
|
||||
|
||||
dheader_t file_header @ 0x00;
|
||||
|
||||
fn get_lump_element_count(auto index, auto elem_size) {
|
||||
return file_header.lumps[index].filelen / elem_size;
|
||||
};
|
||||
|
||||
fn get_lump_address(auto index) {
|
||||
return file_header.lumps[index].fileofs;
|
||||
};
|
||||
|
||||
fn get_miptex_ptr_base(auto offset) {
|
||||
return file_header.lumps[LumpIndex::Textures].fileofs;
|
||||
};
|
||||
|
||||
struct MiptexPointer
|
||||
{
|
||||
miptex_t *data: u32 [[pointer_base("get_miptex_ptr_base"), inline]];
|
||||
};
|
||||
|
||||
struct dmiptexlump_t
|
||||
{
|
||||
s32 nummiptex;
|
||||
MiptexPointer dataofs[nummiptex];
|
||||
};
|
||||
|
||||
struct VisibilityData
|
||||
{
|
||||
u8 data[file_header.lumps[LumpIndex::Visibility].filelen];
|
||||
u8 pad[std::mem::align_to(4, sizeof(this)) - sizeof(this)];
|
||||
};
|
||||
|
||||
struct LightmapData
|
||||
{
|
||||
u8 data[file_header.lumps[LumpIndex::Lighting].filelen];
|
||||
u8 pad[std::mem::align_to(4, sizeof(this)) - sizeof(this)];
|
||||
};
|
||||
|
||||
struct EntityData
|
||||
{
|
||||
char text[];
|
||||
u8 pad[std::mem::align_to(4, sizeof(this)) - sizeof(this)];
|
||||
};
|
||||
|
||||
s32 models_count = get_lump_element_count(LumpIndex::Models, sizeof(dmodel_t));
|
||||
s32 vertexes_count = get_lump_element_count(LumpIndex::Vertexes, sizeof(vec3f));
|
||||
s32 planes_count = get_lump_element_count(LumpIndex::Planes, sizeof(dplane_t));
|
||||
s32 leafs_count = get_lump_element_count(LumpIndex::Leafs, sizeof(dleaf_t));
|
||||
s32 nodes_count = get_lump_element_count(LumpIndex::Nodes, sizeof(dnode_t));
|
||||
s32 faces_count = get_lump_element_count(LumpIndex::Faces, sizeof(dface_t));
|
||||
s32 markfaces_count = get_lump_element_count(LumpIndex::Marksurfaces, sizeof(dmarkface_t));
|
||||
s32 surfedges_count = get_lump_element_count(LumpIndex::Surfedges, sizeof(dsurfedge_t));
|
||||
s32 edges_count = get_lump_element_count(LumpIndex::Edges, sizeof(dedge_t));
|
||||
s32 clipnodes_count = get_lump_element_count(LumpIndex::Clipnodes, sizeof(dclipnode_t));
|
||||
s32 texinfo_count = get_lump_element_count(LumpIndex::Texinfo, sizeof(dtexinfo_t));
|
||||
|
||||
dmodel_t models_lump[models_count] @ get_lump_address(LumpIndex::Models);
|
||||
dvertex_t vertexes_lump[vertexes_count] @ get_lump_address(LumpIndex::Vertexes);
|
||||
dplane_t planes_lump[planes_count] @ get_lump_address(LumpIndex::Planes);
|
||||
dleaf_t leafs_lump[leafs_count] @ get_lump_address(LumpIndex::Leafs);
|
||||
dnode_t nodes_lump[nodes_count] @ get_lump_address(LumpIndex::Nodes);
|
||||
dface_t faces_lump[faces_count] @ get_lump_address(LumpIndex::Faces);
|
||||
dmarkface_t markfaces_lump[markfaces_count] @ get_lump_address(LumpIndex::Marksurfaces);
|
||||
dsurfedge_t surfedges_lump[surfedges_count] @ get_lump_address(LumpIndex::Surfedges);
|
||||
dedge_t edges_lump[edges_count] @ get_lump_address(LumpIndex::Edges);
|
||||
dclipnode_t clipnodes_lump[clipnodes_count] @ get_lump_address(LumpIndex::Clipnodes);
|
||||
dtexinfo_t texinfo_lump[texinfo_count] @ get_lump_address(LumpIndex::Texinfo);
|
||||
dmiptexlump_t textures_lump @ get_lump_address(LumpIndex::Textures);
|
||||
VisibilityData visdata_lump @ get_lump_address(LumpIndex::Visibility);
|
||||
LightmapData lightdata_lump @ get_lump_address(LumpIndex::Lighting);
|
||||
EntityData entdata_lump @ get_lump_address(LumpIndex::Entities);
|
||||
30
patterns/cchva.hexpat
Normal file
30
patterns/cchva.hexpat
Normal file
@@ -0,0 +1,30 @@
|
||||
// Command and conquer voxel animation format
|
||||
|
||||
struct vec4_s {
|
||||
float x [[color("FF0000")]];
|
||||
float y [[color("00FF00")]];
|
||||
float z [[color("0000FF")]];
|
||||
float w [[color("FFFF00")]];
|
||||
};
|
||||
|
||||
struct mat3x4_s {
|
||||
vec4_s row[3];
|
||||
};
|
||||
|
||||
struct name_s {
|
||||
char buffer[16] [[color("EECCCC")]];
|
||||
};
|
||||
|
||||
struct hva_s {
|
||||
name_s name;
|
||||
u32 numFrames;
|
||||
u32 numNodes;
|
||||
name_s nodeNames[numNodes];
|
||||
};
|
||||
|
||||
struct frame_s {
|
||||
mat3x4_s mat[hva.numNodes];
|
||||
};
|
||||
|
||||
hva_s hva @0x00;
|
||||
frame_s frames[hva.numFrames] @sizeof(hva);
|
||||
13
patterns/ccpal.hexpat
Normal file
13
patterns/ccpal.hexpat
Normal file
@@ -0,0 +1,13 @@
|
||||
// Command and conquer palette format
|
||||
|
||||
struct Color {
|
||||
u8 r;
|
||||
u8 g;
|
||||
u8 b;
|
||||
};
|
||||
|
||||
struct Palette {
|
||||
Color colors[256];
|
||||
};
|
||||
|
||||
Palette pal @0x00;
|
||||
69
patterns/ccvxl.hexpat
Normal file
69
patterns/ccvxl.hexpat
Normal file
@@ -0,0 +1,69 @@
|
||||
// Command and Conquer voxel model format
|
||||
|
||||
struct vec4_s {
|
||||
float x [[color("FF0000")]];
|
||||
float y [[color("00FF00")]];
|
||||
float z [[color("0000FF")]];
|
||||
float w [[color("FFFF00")]];
|
||||
};
|
||||
|
||||
struct vec3_s {
|
||||
float x [[color("FF0000")]];
|
||||
float y [[color("00FF00")]];
|
||||
float z [[color("0000FF")]];
|
||||
};
|
||||
|
||||
struct mat3x4_s {
|
||||
vec4_s row[3];
|
||||
};
|
||||
|
||||
struct name_s {
|
||||
char buffer[16] [[color("EECCCC")]];
|
||||
};
|
||||
|
||||
struct color_s {
|
||||
u8 r;
|
||||
u8 g;
|
||||
u8 b;
|
||||
};
|
||||
|
||||
struct vxl_limb_header_s {
|
||||
name_s name;
|
||||
s32 limb_number;
|
||||
u32 _reserved1;
|
||||
u32 _reserved2;
|
||||
};
|
||||
|
||||
struct vxl_limb_tailer_s {
|
||||
u32 span_start_offset;
|
||||
u32 span_end_offset;
|
||||
u32 span_data_offset;
|
||||
float scale;
|
||||
mat3x4_s matrix;
|
||||
vec3_s min_bounds;
|
||||
vec3_s max_bounds;
|
||||
u8 xsize;
|
||||
u8 ysize;
|
||||
u8 zsize;
|
||||
u8 normal_type;
|
||||
};
|
||||
|
||||
struct vxl_s {
|
||||
name_s name;
|
||||
u32 palette_count;
|
||||
u32 limb_count;
|
||||
u32 tailer_count;
|
||||
u32 body_size;
|
||||
u8 remap_start_index;
|
||||
u8 remap_end_index;
|
||||
color_s internal_palette[256];
|
||||
vxl_limb_header_s _headers[limb_count];
|
||||
u8 body[body_size];
|
||||
vxl_limb_tailer_s _tailers[limb_count];
|
||||
};
|
||||
|
||||
struct frame_s {
|
||||
mat3x4_s mat[hva.numNodes];
|
||||
};
|
||||
|
||||
vxl_s vxl @0x00;
|
||||
29
patterns/cda.hexpat
Normal file
29
patterns/cda.hexpat
Normal file
@@ -0,0 +1,29 @@
|
||||
struct Header {
|
||||
u32 RIFF;
|
||||
s32 size;
|
||||
u32 CDDA;
|
||||
u32 fmt;
|
||||
u32 lenghtofthechunck;
|
||||
u16 versionofcdformat;
|
||||
u16 numberofrange;
|
||||
u32 identifier;
|
||||
};
|
||||
|
||||
|
||||
struct DataInfo {
|
||||
|
||||
u32 range;
|
||||
u32 duration;
|
||||
u8 rangepositionframes;
|
||||
u8 rangepositionseconds;
|
||||
u8 rangepositionminutes;
|
||||
u8 nullbyte;
|
||||
u8 durationtrackframes;
|
||||
u8 durationtrackseconds;
|
||||
u8 durationtrackminutes;
|
||||
u8 nullbytee;
|
||||
};
|
||||
|
||||
|
||||
Header header @ 0;
|
||||
DataInfo data @ 0x1C;
|
||||
395
patterns/chm.hexpat
Normal file
395
patterns/chm.hexpat
Normal file
@@ -0,0 +1,395 @@
|
||||
#include <type/magic.pat>
|
||||
#include <type/size.pat>
|
||||
#include <type/guid.pat>
|
||||
#include <type/leb128.pat>
|
||||
#include <std/sys.pat>
|
||||
|
||||
enum WindowsLanguageId : u32 {
|
||||
Arabic_SaudiArabia = 0x401,
|
||||
Arabic_Iraq = 0x801,
|
||||
Arabic_Egypt = 0xc01,
|
||||
Arabic_Libya = 0x1001,
|
||||
Arabic_Algeria = 0x1401,
|
||||
Arabic_Morocco = 0x1801,
|
||||
Arabic_Tunisia = 0x1c01,
|
||||
Arabic_Oman = 0x2001,
|
||||
Arabic_Yemen = 0x2401,
|
||||
Arabic_Syria = 0x2801,
|
||||
Arabic_Jordan = 0x2c01,
|
||||
Arabic_Lebanon = 0x3001,
|
||||
Arabic_Kuwait = 0x3401,
|
||||
Arabic_UAE = 0x3801,
|
||||
Arabic_Bahrain = 0x3c01,
|
||||
Arabic_Qatar = 0x4001,
|
||||
Bulgarian = 0x402,
|
||||
Catalan = 0x403,
|
||||
Valencian = 0x803,
|
||||
Chinese_Taiwan = 0x404,
|
||||
Chinese_PRC = 0x804,
|
||||
Chinese_HongKongSAR = 0xc04,
|
||||
Chinese_Singapore = 0x1004,
|
||||
Chinese_MacaoSAR = 0x1404,
|
||||
Czech = 0x405,
|
||||
Danish = 0x406,
|
||||
German_Germany = 0x407,
|
||||
German_Switzerland = 0x807,
|
||||
German_Austria = 0xc07,
|
||||
German_Luxembourg = 0x1007,
|
||||
German_Liechtenstein = 0x1407,
|
||||
Greek = 0x408,
|
||||
English_UnitedStates = 0x409,
|
||||
English_UnitedKingdom = 0x809,
|
||||
English_Australia = 0xc09,
|
||||
English_Canada = 0x1009,
|
||||
English_NewZealand = 0x1409,
|
||||
English_Ireland = 0x1809,
|
||||
English_SouthAfrica = 0x1c09,
|
||||
English_Jamaica = 0x2009,
|
||||
English_Caribbean = 0x2409,
|
||||
English_Belize = 0x2809,
|
||||
English_TrinidadandTobago = 0x2c09,
|
||||
English_Zimbabwe = 0x3009,
|
||||
English_Philippines = 0x3409,
|
||||
English_Indonesia = 0x3809,
|
||||
English_HongKongSAR = 0x3c09,
|
||||
English_India = 0x4009,
|
||||
English_Malaysia = 0x4409,
|
||||
English_Singapore = 0x4809,
|
||||
Spanish_SpainTraditionalSort = 0x40a,
|
||||
Spanish_Mexico = 0x80a,
|
||||
Spanish_Spain = 0xc0a,
|
||||
Spanish_Guatemala = 0x100a,
|
||||
Spanish_CostaRica = 0x140a,
|
||||
Spanish_Panama = 0x180a,
|
||||
Spanish_DominicanRepublic = 0x1c0a,
|
||||
Spanish_Venezuela = 0x200a,
|
||||
Spanish_Colombia = 0x240a,
|
||||
Spanish_Peru = 0x280a,
|
||||
Spanish_Argentina = 0x2c0a,
|
||||
Spanish_Ecuador = 0x300a,
|
||||
Spanish_Chile = 0x340a,
|
||||
Spanish_Uruguay = 0x380a,
|
||||
Spanish_Paraguay = 0x3c0a,
|
||||
Spanish_Bolivia = 0x400a,
|
||||
Spanish_ElSalvador = 0x440a,
|
||||
Spanish_Honduras = 0x480a,
|
||||
Spanish_Nicaragua = 0x4c0a,
|
||||
Spanish_PuertoRico = 0x500a,
|
||||
Spanish_UnitedStates = 0x540a,
|
||||
Spanish_LatinAmerica = 0x580a,
|
||||
Finnish = 0x40b,
|
||||
French_France = 0x40c,
|
||||
French_Belgium = 0x80c,
|
||||
French_Canada = 0xc0c,
|
||||
French_Switzerland = 0x100c,
|
||||
French_Luxembourg = 0x140c,
|
||||
French_Monaco = 0x180c,
|
||||
French_Caribbean = 0x1c0c,
|
||||
French_Reunion = 0x200c,
|
||||
French_CongoDRC = 0x240c,
|
||||
French_Senegal = 0x280c,
|
||||
French_Cameroon = 0x2c0c,
|
||||
French_CoteDIvoire = 0x300c,
|
||||
French_Mali = 0x340c,
|
||||
French_Morocco = 0x380c,
|
||||
French_Haiti = 0x3c0c,
|
||||
Hebrew = 0x40d,
|
||||
Hungarian = 0x40e,
|
||||
Icelandic = 0x40f,
|
||||
Italian_Italy = 0x410,
|
||||
Italian_Switzerland = 0x810,
|
||||
Japanese = 0x411,
|
||||
Korean = 0x412,
|
||||
Dutch_Netherlands = 0x413,
|
||||
Dutch_Belgium = 0x813,
|
||||
Norwegian_Bokmal = 0x414,
|
||||
Norwegian_Nynorsk = 0x814,
|
||||
Polish = 0x415,
|
||||
Portuguese_Brazil = 0x416,
|
||||
Portuguese_Portugal = 0x816,
|
||||
Romansh = 0x417,
|
||||
Romanian = 0x418,
|
||||
Romanian_Moldova = 0x818,
|
||||
Russian = 0x419,
|
||||
Russian_Moldova = 0x819,
|
||||
Croatian_Croatia = 0x41a,
|
||||
Serbian_LatinSerbiaandMontenegroFormer = 0x81a,
|
||||
Serbian_CyrillicSerbiaAndMontenegroFormer = 0xc1a,
|
||||
Croatian_BosniaAndHerzegovina = 0x101a,
|
||||
Bosnian_Latin = 0x141a,
|
||||
Serbian_LatinBosniaAndHerzegovina = 0x181a,
|
||||
Serbian_CyrillicBosniaAndHerzegovina = 0x1c1a,
|
||||
Bosnian_Cyrillic = 0x201a,
|
||||
Serbian_LatinSerbia = 0x241a,
|
||||
Serbian_CyrillicSerbia = 0x281a,
|
||||
Serbian_LatinMontenegro = 0x2c1a,
|
||||
Serbian_CyrillicMontenegro = 0x301a,
|
||||
Slovak = 0x41b,
|
||||
Albanian = 0x41c,
|
||||
Swedish_Sweden = 0x41d,
|
||||
Swedish_Finland = 0x81d,
|
||||
Thai = 0x41e,
|
||||
Turkish = 0x41f,
|
||||
Urdu_Pakistan = 0x420,
|
||||
Urdu_India = 0x820,
|
||||
Indonesian = 0x421,
|
||||
Ukrainian = 0x422,
|
||||
Belarusian = 0x423,
|
||||
Slovenian = 0x424,
|
||||
Estonian = 0x425,
|
||||
Latvian = 0x426,
|
||||
Lithuanian = 0x427,
|
||||
Tajik = 0x428,
|
||||
Persian = 0x429,
|
||||
Vietnamese = 0x42a,
|
||||
Armenian = 0x42b,
|
||||
Azerbaijani_Latin = 0x42c,
|
||||
Azerbaijani_Cyrillic = 0x82c,
|
||||
Basque = 0x42d,
|
||||
UpperSorbian = 0x42e,
|
||||
LowerSorbian = 0x82e,
|
||||
Macedonian = 0x42f,
|
||||
Sesotho_SouthAfrica = 0x430,
|
||||
Xitsonga = 0x431,
|
||||
Setswana_SouthAfrica = 0x432,
|
||||
Setswana_Botswana = 0x832,
|
||||
Venda = 0x433,
|
||||
isiXhosa = 0x434,
|
||||
isiZulu = 0x435,
|
||||
Afrikaans = 0x436,
|
||||
Georgian = 0x437,
|
||||
Faroese = 0x438,
|
||||
Hindi = 0x439,
|
||||
Maltese = 0x43a,
|
||||
NorthernSami_Norway = 0x43b,
|
||||
NorthernSami_Sweden = 0x83b,
|
||||
NorthernSami_Finland = 0xc3b,
|
||||
LuleSami_Norway = 0x103b,
|
||||
LuleSami_Sweden = 0x143b,
|
||||
SouthernSami_Norway = 0x183b,
|
||||
SouthernSami_Sweden = 0x1c3b,
|
||||
SkoltSami_Finland = 0x203b,
|
||||
InariSami_Finland = 0x243b,
|
||||
Irish = 0x83c,
|
||||
Yiddish = 0x43d,
|
||||
Malay_Malaysia = 0x43e,
|
||||
Malay_BruneiDarussalam = 0x83e,
|
||||
Kazakh = 0x43f,
|
||||
Kyrgyz = 0x440,
|
||||
Kiswahili = 0x441,
|
||||
Turkmen = 0x442,
|
||||
Uzbek_Latin = 0x443,
|
||||
Uzbek_Cyrillic = 0x843,
|
||||
Tatar = 0x444,
|
||||
Bangla_India = 0x445,
|
||||
Bangla_Bangladesh = 0x845,
|
||||
Punjabi_India = 0x446,
|
||||
Punjabi_Pakistan = 0x846,
|
||||
Gujarati = 0x447,
|
||||
Odia = 0x448,
|
||||
Tamil_India = 0x449,
|
||||
Tamil_SriLanka = 0x849,
|
||||
Telugu = 0x44a,
|
||||
Kannada = 0x44b,
|
||||
Malayalam = 0x44c,
|
||||
Assamese = 0x44d,
|
||||
Marathi = 0x44e,
|
||||
Sanskrit = 0x44f,
|
||||
Mongolian_Cyrillic = 0x450,
|
||||
Mongolian_TraditionalMongolianPRC = 0x850,
|
||||
Mongolian_TraditionalMongolianMongolia = 0xc50,
|
||||
Tibetan_PRC = 0x451,
|
||||
Welsh = 0x452,
|
||||
Khmer = 0x453,
|
||||
Lao = 0x454,
|
||||
Burmese = 0x455,
|
||||
Galician = 0x456,
|
||||
Konkani = 0x457,
|
||||
Manipuri = 0x458,
|
||||
Sindhi_Devanagari = 0x459,
|
||||
Sindhi_Arabic = 0x859,
|
||||
Syriac = 0x45a,
|
||||
Sinhala = 0x45b,
|
||||
Cherokee_Cherokee = 0x45c,
|
||||
Inuktitut_Syllabics = 0x45d,
|
||||
Inuktitut_Latin = 0x85d,
|
||||
Amharic = 0x45e,
|
||||
Tamazight_ArabicMorocco = 0x45f,
|
||||
Tamazight_LatinAlgeria = 0x85f,
|
||||
Tamazight_TifinaghMorocco = 0x105f,
|
||||
Kashmiri_Arabic = 0x460,
|
||||
Kashmiri = 0x860,
|
||||
Nepali = 0x461,
|
||||
Nepali_India = 0x861,
|
||||
Frisian = 0x462,
|
||||
Pashto = 0x463,
|
||||
Filipino = 0x464,
|
||||
Divehi = 0x465,
|
||||
Edo = 0x466,
|
||||
Fulah_Nigeria = 0x467,
|
||||
Fulah_LatinSenegal = 0x867,
|
||||
Hausa = 0x468,
|
||||
Ibibio_Nigeria = 0x469,
|
||||
Yoruba = 0x46a,
|
||||
Quechua_Bolivia = 0x46b,
|
||||
Quechua_Ecuador = 0x86b,
|
||||
Quechua_Peru = 0xc6b,
|
||||
SesothoSaLeboa = 0x46c,
|
||||
Bashkir = 0x46d,
|
||||
Luxembourgish = 0x46e,
|
||||
Greenlandic = 0x46f,
|
||||
Igbo = 0x470,
|
||||
Kanuri = 0x471,
|
||||
Oromo = 0x472,
|
||||
Tigrinya_Ethiopia = 0x473,
|
||||
Tigrinya_Eritrea = 0x873,
|
||||
Guarani = 0x474,
|
||||
Hawaiian = 0x475,
|
||||
Latin = 0x476,
|
||||
Somali = 0x477,
|
||||
Yi_PRC = 0x478,
|
||||
Papiamentu = 0x479,
|
||||
Mapudungun = 0x47a,
|
||||
Mohawk = 0x47c,
|
||||
Breton = 0x47e,
|
||||
Uyghur_PRC = 0x480,
|
||||
Maori = 0x481,
|
||||
Occitan = 0x482,
|
||||
Corsican = 0x483,
|
||||
Alsatian = 0x484,
|
||||
Sakha = 0x485,
|
||||
Kiche = 0x486,
|
||||
Kinyarwanda = 0x487,
|
||||
Wolof = 0x488,
|
||||
Dari = 0x48c,
|
||||
ScottishGaelic_UnitedKingdom = 0x491,
|
||||
CentralKurdish_Iraq = 0x492
|
||||
};
|
||||
|
||||
struct DirectoryListingEntry {
|
||||
type::LEB128 nameLength;
|
||||
char name[nameLength];
|
||||
type::LEB128 contentSection;
|
||||
type::LEB128 offset;
|
||||
type::LEB128 length;
|
||||
};
|
||||
|
||||
struct DirectoryIndexEntry {
|
||||
type::LEB128 nameLength;
|
||||
char name[nameLength];
|
||||
type::LEB128 directoryListingChunk;
|
||||
};
|
||||
|
||||
struct ListingChunk {
|
||||
char magic[4];
|
||||
|
||||
if (magic == "PMGL") {
|
||||
type::Size<u32> freeSpaceLength;
|
||||
u32;
|
||||
u32 prevChunkNumber, nextChunkNumber;
|
||||
|
||||
u16 directoryListingEntryCount @ addressof(this) + parent.directoryChunkSize - 2;
|
||||
u16 offsets[(freeSpaceLength - 2) / 2] @ addressof(directoryListingEntryCount) - (freeSpaceLength - 2);
|
||||
|
||||
DirectoryListingEntry directories[directoryListingEntryCount];
|
||||
|
||||
$ = addressof(directoryListingEntryCount) + sizeof(directoryListingEntryCount);
|
||||
} else if (magic == "PMGI") {
|
||||
type::Size<u32> freeSpaceLength;
|
||||
|
||||
u16 directoryIndexEntryCount @ addressof(this) + parent.directoryChunkSize - 2;
|
||||
u16 offsets[(freeSpaceLength - 2) / 2] @ addressof(directoryIndexEntryCount) - (freeSpaceLength - 2);
|
||||
|
||||
DirectoryIndexEntry indexes[directoryIndexEntryCount];
|
||||
|
||||
$ = addressof(directoryIndexEntryCount) + sizeof(directoryIndexEntryCount);
|
||||
} else {
|
||||
std::error("Invalid chunk magic!");
|
||||
}
|
||||
};
|
||||
|
||||
struct HeaderSection {
|
||||
char magic[4];
|
||||
|
||||
if (magic == "\xFE\x01\x00\x00") {
|
||||
u32;
|
||||
type::Size<u64> fileSize;
|
||||
u32;
|
||||
u32;
|
||||
} else if (magic == "ITSP") {
|
||||
u32 version;
|
||||
type::Size<u32> directoryHeaderLength1;
|
||||
u32;
|
||||
u32 directoryChunkSize;
|
||||
u32 quickRefSectionDensity;
|
||||
u32 indexTreeDepth;
|
||||
u32 rootIndexChunkNumber;
|
||||
u32 firstPMGLChunkNumber;
|
||||
u32 lastPMGLChunkNumber;
|
||||
u32;
|
||||
u32 directoryChunkCount;
|
||||
WindowsLanguageId languageId;
|
||||
type::GUID guid;
|
||||
type::Size<u32> directoryHeaderLength2;
|
||||
u32;
|
||||
u32;
|
||||
u32;
|
||||
|
||||
ListingChunk chunk[directoryChunkCount];
|
||||
} else {
|
||||
std::error("Invalid header section magic!");
|
||||
}
|
||||
};
|
||||
|
||||
struct HeaderSectionTableEntry {
|
||||
u64 offset;
|
||||
type::Size<u64> size;
|
||||
|
||||
HeaderSection headerSection @ offset;
|
||||
};
|
||||
|
||||
struct NameListEntry {
|
||||
type::Size<u16> nameLength;
|
||||
char16 name[nameLength];
|
||||
padding[2];
|
||||
};
|
||||
|
||||
struct NameListFile {
|
||||
u16 fileLengthWords;
|
||||
u16 entriesInFile;
|
||||
|
||||
NameListEntry nameList[entriesInFile];
|
||||
|
||||
padding[0x2E];
|
||||
};
|
||||
|
||||
struct SectionData {
|
||||
u32 fileLengthWords;
|
||||
type::Magic<"LZXC"> magic;
|
||||
u32 version;
|
||||
u32 lzxResetInterval;
|
||||
type::Size<u32> windowSize;
|
||||
type::Size<u32> cacheSize;
|
||||
u32;
|
||||
};
|
||||
|
||||
struct Content {
|
||||
NameListFile nameListFile;
|
||||
SectionData sectionData;
|
||||
};
|
||||
|
||||
struct CHM {
|
||||
type::Magic<"ITSF"> magic;
|
||||
u32 version;
|
||||
type::Size<u32> headerSize;
|
||||
u32;
|
||||
be u32 timeStamp;
|
||||
WindowsLanguageId languageId;
|
||||
type::GUID guids[2];
|
||||
|
||||
HeaderSectionTableEntry headerSectionTable[2];
|
||||
|
||||
Content *dataOffset : u64;
|
||||
};
|
||||
|
||||
CHM chm @ 0x00;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user