includes: Switch over to import statements (#224)

* Update includes and patterns to new import system

* Update namespaces to new syntax
This commit is contained in:
Nik
2024-02-25 22:04:41 +01:00
committed by GitHub
parent 3f44a743e8
commit f70b7066b9
128 changed files with 298 additions and 298 deletions

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <hex/impl/imhex_check.pat> import hex.impl.imhex_check;
/*! /*!
Core intrinsic functions to interact with the ImHex Hex Editor Core intrinsic functions to interact with the ImHex Hex Editor
*/ */
namespace hex::core { namespace auto hex::core {
/** /**
A type representing a selection in the hex editor A type representing a selection in the hex editor

View File

@@ -1,14 +1,14 @@
#pragma once #pragma once
#include <hex/impl/imhex_check.pat> import hex.impl.imhex_check;
#include <std/mem.pat> import std.mem;
/*! /*!
Library to allow decoding of more complex values Library to allow decoding of more complex values
*/ */
namespace hex::dec { namespace auto hex::dec {
/** /**
Demangles a mangled name into a human readable name Demangles a mangled name into a human readable name

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <hex/impl/imhex_check.pat> import hex.impl.imhex_check;
/*! /*!
Library to do HTTP requests Library to do HTTP requests
*/ */
namespace hex::http { namespace auto hex::http {
/** /**
Performs a HTTP GET request to the given URL and returns the response body Performs a HTTP GET request to the given URL and returns the response body

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <hex/impl/imhex_check.pat> import hex.impl.imhex_check;
/*! /*!
Library to interact with the currently loaded provider. Library to interact with the currently loaded provider.
*/ */
namespace hex::prv { namespace auto hex::prv {
/** /**

View File

@@ -1,16 +1,16 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
#include <hex/impl/imhex_check.pat> import hex.impl.imhex_check;
#include <hex/dec.pat> import hex.dec;
/*! /*!
Types to automatically decode mangled names Types to automatically decode mangled names
*/ */
namespace hex::type { namespace auto hex::type {
/** /**
A mangled name string that gets demangled when displayed A mangled name string that gets demangled when displayed

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include <std/sys.pat> import std.sys;
/*! /*!
The array library contains a helper type to make it easier to create multi-dimensional arrays The array library contains a helper type to make it easier to create multi-dimensional arrays
and pass arrays to functions as parameters. and pass arrays to functions as parameters.
*/ */
namespace std { namespace auto std {
/** /**
Simple one dimensional array wrapper Simple one dimensional array wrapper

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/limits.pat> import std.limits;
/*! /*!
This library contains various helper functions for common bit operations. This library contains various helper functions for common bit operations.
*/ */
namespace std::bit { namespace auto std::bit {
/** /**
Calculates the number of 1 bits in a given number Calculates the number of 1 bits in a given number

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include <std/mem.pat> import std.mem;
/*! /*!
The core library contains intrinsics and "compiler magic" functions that The core library contains intrinsics and "compiler magic" functions that
get extra help from the runtime to fulfill their purpose. get extra help from the runtime to fulfill their purpose.
*/ */
namespace std::core { namespace auto std::core {
/** /**
The layout order of each field after byte-endianness has been handled. The layout order of each field after byte-endianness has been handled.

View File

@@ -5,7 +5,7 @@
of ASCII characters. of ASCII characters.
*/ */
namespace std::ctype { namespace auto std::ctype {
/** /**
Checks if the given character `c` is a digit between '0' and '9' Checks if the given character `c` is a digit between '0' and '9'

View File

@@ -7,7 +7,7 @@
**These functions are considered dangerous and require the user to manually permit them** **These functions are considered dangerous and require the user to manually permit them**
*/ */
namespace std::file { namespace auto std::file {
/** /**
A handle representing a file that has been opened A handle representing a file that has been opened

View File

@@ -4,7 +4,7 @@
Library for doing arithmetic with fixed point numbers and converting them from/to floating point numbers. Library for doing arithmetic with fixed point numbers and converting them from/to floating point numbers.
*/ */
namespace std::fxpt { namespace auto std::fxpt {
/** /**
A fixed point value A fixed point value

View File

@@ -4,7 +4,7 @@
The hash library contains various data hash functions The hash library contains various data hash functions
*/ */
namespace std::hash { namespace auto std::hash {
/** /**
Calculates the CRC32 hash of the bytes inside of a given pattern Calculates the CRC32 hash of the bytes inside of a given pattern

View File

@@ -4,7 +4,7 @@
The IO library allows formatting strings and outputting text to the console The IO library allows formatting strings and outputting text to the console
*/ */
namespace std { namespace auto std {
/** /**
Formats the given arguments using the format string and prints the result to the console Formats the given arguments using the format string and prints the result to the console

View File

@@ -4,7 +4,7 @@
Library to calculate the minimum and maximum values that fit into a given data type Library to calculate the minimum and maximum values that fit into a given data type
*/ */
namespace std::limits { namespace auto std::limits {
/** /**
Returns the minimum value that can be stored in a `u8`. Returns the minimum value that can be stored in a `u8`.

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/mem.pat> import std.mem;
/*! /*!
Library containing more advanced mathematical operations. Library containing more advanced mathematical operations.
*/ */
namespace std::math { namespace auto std::math {
/** /**
Compares the values `a` and `b` with each other and returns the smaller of the two Compares the values `a` and `b` with each other and returns the smaller of the two

View File

@@ -4,7 +4,7 @@
Library for doing raw memory accesses and other low-level operations. Library for doing raw memory accesses and other low-level operations.
*/ */
namespace std::mem { namespace auto std::mem {
namespace impl { namespace impl {

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include <std/mem.pat> import std.mem;
/*! /*!
The Pointer library contains helper functions to deal with pointer types. 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 The `relative_to` functions are meant to be used with the `[[pointer_base]]` attribute
*/ */
namespace std::ptr { namespace auto std::ptr {
/** /**
Use the offset of the current pointer as start address Use the offset of the current pointer as start address

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/limits.pat> import std.limits;
/*! /*!
Library to generate random numbers. Supports various different distribution types. Library to generate random numbers. Supports various different distribution types.
*/ */
namespace std::random { namespace auto std::random {
/** /**
Represents the type of distribution to use to generate a random number Represents the type of distribution to use to generate a random number

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
/*! /*!
Libray to interact with strings. Libray to interact with strings.
*/ */
namespace std::string { namespace auto std::string {
/** /**
Base type for sized strings. Represents a string with its size preceeding it. Base type for sized strings. Represents a string with its size preceeding it.

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
/*! /*!
Basic helper functions Basic helper functions
*/ */
namespace std { namespace auto std {
/** /**
Asserts that a given value is true. If it's not, abort evaluation and print the given message to the console Asserts that a given value is true. If it's not, abort evaluation and print the given message to the console

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
/*! /*!
Library to handle time and date related operations. Library to handle time and date related operations.
*/ */
namespace std::time { namespace auto std::time {
/** /**
A structured representation of a time and date. A structured representation of a time and date.

View File

@@ -1,14 +1,14 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
#include <std/math.pat> import std.math;
/*! /*!
Types used to change the base of the displayed integer value. Types used to change the base of the displayed integer value.
Used like `type::Hex<u32> hexNumber;`, `type::Oct<u16> octalNumber;` Used like `type::Hex<u32> hexNumber;`, `type::Oct<u16> octalNumber;`
*/ */
namespace type { namespace auto type {
/** /**
Integer type representing a Hexadecimal value. Displays its value in hexadecimal format. Integer type representing a Hexadecimal value. Displays its value in hexadecimal format.

View File

@@ -1,12 +1,12 @@
#include <std/io.pat> import std.io;
#include <std/string.pat> import std.string;
#include <std/mem.pat> import std.mem;
/*! /*!
Type representing a Base64 encoded string Type representing a Base64 encoded string
*/ */
namespace type { namespace auto type {
/** /**
Type representing a Base64 encoded string Type representing a Base64 encoded string

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
/*! /*!
Type to decode a BCD (Binary Coded Decimal) number Type to decode a BCD (Binary Coded Decimal) number
*/ */
namespace type { namespace auto type {
/** /**
Decodes a BCD value where one byte represents a single digit Decodes a BCD value where one byte represents a single digit

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
/*! /*!
Types to display single bytes using various different representations Types to display single bytes using various different representations
*/ */
namespace type { namespace auto type {
/** /**
Type visualizing the value of each individual bit Type visualizing the value of each individual bit

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
#include <std/core.pat> import std.core;
/*! /*!
Types representing RGB or RGBA colors. The decoded color will be displayed in their color field Types representing RGB or RGBA colors. The decoded color will be displayed in their color field
*/ */
namespace type { namespace auto type {
/** /**
Type representing a generic RGBA color with a variable number of bits for each color Type representing a generic RGBA color with a variable number of bits for each color

View File

@@ -1,14 +1,14 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
#include <std/math.pat> import std.math;
#include <std/mem.pat> import std.mem;
/*! /*!
Type representing a 16 bit half precision floating point number Type representing a 16 bit half precision floating point number
*/ */
namespace type { namespace auto type {
/** /**
Type representing a 16 bit half precision floating point number Type representing a 16 bit half precision floating point number

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
/*! /*!
Types to deal with UUIDs (Universally Unique Identifiers) / GUIDs (Globally Unique Identifiers) as described in RFC 4122 Types to deal with UUIDs (Universally Unique Identifiers) / GUIDs (Globally Unique Identifiers) as described in RFC 4122
*/ */
namespace type { namespace auto type {
/** /**
Type representing a GUID value Type representing a GUID value

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
#include <std/string.pat> import std.string;
/*! /*!
Types used to decode IP addresses Types used to decode IP addresses
*/ */
namespace type { namespace auto type {
/** /**
A 4 byte IPv4 Address as described in RFC 791 A 4 byte IPv4 Address as described in RFC 791

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
/*! /*!
Types used to decode Little Endian Base 128 numbers used to store large numbers as space efficiently as possible Types used to decode Little Endian Base 128 numbers used to store large numbers as space efficiently as possible
*/ */
namespace type { namespace auto type {
/** /**
Base LEB128 type. Use `uLEB128` and `sLEB128` instead. Base LEB128 type. Use `uLEB128` and `sLEB128` instead.

View File

@@ -1,12 +1,12 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
/*! /*!
Types used to decode MAC Addresses Types used to decode MAC Addresses
*/ */
namespace type { namespace auto type {
/** /**
A MAC Address as used in the Internet Protocol A MAC Address as used in the Internet Protocol

View File

@@ -1,13 +1,13 @@
#include <std/string.pat> import std.string;
#include <std/sys.pat> import std.sys;
#include <std/io.pat> import std.io;
#include <std/ctype.pat> import std.ctype;
/*! /*!
Types used to parse and enforce specific magic numbers Types used to parse and enforce specific magic numbers
*/ */
namespace type namespace auto type
{ {
fn fm(ref auto value) fn fm(ref auto value)
{ {

View File

@@ -1,10 +1,10 @@
#include <std/mem.pat> import std.mem;
/*! /*!
Types dealing with various kinds of resource paths Types dealing with various kinds of resource paths
*/ */
namespace type { namespace auto type {
/** /**
Type representing a single path segment. Use the `Path` type instead of using this on its own Type representing a single path segment. Use the `Path` type instead of using this on its own

View File

@@ -1,10 +1,10 @@
#include <std/io.pat> import std.io;
/*! /*!
Types used to pretty print size values Types used to pretty print size values
*/ */
namespace type { namespace auto type {
/** /**
A generic size type which displays its value in Bytes (or kiB, MiB, GiB, TiB, PiB, EiB if larger) A generic size type which displays its value in Bytes (or kiB, MiB, GiB, TiB, PiB, EiB if larger)

View File

@@ -1,13 +1,13 @@
#pragma once #pragma once
#include <std/io.pat> import std.io;
#include <std/time.pat> import std.time;
/*! /*!
Types used to decode various different time formats Types used to decode various different time formats
*/ */
namespace type { namespace auto type {
/** /**
A 32 bit Unix time value A 32 bit Unix time value

View File

@@ -5,7 +5,7 @@
*/ */
// Explicitly don't add these types to the `type` namespace for usability // Explicitly don't add these types to the `type` namespace for usability
// namespace type { // namespace auto type {
// using char = s8; // using char = s8;
using byte = s8; using byte = s8;

View File

@@ -5,7 +5,7 @@
*/ */
// Explicitly don't add these types to the `type` namespace for usability // Explicitly don't add these types to the `type` namespace for usability
// namespace type { // namespace auto type {
using uint8_t = u8; using uint8_t = u8;
using uint16_t = u16; using uint16_t = u16;

View File

@@ -5,7 +5,7 @@
*/ */
// Explicitly don't add these types to the `type` namespace for usability // Explicitly don't add these types to the `type` namespace for usability
// namespace type { // namespace auto type {
using le16 = le u16; using le16 = le u16;
using be16 = be u16; using be16 = be u16;

View File

@@ -5,7 +5,7 @@
*/ */
// Explicitly don't add these types to the `type` namespace for usability // Explicitly don't add these types to the `type` namespace for usability
// namespace type { // namespace auto type {
// using u8 = u8; // using u8 = u8;
// using u16 = u16; // using u16 = u16;

View File

@@ -5,7 +5,7 @@
*/ */
// Explicitly don't add these types to the `type` namespace for usability // Explicitly don't add these types to the `type` namespace for usability
// namespace type { // namespace auto type {
using BYTE = u8; using BYTE = u8;
using WORD = u16; using WORD = u16;

View File

@@ -1,8 +1,8 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Autodesk 3DS Max Model file #pragma description Autodesk 3DS Max Model file
#include <std/io.pat> import std.io;
#include <type/base.pat> import type.base;
#pragma MIME image/x-3ds #pragma MIME image/x-3ds

View File

@@ -1,8 +1,8 @@
#pragma description 7z File Format #pragma description 7z File Format
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
#include <std/math.pat> import std.math;
enum Type:u8{ enum Type:u8{

View File

@@ -2,9 +2,9 @@
#pragma description Crash Bandicoot - Back in Time (fan game) User created level format #pragma description Crash Bandicoot - Back in Time (fan game) User created level format
// Supports all versions till 0.94c, newer versions might be compatible! // Supports all versions till 0.94c, newer versions might be compatible!
#include <type/magic.pat> import type.magic;
#include <std/string.pat> import std.string;
#include <std/array.pat> import std.array;
struct Header { struct Header {

View File

@@ -3,8 +3,8 @@
#pragma endian little #pragma endian little
#include <std/io.pat> import std.io;
#include <std/sys.pat> import std.sys;
#define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC "AFE2" #define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC "AFE2"
#define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC_1 "AFE1" #define ATMOSPHERE_REBOOT_TO_FATAL_MAGIC_1 "AFE1"

View File

@@ -3,9 +3,9 @@
#pragma MIME application/x-archive #pragma MIME application/x-archive
#include <std/string.pat> import std.string;
#include <std/mem.pat> import std.mem;
#include <std/sys.pat> import std.sys;
struct ARFile { struct ARFile {
char file_name[16]; char file_name[16];

View File

@@ -3,8 +3,8 @@
#pragma endian little #pragma endian little
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
#define VTOR 0x00000000 #define VTOR 0x00000000
#define EXTERNAL_INTERRUPT_COUNT 64 #define EXTERNAL_INTERRUPT_COUNT 64

View File

@@ -3,9 +3,9 @@
#pragma MIME application/x-bittorrent #pragma MIME application/x-bittorrent
#include <std/ctype.pat> import std.ctype;
#include <std/mem.pat> import std.mem;
#include <std/string.pat> import std.string;
namespace bencode { namespace bencode {

View File

@@ -2,7 +2,7 @@
#pragma MIME image/bmp #pragma MIME image/bmp
#pragma endian little #pragma endian little
#include <std/mem.pat> import std.mem;
struct BitmapFileHeader { struct BitmapFileHeader {
u8 bfType[2]; u8 bfType[2];

View File

@@ -1,7 +1,7 @@
#include <std/math.pat> import std.math;
#include <std/core.pat> import std.core;
#include <type/magic.pat> import type.magic;
#include <type/time.pat> import type.time;
using CFBinaryPlistObject; using CFBinaryPlistObject;

View File

@@ -3,8 +3,8 @@
#pragma MIME application/bson #pragma MIME application/bson
#include <std/mem.pat> import std.mem;
#include <type/time.pat> import type.time;
enum Type : u8 { enum Type : u8 {
Double = 0x01, Double = 0x01,

View File

@@ -1,8 +1,8 @@
#pragma description GoldSrc engine maps format (used in Half-Life 1) #pragma description GoldSrc engine maps format (used in Half-Life 1)
#include <std/ptr.pat> import std.ptr;
#include <std/mem.pat> import std.mem;
#include <std/sys.pat> import std.sys;
#pragma endian little #pragma endian little

View File

@@ -1,11 +1,11 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Windows HtmlHelp Data (ITSF / CHM) #pragma description Windows HtmlHelp Data (ITSF / CHM)
#include <type/magic.pat> import type.magic;
#include <type/size.pat> import type.size;
#include <type/guid.pat> import type.guid;
#include <type/leb128.pat> import type.leb128;
#include <std/sys.pat> import std.sys;
enum WindowsLanguageId : u32 { enum WindowsLanguageId : u32 {
Arabic_SaudiArabia = 0x401, Arabic_SaudiArabia = 0x401,

View File

@@ -3,8 +3,8 @@
#pragma MIME application/x-coff #pragma MIME application/x-coff
#include <type/time.pat> import type.time;
#include <type/size.pat> import type.size;
enum Machine : u16 { enum Machine : u16 {
Unknown = 0x0000, Unknown = 0x0000,

View File

@@ -1,12 +1,12 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Old Binary CPIO Format #pragma description Old Binary CPIO Format
#include <type/base.pat> import type.base;
#include <std/time.pat> import std.time;
#include <std/core.pat> import std.core;
#include <std/sys.pat> import std.sys;
#include <std/mem.pat> import std.mem;
#pragma MIME application/x-cpio #pragma MIME application/x-cpio

View File

@@ -1,6 +1,6 @@
#pragma description Dalvik EXecutable Format #pragma description Dalvik EXecutable Format
#include <type/leb128.pat> import type.leb128;
struct header_item { struct header_item {
u8 magic[8]; u8 magic[8];

View File

@@ -3,12 +3,12 @@
#pragma MIME application/dicom #pragma MIME application/dicom
#pragma endian little #pragma endian little
#include <std/core.pat> import std.core;
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
#include <std/string.pat> import std.string;
#include <std/sys.pat> import std.sys;
#include <type/magic.pat> import type.magic;
u32 UNDEFINED_LENGTH = 0xffffffff; u32 UNDEFINED_LENGTH = 0xffffffff;

View File

@@ -2,10 +2,10 @@
#pragma endian big #pragma endian big
#include <type/magic.pat> import type.magic;
#include <type/size.pat> import type.size;
#include <type/guid.pat> import type.guid;
#include <std/mem.pat> import std.mem;
// Parse DMG Structure per http://newosxbook.com/DMG.html // Parse DMG Structure per http://newosxbook.com/DMG.html
// //

View File

@@ -2,7 +2,7 @@
// Apple macOS .DS_Store format // Apple macOS .DS_Store format
#pragma endian big #pragma endian big
#include <std/io.pat> import std.io;
struct RecordEntry { struct RecordEntry {
u32 length; u32 length;

View File

@@ -7,9 +7,9 @@
#pragma MIME application/x-object #pragma MIME application/x-object
#pragma MIME application/x-sharedlib #pragma MIME application/x-sharedlib
#include <std/core.pat> import std.core;
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
using BitfieldOrder = std::core::BitfieldOrder; using BitfieldOrder = std::core::BitfieldOrder;

View File

@@ -3,12 +3,12 @@
#pragma endian big #pragma endian big
#include <std/sys.pat> import std.sys;
#include <std/io.pat> import std.io;
#include <std/core.pat> import std.core;
#include <type/magic.pat> import type.magic;
#include <type/size.pat> import type.size;
// These are used in order for the children to be able to find strings // These are used in order for the children to be able to find strings
u64 fdt_addr; u64 fdt_addr;

View File

@@ -1,9 +1,9 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Free Lossless Audio Codec, FLAC Audio Format #pragma description Free Lossless Audio Codec, FLAC Audio Format
#include <std/sys.pat> import std.sys;
#include <std/core.pat> import std.core;
#include <std/io.pat> import std.io;
#pragma endian big #pragma endian big

View File

@@ -1,7 +1,7 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Drive File System #pragma description Drive File System
#include <std/io.pat> import std.io;
struct DiskTimeStamp { struct DiskTimeStamp {
u8 seconds, minutes, hours; u8 seconds, minutes, hours;

View File

@@ -3,9 +3,9 @@
#pragma MIME application/x-gameboy-rom #pragma MIME application/x-gameboy-rom
#include <type/size.pat> import type.size;
#include <std/string.pat> import std.string;
#include <std/mem.pat> import std.mem;
bool uppercaseROMFeatures in; bool uppercaseROMFeatures in;
bool brandedROMFeatures in; bool brandedROMFeatures in;

View File

@@ -13,13 +13,13 @@
#define EXTENSION_INTRODUCER_MAGIC 0x21 #define EXTENSION_INTRODUCER_MAGIC 0x21
#define GIF_TRAILER_MAGIC 0x3B #define GIF_TRAILER_MAGIC 0x3B
#include <std/io.pat> import std.io;
#include <std/core.pat> import std.core;
#include <std/mem.pat> import std.mem;
#include <std/string.pat> import std.string;
#include <std/math.pat> import std.math;
#include <type/magic.pat> import type.magic;
bitfield GCT_Flags { bitfield GCT_Flags {
size : 3 [[comment("physical size = 2^(flags.size + 1)")]]; size : 3 [[comment("physical size = 2^(flags.size + 1)")]];

View File

@@ -22,8 +22,8 @@
* SOFTWARE. * SOFTWARE.
*/ */
#include <std/mem.pat> import std.mem;
#include <std/io.pat> import std.io;
/** /**
* @brief The glTF magic section. * @brief The glTF magic section.

View File

@@ -3,10 +3,10 @@
#pragma MIME application/gzip #pragma MIME application/gzip
#include <type/time.pat> import type.time;
#include <type/size.pat> import type.size;
#include <std/core.pat> import std.core;
#include <std/mem.pat> import std.mem;
using BitfieldOrder = std::core::BitfieldOrder; using BitfieldOrder = std::core::BitfieldOrder;

View File

@@ -1,6 +1,6 @@
#include <std/mem.pat> import std.mem;
#include <std/io.pat> import std.io;
#include <std/string.pat> import std.string;
struct Header { struct Header {
u32 magic; u32 magic;

View File

@@ -1,10 +1,10 @@
#pragma author Surasia #pragma author Surasia
#pragma description Halo Infinite HavokScript 5.1 "luas" file #pragma description Halo Infinite HavokScript 5.1 "luas" file
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
#include <std/core.pat> import std.core;
#include <std/string.pat> import std.string;
struct String32 { struct String32 {
s32 length; s32 length;

View File

@@ -3,7 +3,7 @@
#pragma endian little #pragma endian little
#include <std/sys.pat> import std.sys;
#pragma MIME image/vnd.microsoft.icon #pragma MIME image/vnd.microsoft.icon
#pragma MIME image/x-icon #pragma MIME image/x-icon

View File

@@ -2,7 +2,7 @@
#pragma MIME audio/mpeg #pragma MIME audio/mpeg
#include <std/mem.pat> import std.mem;
namespace v1 { namespace v1 {

View File

@@ -8,7 +8,7 @@
*/ */
#pragma endian big #pragma endian big
#include <std/mem.pat> import std.mem;
enum FileType: u16 { enum FileType: u16 {
Data = 0x3030, Data = 0x3030,

View File

@@ -3,8 +3,8 @@
#pragma endian big #pragma endian big
#include <std/sys.pat> import std.sys;
#include <std/io.pat> import std.io;
struct MAC { struct MAC {
u8 octets[6]; u8 octets[6];

View File

@@ -3,8 +3,8 @@
#pragma endian big #pragma endian big
#include <std/mem.pat> import std.mem;
#include <std/string.pat> import std.string;
struct Hunk { struct Hunk {
u24 offset; u24 offset;

View File

@@ -2,7 +2,7 @@
#pragma endian little #pragma endian little
#include <std/io.pat> import std.io;
enum VolumeDescriptorTypes : u8 { enum VolumeDescriptorTypes : u8 {
BootRecord, BootRecord,

View File

@@ -5,11 +5,11 @@
#pragma pattern_limit 100000000 #pragma pattern_limit 100000000
#pragma MIME application/x-java-applet #pragma MIME application/x-java-applet
#include <std/string.pat> import std.string;
#include <std/math.pat> import std.math;
#include <std/core.pat> import std.core;
#include <std/io.pat> import std.io;
#include <std/sys.pat> import std.sys;
using BitfieldOrder = std::core::BitfieldOrder; using BitfieldOrder = std::core::BitfieldOrder;

View File

@@ -1,9 +1,9 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description JPEG Image Format #pragma description JPEG Image Format
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
#include <type/magic.pat> import type.magic;
#pragma endian big #pragma endian big
#pragma MIME image/jpeg #pragma MIME image/jpeg

View File

@@ -3,9 +3,9 @@
#pragma MIME application/x-ms-shortcut #pragma MIME application/x-ms-shortcut
#include <std/core.pat> import std.core;
#include <type/guid.pat> import type.guid;
#include <type/size.pat> import type.size;
using BitfieldOrder = std::core::BitfieldOrder; using BitfieldOrder = std::core::BitfieldOrder;

View File

@@ -1,7 +1,7 @@
#pragma description Lua 5.4 bytecode #pragma description Lua 5.4 bytecode
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
namespace impl { namespace impl {

View File

@@ -3,7 +3,7 @@
#pragma MIME application/x-mach-binary #pragma MIME application/x-mach-binary
#include <type/size.pat> import type.size;
enum Magic : u32 { enum Magic : u32 {
_32BitMagic = 0xFEEDFACE, _32BitMagic = 0xFEEDFACE,

View File

@@ -1,7 +1,7 @@
#pragma description Mechanized Assault and Exploration v1.04 (strategy game) save file format #pragma description Mechanized Assault and Exploration v1.04 (strategy game) save file format
#include <std/sys.pat> import std.sys;
#include <std/mem.pat> import std.mem;
#pragma array_limit 12544 #pragma array_limit 12544
#pragma pattern_limit 2000000 #pragma pattern_limit 2000000

View File

@@ -1,6 +1,6 @@
#pragma description MIDI header, event fields provided #pragma description MIDI header, event fields provided
#include <std/core.pat> import std.core;
#pragma MIME audio/midi #pragma MIME audio/midi
#pragma endian big #pragma endian big

View File

@@ -3,9 +3,9 @@
#pragma MIME application/x-dmp #pragma MIME application/x-dmp
#include <type/time.pat> import type.time;
#include <type/types/win32.pat> import type/types.win32;
#include <type/size.pat> import type.size;
using RVA = ULONG32; using RVA = ULONG32;
using RVA64 = ULONG64; using RVA64 = ULONG64;

View File

@@ -6,9 +6,9 @@
#pragma MIME video/mp4 #pragma MIME video/mp4
#pragma MIME application/mp4 #pragma MIME application/mp4
#include <std/io.pat> import std.io;
#include <std/mem.pat> import std.mem;
#include <std/string.pat> import std.string;
fn to_string(auto var) { fn to_string(auto var) {
return str(var); return str(var);

View File

@@ -3,8 +3,8 @@
#pragma endian little #pragma endian little
#include <std/sys.pat> import std.sys;
#include <std/io.pat> import std.io;
struct ApplicationTitle { struct ApplicationTitle {
char name[0x200]; char name[0x200];

View File

@@ -1,7 +1,7 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Minecraft NBT format #pragma description Minecraft NBT format
#include <std/sys.pat> import std.sys;
#pragma endian big #pragma endian big

View File

@@ -1,6 +1,6 @@
#pragma description NE header and Standard NE fields #pragma description NE header and Standard NE fields
#include <std/mem.pat> import std.mem;
struct DOSHeader { struct DOSHeader {
char signature[2]; char signature[2];

View File

@@ -1,8 +1,8 @@
#pragma author gmestanley #pragma author gmestanley
#pragma description .nes file format #pragma description .nes file format
#include <std/mem.pat> import std.mem;
#include <std/string.pat> import std.string;
bitfield iNES07Flags { bitfield iNES07Flags {
mirroringIsVertical : 1; mirroringIsVertical : 1;

View File

@@ -1,8 +1,8 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Nintendo Switch NRO files #pragma description Nintendo Switch NRO files
#include <std/io.pat> import std.io;
#include <std/sys.pat> import std.sys;
struct MOD0 { struct MOD0 {
char magic[4]; char magic[4];

View File

@@ -1,7 +1,7 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description NTAG213/NTAG215/NTAG216, NFC Forum Type 2 Tag compliant IC #pragma description NTAG213/NTAG215/NTAG216, NFC Forum Type 2 Tag compliant IC
#include <std/core.pat> import std.core;
using BitfieldOrder = std::core::BitfieldOrder; using BitfieldOrder = std::core::BitfieldOrder;

View File

@@ -3,8 +3,8 @@
#pragma MIME audio/ogg #pragma MIME audio/ogg
#include <std/core.pat> import std.core;
#include <std/mem.pat> import std.mem;
bitfield HeaderType { bitfield HeaderType {
Continuation : 1; Continuation : 1;

View File

@@ -6,8 +6,8 @@
// //
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include <std/mem.pat> import std.mem;
#include <type/magic.pat> import type.magic;
#pragma endian big #pragma endian big

View File

@@ -1,6 +1,6 @@
#pragma description pcap header and packets #pragma description pcap header and packets
#include <std/mem.pat> import std.mem;
#pragma MIME application/vnd.tcpdump.pcap #pragma MIME application/vnd.tcpdump.pcap
enum network_type : u32 { enum network_type : u32 {

View File

@@ -3,7 +3,7 @@
#pragma MIME application/x-pcx #pragma MIME application/x-pcx
#include <std/io.pat> import std.io;
enum Encoding : u8 { enum Encoding : u8 {
NoEncoding = 0x00, NoEncoding = 0x00,

View File

@@ -5,10 +5,10 @@
#pragma MIME application/x-msdownload #pragma MIME application/x-msdownload
#pragma MIME application/vnd.microsoft.portable-executable #pragma MIME application/vnd.microsoft.portable-executable
#include <std/core.pat> import std.core;
#include <std/string.pat> import std.string;
#include <type/guid.pat> import type.guid;
#include <type/time.pat> import type.time;
struct DOSHeader { struct DOSHeader {
char signature[2] [[hex::spec_name("e_magic")]]; char signature[2] [[hex::spec_name("e_magic")]];

View File

@@ -1,10 +1,10 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Nintendo Switch PFS0 archive (NSP files) #pragma description Nintendo Switch PFS0 archive (NSP files)
#include <type/magic.pat> import type.magic;
#include <type/size.pat> import type.size;
#include <std/core.pat> import std.core;
struct FileEntry { struct FileEntry {
u64 dataOffset; u64 dataOffset;

View File

@@ -3,7 +3,7 @@
#pragma MIME image/png #pragma MIME image/png
#pragma endian big #pragma endian big
#include <std/mem.pat> import std.mem;
struct header_t { struct header_t {
u8 highBitByte; u8 highBitByte;

View File

@@ -1,10 +1,10 @@
#pragma author WerWolv #pragma author WerWolv
#pragma description Google Protobuf encoding #pragma description Google Protobuf encoding
#include <std/core.pat> import std.core;
#include <std/mem.pat> import std.mem;
#include <type/leb128.pat> import type.leb128;
struct ZigZag32 { struct ZigZag32 {
u32 value; u32 value;

View File

@@ -1,7 +1,7 @@
#pragma description Python bytecode files #pragma description Python bytecode files
#include <type/time.pat> import type.time;
#include <std/mem.pat> import std.mem;
#define FLAG_REF 0x80 #define FLAG_REF 0x80
#define TYPE_NULL '0' #define TYPE_NULL '0'

View File

@@ -2,7 +2,7 @@
#pragma endian big #pragma endian big
#include <std/mem.pat> import std.mem;
// Reference: // Reference:
// https://pyinstaller.org/en/stable/advanced-topics.html // https://pyinstaller.org/en/stable/advanced-topics.html

View File

@@ -3,7 +3,7 @@
#pragma MIME image/qoi #pragma MIME image/qoi
#pragma endian big #pragma endian big
#include <std/mem.pat> import std.mem;
namespace qoi { namespace qoi {

Some files were not shown because too many files have changed in this diff Show More