Switch from include guards to #pragma once.

This improves performance with some compilers, especially MSVC.

NOTE: Some include guards are left in because a few files check for them:

- secoptions_win8.h: Checks for __RVTHTOOL_LIBWIICRYPTO_WIN32_SECOPTIONS_H__.
This commit is contained in:
David Korth 2025-05-21 19:44:47 -04:00
parent 400a4ac76c
commit 4395eb37a9
62 changed files with 234 additions and 422 deletions

View File

@ -2,51 +2,49 @@
* RVT-H Tool *
* git.h: Git version macros. *
* *
* Copyright (c) 2008-2018 by David Korth. *
* Copyright (c) 2008-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_GIT_H__
#define __RVTHTOOL_GIT_H__
#pragma once
// git_version.h is generated by git_version.sh
#include "git_version.h"
// RP_GIT_VERSION: Macro for the git revision, if available.
#ifdef GIT_REPO
#ifdef GIT_BRANCH
#define RP_GIT_TMP_BRANCH GIT_BRANCH
#ifdef GIT_SHAID
#define RP_GIT_TMP_SHAID "/" GIT_SHAID
#else /* !GIT_SHAID */
#define RP_GIT_TMP_SHAID
#endif /* GIT_SHAID */
#else /* !GIT_BRANCH */
#define RP_GIT_TMP_BRANCH
#ifdef GIT_SHAID
#define RP_GIT_TMP_SHAID GIT_SHAID
#else /* !GIT_SHAID */
#define RP_GIT_TMP_SHAID
#endif /* GIT_SHAID */
#endif /* GIT_BRANCH */
#ifdef GIT_DIRTY
#define RP_GIT_TMP_DIRTY "+"
#else /* !GIT_DIRTY */
#define RP_GIT_TMP_DIRTY
#endif /* GIT_DIRTY */
#define RP_GIT_VERSION "git: " RP_GIT_TMP_BRANCH RP_GIT_TMP_SHAID RP_GIT_TMP_DIRTY
#ifdef GIT_DESCRIBE
#define RP_GIT_DESCRIBE GIT_DESCRIBE RP_GIT_TMP_DIRTY
#endif
#else /* !GIT_REPO */
#ifdef RP_GIT_VERSION
#undef RP_GIT_VERSION
#endif /* RP_GIT_VERSION */
#ifdef RP_GIT_DESCRIBE
#undef RP_GIT_DESCRIBE
#endif /* RP_GIT_DESCRIBE */
#endif /* GIT_REPO */
# ifdef GIT_BRANCH
# define RP_GIT_TMP_BRANCH GIT_BRANCH
# ifdef GIT_SHAID
# define RP_GIT_TMP_SHAID "/" GIT_SHAID
# else /* !GIT_SHAID */
# define RP_GIT_TMP_SHAID
# endif /* GIT_SHAID */
# else /* !GIT_BRANCH */
# define RP_GIT_TMP_BRANCH
# ifdef GIT_SHAID
# define RP_GIT_TMP_SHAID GIT_SHAID
# else /* !GIT_SHAID */
# define RP_GIT_TMP_SHAID
# endif /* GIT_SHAID */
# endif /* GIT_BRANCH */
#endif /* __RVTHTOOL_GIT_H__ */
# ifdef GIT_DIRTY
# define RP_GIT_TMP_DIRTY "+"
# else /* !GIT_DIRTY */
# define RP_GIT_TMP_DIRTY
# endif /* GIT_DIRTY */
# define RP_GIT_VERSION "git: " RP_GIT_TMP_BRANCH RP_GIT_TMP_SHAID RP_GIT_TMP_DIRTY
# ifdef GIT_DESCRIBE
# define RP_GIT_DESCRIBE GIT_DESCRIBE RP_GIT_TMP_DIRTY
# endif
#else /* !GIT_REPO */
# ifdef RP_GIT_VERSION
# undef RP_GIT_VERSION
# endif /* RP_GIT_VERSION */
# ifdef RP_GIT_DESCRIBE
# undef RP_GIT_DESCRIBE
# endif /* RP_GIT_DESCRIBE */
#endif /* GIT_REPO */

View File

@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_BANK_INIT_H__
#define __RVTHTOOL_LIBRVTH_BANK_INIT_H__
#pragma once
#include "rvth.hpp"
@ -64,5 +63,3 @@ int rvth_init_BankEntry(RvtH_BankEntry *entry, RefFile *f_img,
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBRVTH_BANK_INIT_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* disc_header.hpp: Read a GCN/Wii disc header and determine its type. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_DISC_HEADER_H__
#define __RVTHTOOL_LIBRVTH_DISC_HEADER_H__
#pragma once
#include "libwiicrypto/common.h"
@ -49,5 +48,3 @@ int rvth_disc_header_identify(const struct _GCN_DiscHeader *discHeader);
*/
int rvth_disc_header_get(RefFile *f_img, uint32_t lba_start,
struct _GCN_DiscHeader *discHeader, bool *pIsDeleted);
#endif /* __RVTHTOOL_LIBRVTH_DISC_HEADER_H__ */

View File

@ -2,7 +2,7 @@
* RVT-H Tool (librvth) *
* nhcd_structs.h: RVT-H data structures. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
@ -13,8 +13,7 @@
// rvth.h contains "RVTH_" high-level structs, which should
// be used by the application.
#ifndef __RVTHTOOL_LIBRVTH_NHCD_STRUCTS_H__
#define __RVTHTOOL_LIBRVTH_NHCD_STRUCTS_H__
#pragma once
#include <stdint.h>
#include "libwiicrypto/common.h"
@ -159,5 +158,3 @@ ASSERT_STRUCT(NHCD_BankTable, 512*9);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBRVTH_NHCD_STRUCTS_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* ptbl.h: Load and manage a Wii disc's partition tables. *
* *
* Copyright (c) 2018 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_PTBL_H__
#define __RVTHTOOL_LIBRVTH_PTBL_H__
#pragma once
#include "rvth.hpp"
#include <stdint.h>
@ -79,5 +78,3 @@ const pt_entry_t *rvth_ptbl_find_game(RvtH_BankEntry *entry);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBRVTH_PTBL_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* query.h: Query storage devices. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_QUERY_H__
#define __RVTHTOOL_LIBRVTH_QUERY_H__
#pragma once
#include <stdint.h>
#include "tcharx.h"
@ -139,5 +138,3 @@ void rvth_listener_stop(RvtH_ListenForDevices *listener);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBRVTH_QUERY_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* CisoReader.hpp: CISO disc image reader class. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_READER_CISOREADER_HPP__
#define __RVTHTOOL_LIBRVTH_READER_CISOREADER_HPP__
#pragma once
#include "Reader.hpp"
@ -72,5 +71,3 @@ class CisoReader : public Reader
// 0xFFFF == empty block.
uint16_t m_blockMap[CISO_MAP_SIZE];
};
#endif /* __RVTHTOOL_LIBRVTH_READER_CISOREADER_HPP__ */

View File

@ -3,12 +3,11 @@
* PlainReader.hpp: Plain disc image reader class. *
* Used for plain binary disc images, e.g. .gcm and RVT-H images. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_READER_PLAINREADER_HPP__
#define __RVTHTOOL_LIBRVTH_READER_PLAINREADER_HPP__
#pragma once
#include "Reader.hpp"
@ -52,13 +51,3 @@ class PlainReader : public Reader
*/
uint32_t write(const void *ptr, uint32_t lba_start, uint32_t lba_len) final;
};
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBRVTH_READER_PLAINREADER_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* Reader.hpp: Disc image reader base class. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_READER_READER_HPP__
#define __RVTHTOOL_LIBRVTH_READER_READER_HPP__
#pragma once
#include "libwiicrypto/common.h"
#include "RefFile.hpp"
@ -140,5 +139,3 @@ class Reader
struct Reader;
typedef struct Reader Reader;
#endif /* __cplusplus */
#endif /* __RVTHTOOL_LIBRVTH_READER_READER_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* WbfsReader.hpp: WBFS disc image reader class. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_READER_WBFSREADER_HPP__
#define __RVTHTOOL_LIBRVTH_READER_WBFSREADER_HPP__
#pragma once
#include "Reader.hpp"
@ -74,5 +73,3 @@ class WbfsReader : public Reader
const be16_t *m_wlba_table; // Pointer to m_wbfs_disc->disc->header->wlba_table.
};
#endif /* __RVTHTOOL_LIBRVTH_READER_WBFSREADER_HPP__ */

View File

@ -6,8 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_RVTH_HPP__
#define __RVTHTOOL_LIBRVTH_RVTH_HPP__
#pragma once
#include "libwiicrypto/common.h"
#include "libwiicrypto/gcn_structs.h"
@ -438,5 +437,3 @@ public:
};
#endif /* __cplusplus */
#endif /* __RVTHTOOL_LIBRVTH_RVTH_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* rvth_time.h: RVT-H timestamp functions. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBRVTH_RVTH_TIME_H__
#define __RVTHTOOL_LIBRVTH_RVTH_TIME_H__
#pragma once
#include "time_r.h"
@ -34,5 +33,3 @@ int rvth_timestamp_create(char *buf, size_t size, time_t now);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBRVTH_RVTH_TIME_H__ */

View File

@ -2,14 +2,13 @@
* RVT-H Tool (libwiicrypto) *
* aesw.h: AES wrapper functions. *
* *
* Copyright (c) 2018 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
// NOTE: Currently only supports AES-128-CBC.
#ifndef __RVTHTOOL_LIBWIICRYPTO_AESW_H__
#define __RVTHTOOL_LIBWIICRYPTO_AESW_H__
#pragma once
#include <stdint.h>
#include <stddef.h>
@ -72,5 +71,3 @@ size_t aesw_decrypt(AesCtx *aesw, uint8_t *pData, size_t size);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_AESW_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* byteorder.h: System byte order header. *
* *
* Copyright (c) 2011-2018 by David Korth. *
* Copyright (c) 2011-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_BYTEORDER_H__
#define __RVTHTOOL_LIBWIICRYPTO_BYTEORDER_H__
#pragma once
/**
* Check the system byte order.
@ -59,5 +58,3 @@
#undef SYS_IS_PDP_ENDIAN
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_BYTEORDER_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* byteswap.h: Byteswapping functions. *
* *
* Copyright (c) 2008-2018 by David Korth. *
* Copyright (c) 2008-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_BYTESWAP_H__
#define __RVTHTOOL_LIBWIICRYPTO_BYTESWAP_H__
#pragma once
// C includes.
#include <stdint.h>
@ -25,7 +24,7 @@
/* `inline` might not be defined in older versions. */
#if !defined(__cplusplus) && !defined(inline)
# define inline __inline
# define inline __inline
#endif /* !__cplusplus && !inline */
#elif defined(__GNUC__)
@ -90,16 +89,14 @@
// Intrinsics cannot be used as constants on MSVC 2010.
// TODO: Maybe it's fixed in later versions?
#if SYS_BYTEORDER == SYS_LIL_ENDIAN
# ifdef _MSC_VER
# define BE32_CONST(x) \
# ifdef _MSC_VER
# define BE32_CONST(x) \
((uint32_t)(((x) << 24) | ((x) >> 24) | \
(((x) & 0x0000FF00UL) << 8) | \
(((x) & 0x00FF0000UL) >> 8)))
# else /* !_MSC_VER */
# define BE32_CONST(x) __swab32(x)
# endif
# else /* !_MSC_VER */
# define BE32_CONST(x) __swab32(x)
# endif
#else /* SYS_BYTEORDER == SYS_BIG_ENDIAN */
# define BE32_CONST(x) (x)
# define BE32_CONST(x) (x)
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_BYTESWAP_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* cert.h: Certificate management. *
* *
* Copyright (c) 2018 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_CERT_H__
#define __RVTHTOOL_LIBWIICRYPTO_CERT_H__
#pragma once
#include <stdint.h>
#include <stddef.h>
@ -126,5 +125,3 @@ int cert_realsign_ticketOrTMD(uint8_t *data, size_t size, const RSA2048PrivateKe
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_CERT_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* cert_store.h: Certificate store. *
* *
* Copyright (c) 2018 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_CERT_STORE_H__
#define __RVTHTOOL_LIBWIICRYPTO_CERT_STORE_H__
#pragma once
#include <stdint.h>
#include "common.h"
@ -360,5 +359,3 @@ ASSERT_STRUCT(RVL_Cert_RSA2048_ECC, 0x240);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_CERT_STORE_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* common.h: Common types and macros. *
* *
* Copyright (c) 2016-2018 by David Korth. *
* Copyright (c) 2016-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_COMMON_H__
#define __RVTHTOOL_LIBWIICRYPTO_COMMON_H__
#pragma once
/**
* Number of elements in an array.
@ -23,9 +22,9 @@
// PACKED struct attribute.
// Use in conjunction with #pragma pack(1).
#ifdef __GNUC__
#define PACKED __attribute__((packed))
# define PACKED __attribute__((packed))
#else
#define PACKED
# define PACKED
#endif
/**
@ -34,15 +33,15 @@
*/
// TODO: Check MSVC support for static_assert() in C mode.
#ifndef ASSERT_STRUCT
# if defined(__cplusplus)
# define ASSERT_STRUCT(st,sz) enum { st##_SIZE = (sz), }; \
# if defined(__cplusplus)
# define ASSERT_STRUCT(st,sz) enum { st##_SIZE = (sz), }; \
static_assert(sizeof(st)==(sz),#st " is not " #sz " bytes.")
# elif defined(__GNUC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
# define ASSERT_STRUCT(st,sz) enum { st##_SIZE = (sz), }; \
# elif defined(__GNUC__) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
# define ASSERT_STRUCT(st,sz) enum { st##_SIZE = (sz), }; \
_Static_assert(sizeof(st)==(sz),#st " is not " #sz " bytes.")
# else
# define ASSERT_STRUCT(st, sz)
# endif
# else
# define ASSERT_STRUCT(st, sz)
# endif
#endif
// rvthtool equivalent of Q_UNUSED().
@ -50,55 +49,55 @@
// rvthtool equivalent of Q_DISABLE_COPY().
#ifdef __cplusplus
# if __cplusplus >= 201103L
# define DISABLE_COPY(klass) \
# if __cplusplus >= 201103L
# define DISABLE_COPY(klass) \
klass(const klass &) = delete; \
klass &operator=(const klass &) = delete;
# else /* __cplusplus < 201103L */
# define DISABLE_COPY(klass) \
# else /* __cplusplus < 201103L */
# define DISABLE_COPY(klass) \
klass(const klass &); \
klass &operator=(const klass &);
# endif /* __cplusplus >= 201103L */
# endif /* __cplusplus >= 201103L */
#endif /* __cplusplus */
// Deprecated function attribute.
#ifndef DEPRECATED
# if defined(__GNUC__)
# define DEPRECATED __attribute__ ((deprecated))
# elif defined(_MSC_VER)
# define DEPRECATED __declspec(deprecated)
# else
# define DEPRECATED
# endif
# if defined(__GNUC__)
# define DEPRECATED __attribute__ ((deprecated))
# elif defined(_MSC_VER)
# define DEPRECATED __declspec(deprecated)
# else
# define DEPRECATED
# endif
#endif
// Force inline attribute.
#if !defined(FORCEINLINE)
# if (!defined(_DEBUG) || defined(NDEBUG))
# if defined(__GNUC__)
# define FORCEINLINE inline __attribute__((always_inline))
# elif defined(_MSC_VER)
# define FORCEINLINE __forceinline
# if (!defined(_DEBUG) || defined(NDEBUG))
# if defined(__GNUC__)
# define FORCEINLINE inline __attribute__((always_inline))
# elif defined(_MSC_VER)
# define FORCEINLINE __forceinline
# else
# define FORCEINLINE inline
# endif
# else
# define FORCEINLINE inline
# ifdef _MSC_VER
# define FORCEINLINE __inline
# else
# define FORCEINLINE inline
# endif
# endif
# else
# ifdef _MSC_VER
# define FORCEINLINE __inline
# else
# define FORCEINLINE inline
# endif
# endif
#endif /* !defined(FORCEINLINE) */
// gcc branch prediction hints.
// Should be used in combination with profile-guided optimization.
#ifdef __GNUC__
# define likely(x) __builtin_expect(!!(x), 1)
# define unlikely(x) __builtin_expect(!!(x), 0)
# define likely(x) __builtin_expect(!!(x), 1)
# define unlikely(x) __builtin_expect(!!(x), 0)
#else
# define likely(x) x
# define unlikely(x) x
# define likely(x) x
# define unlikely(x) x
#endif
// C99 restrict macro.
@ -109,7 +108,7 @@
// typeof() for MSVC.
// FIXME: Doesn't work in C mode.
#if defined(_MSC_VER) && defined(__cplusplus)
# define __typeof__(x) decltype(x)
# define __typeof__(x) decltype(x)
#endif
/**
@ -119,9 +118,9 @@
*/
// FIXME: No __typeof__ in MSVC's C mode...
#if defined(_MSC_VER) && !defined(__cplusplus)
# define ALIGN_BYTES(a, x) (((x)+((a)-1)) & ~((uint64_t)((a)-1)))
# define ALIGN_BYTES(a, x) (((x)+((a)-1)) & ~((uint64_t)((a)-1)))
#else
# define ALIGN_BYTES(a, x) (((x)+((a)-1)) & ~((__typeof__(x))((a)-1)))
# define ALIGN_BYTES(a, x) (((x)+((a)-1)) & ~((__typeof__(x))((a)-1)))
#endif
/**
@ -130,15 +129,13 @@
#define ASSERT_ALIGNMENT(a, ptr) assert(reinterpret_cast<uintptr_t>(ptr) % 16 == 0);
#ifdef _MSC_VER
# define RVTH_CDECL __cdecl
# define RVTH_CDECL __cdecl
#else
# define RVTH_CDECL
# define RVTH_CDECL
#endif
#ifdef _WIN32
# define DIR_SEP_CHR _T('\\')
# define DIR_SEP_CHR _T('\\')
#else /* !_WIN32 */
# define DIR_SEP_CHR _T('/')
# define DIR_SEP_CHR _T('/')
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_COMMON_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* priv_key_store.h: Private key store. *
* *
* Copyright (c) 2018 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_PRIV_KEY_STORE_H__
#define __RVTHTOOL_LIBWIICRYPTO_PRIV_KEY_STORE_H__
#pragma once
#include <stdint.h>
#include "rsaw.h"
@ -29,5 +28,3 @@ extern const RSA2048PrivateKey rvth_privkey_WUP_dpki_tmd;
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_PRIV_KEY_STORE_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* rsaw.h: RSA encryption wrapper functions. *
* *
* Copyright (c) 2018 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_RSAW_H__
#define __RVTHTOOL_LIBWIICRYPTO_RSAW_H__
#pragma once
#include <stdint.h>
#include <stddef.h>
@ -76,5 +75,3 @@ int rsaw_rsa2048_sign(uint8_t *buf, size_t buf_size,
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_RSAW_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* sig_tools.h: Simplified signature handling. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_SIG_TOOLS_H__
#define __RVTHTOOL_LIBWIICRYPTO_SIG_TOOLS_H__
#pragma once
#include "wii_structs.h"
#include "wiiu_structs.h"
@ -135,5 +134,3 @@ static inline int sig_recrypt_ticket_WUP(WUP_Ticket *ticket, RVL_AES_Keys_e toKe
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_SIG_TOOLS_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* title_key.h: Title key management. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_TITLE_KEY_H__
#define __RVTHTOOL_LIBWIICRYPTO_TITLE_KEY_H__
#pragma once
#include "wii_structs.h"
@ -29,5 +28,3 @@ int decrypt_title_key(const RVL_Ticket *ticket, uint8_t *titleKey, uint8_t *cryp
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_TITLE_KEY_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* wii_sector.cpp: Wii sector layout structures. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_WII_SECTOR_H__
#define __RVTHTOOL_LIBWIICRYPTO_WII_SECTOR_H__
#pragma once
#include <stdint.h>
#include "common.h"
@ -81,5 +80,3 @@ typedef struct _Wii_Disc_Sector_t {
uint8_t data[31*1024];
} Wii_Disc_Sector_t;
ASSERT_STRUCT(Wii_Disc_Sector_t, 32*1024);
#endif /* __RVTHTOOL_LIBWIICRYPTO_WII_SECTOR_H__ */

View File

@ -2,25 +2,24 @@
* RVT-H Tool (libwiicrypto) *
* Win32_sdk.h: Windows SDK defines and includes. *
* *
* Copyright (c) 2009-2018 by David Korth. *
* Copyright (c) 2009-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_WIN32_SDK_H__
#define __RVTHTOOL_LIBWIICRYPTO_WIN32_SDK_H__
#pragma once
// Show a warning if one of the macros isn't defined in CMake.
#ifndef WINVER
# pragma message("WINVER not defined; defaulting to 0x0500.")
# define WINVER 0x0500
# pragma message("WINVER not defined; defaulting to 0x0500.")
# define WINVER 0x0500
#endif
#ifndef _WIN32_WINNT
# pragma message("_WIN32_WINNT not defined; defaulting to 0x0500.")
# define _WIN32_WINNT 0x0500
# pragma message("_WIN32_WINNT not defined; defaulting to 0x0500.")
# define _WIN32_WINNT 0x0500
#endif
#ifndef _WIN32_IE
# pragma message("_WIN32_IE not defined; defaulting to 0x0500.")
# define _WIN32_IE 0x0500
# pragma message("_WIN32_IE not defined; defaulting to 0x0500.")
# define _WIN32_IE 0x0500
#endif
// Define this symbol to get XP themes. See:
@ -90,23 +89,23 @@ static inline ULONG InterlockedDecrement(ULONG volatile *Addend)
// UUID attribute.
#ifdef _MSC_VER
# define UUID_ATTR(str) __declspec(uuid(str))
# define UUID_ATTR(str) __declspec(uuid(str))
#else /* !_MSC_VER */
// UUID attribute is not supported by gcc-5.2.0.
# define UUID_ATTR(str)
# define UUID_ATTR(str)
#endif /* _MSC_VER */
// SAL 1.0 annotations not supported by MinGW-w64 5.0.1.
#ifndef __out_opt
# define __out_opt
# define __out_opt
#endif
// SAL 2.0 annotations not supported by MSVC 2010.
#ifndef _COM_Outptr_
# define _COM_Outptr_
# define _COM_Outptr_
#endif
#ifndef _Outptr_
# define _Outptr_
# define _Outptr_
#endif
// Current image instance.
@ -114,5 +113,3 @@ static inline ULONG InterlockedDecrement(ULONG volatile *Addend)
// Reference: https://blogs.msdn.microsoft.com/oldnewthing/20041025-00/?p=37483
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase)
#endif /* __RVTHTOOL_LIBWIICRYPTO_WIN32_SDK_H__ */

View File

@ -2,12 +2,13 @@
* RVT-H Tool (libwiicrypto) *
* secoptions.h: Security options for executables. *
* *
* Copyright (c) 2016-2018 by David Korth. *
* Copyright (c) 2016-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_WIN32_SECOPTIONS_H__
#define __RVTHTOOL_LIBWIICRYPTO_WIN32_SECOPTIONS_H__
#pragma once
#define __RVTHTOOL_LIBWIICRYPTO_WIN32_SECOPTIONS_H__ 1
#include "Win32_sdk.h"
#include "sdkddkver.h"
@ -24,10 +25,10 @@ extern "C" {
// DEP policy. (Vista SP1; later backported to XP SP3)
typedef BOOL (WINAPI *PFNSETPROCESSDEPPOLICY)(_In_ DWORD dwFlags);
#ifndef PROCESS_DEP_ENABLE
#define PROCESS_DEP_ENABLE 0x1
# define PROCESS_DEP_ENABLE 0x1
#endif
#ifndef PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION
#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x2
# define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x2
#endif
// SetDllDirectory() (Win2003; later backported to XP SP1)
@ -36,19 +37,19 @@ typedef BOOL (WINAPI *PFNSETDLLDIRECTORYW)(_In_opt_ LPCWSTR lpPathName);
// SetDefaultDllDirectories() (Win8; later backported to Vista and Win7)
typedef BOOL (WINAPI *PFNSETDEFAULTDLLDIRECTORIES)(_In_ DWORD DirectoryFlags);
#ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR
#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
# define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100
#endif
#ifndef LOAD_LIBRARY_SEARCH_APPLICATION_DIR
#define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200
# define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200
#endif
#ifndef LOAD_LIBRARY_SEARCH_USER_DIRS
#define LOAD_LIBRARY_SEARCH_USER_DIRS 0x00000400
# define LOAD_LIBRARY_SEARCH_USER_DIRS 0x00000400
#endif
#ifndef LOAD_LIBRARY_SEARCH_SYSTEM32
#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800
# define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800
#endif
#ifndef LOAD_LIBRARY_SEARCH_DEFAULT_DIRS
#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
# define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000
#endif
// HeapSetInformation() (WinXP)
@ -64,11 +65,11 @@ typedef BOOL (WINAPI *PFNHEAPSETINFORMATION)
typedef BOOL (WINAPI *PFNSETPROCESSMITIGATIONPOLICY)(_In_ PROCESS_MITIGATION_POLICY MitigationPolicy, _In_ PVOID lpBuffer, _In_ SIZE_T dwLength);
#ifndef INLINE
#ifdef _MSC_VER
#define INLINE __inline
#else /* !_MSC_VER */
#define INLINE inline
#endif /* _MSC_VER */
# ifdef _MSC_VER
# define INLINE __inline
# else /* !_MSC_VER */
# define INLINE inline
# endif /* _MSC_VER */
#endif /* !INLINE */
/**
@ -231,5 +232,3 @@ static INLINE int secoptions_init(void)
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_LIBWIICRYPTO_SECOPTIONS_H__ */

View File

@ -2,21 +2,20 @@
* RVT-H Tool (libwiicrypto) *
* secoptions_win8.h: Security options for executables. (Win8) *
* *
* Copyright (c) 2016-2018 by David Korth. *
* Copyright (c) 2016-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_WIN32_SECOPTIONS_WIN8_H__
#define __RVTHTOOL_LIBWIICRYPTO_WIN32_SECOPTIONS_WIN8_H__
#pragma once
#ifndef __RVTHTOOL_LIBWIICRYPTO_WIN32_SECOPTIONS_H__
#error secoptions_win8.h should not be included directly - include secoptions.h instead
# error secoptions_win8.h should not be included directly - include secoptions.h instead
#endif
/* NOTE: MinGW-w64 v5.0.3 has ProcessDynamicCodePolicy
* defined as ProcessReserved1MitigationPolicy. */
#ifdef __GNUC__
#define ProcessDynamicCodePolicy ProcessReserved1MitigationPolicy
# define ProcessDynamicCodePolicy ProcessReserved1MitigationPolicy
#endif
/**
@ -173,5 +172,3 @@ typedef struct _PROCESS_MITIGATION_IMAGE_LOAD_POLICY {
} DUMMYUNIONNAME;
} PROCESS_MITIGATION_IMAGE_LOAD_POLICY, *PPROCESS_MITIGATION_IMAGE_LOAD_POLICY;
#endif /* !_WIN32_WINNT_WIN10 */
#endif /* __RVTHTOOL_LIBWIICRYPTO_SECOPTIONS_WIN8_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (libwiicrypto) *
* w32time.h: Windows time conversion functions. *
* *
* Copyright (c) 2016-2022 by David Korth. *
* Copyright (c) 2016-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_LIBWIICRYPTO_WIN32_W32TIME_H__
#define __RVTHTOOL_LIBWIICRYPTO_WIN32_W32TIME_H__
#pragma once
#ifndef _WIN32
# error w32time.h is Windows only
@ -74,5 +73,3 @@ static inline int64_t SystemTimeToUnixTime(_In_ const SYSTEMTIME *pSystemTime)
SystemTimeToFileTime(pSystemTime, &fileTime);
return FileTimeToUnixTime(&fileTime);
}
#endif /* __RVTHTOOL_LIBWIICRYPTO_WIN32_W32TIME_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool: NUS Resigner *
* print-info.hpp: Print NUS information. *
* *
* Copyright (c) 2018-2020 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_NUSRESIGN_PRINT_INFO_HPP__
#define __RVTHTOOL_NUSRESIGN_PRINT_INFO_HPP__
#pragma once
#include <stdint.h>
#include <stdio.h>
@ -33,5 +32,3 @@ int print_nus_info(const TCHAR *nus_dir, bool verify);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_NUSRESIGN_PRINT_INFO_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool: WAD Resigner *
* resign-wad.hpp: Re-sign a WAD file. *
* *
* Copyright (c) 2018-2020 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_NUSRESIGN_RESIGN_NUS_HPP__
#define __RVTHTOOL_NUSRESIGN_RESIGN_NUS_HPP__
#pragma once
#include "tcharx.h"
#include <stdint.h>
@ -27,5 +26,3 @@ int resign_nus(const TCHAR *nus_dir, int recrypt_key);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_NUSRESIGN_RESIGN_NUS_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* MessageSound.hpp: Message sound effects abstraction class. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_MESSAGESOUND_HPP__
#define __RVTHTOOL_QRVTHTOOL_MESSAGESOUND_HPP__
#pragma once
#include <QtWidgets/QMessageBox>
@ -28,5 +27,3 @@ class MessageSound
*/
static void play(QMessageBox::Icon notificationType, const QString &message = QString(), QWidget *parent = nullptr);
};
#endif /* __RVTHTOOL_QRVTHTOOL_MESSAGESOUND_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* RvtHModel.hpp: QAbstractListModel for RvtH objects. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_RVTHMODEL_HPP__
#define __RVTHTOOL_QRVTHTOOL_RVTHMODEL_HPP__
#pragma once
class RvtH;
@ -100,5 +99,3 @@ class RvtHModel : public QAbstractListModel
*/
void forceBankUpdate(unsigned int bank);
};
#endif /* __RVTHTOOL_QRVTHTOOL_RVTHMODEL_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* RvtHSortFilterProxyModel.hpp: RvtHModel sort filter proxy. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_RVTHSORTFILTERPROXYMODEL_HPP__
#define __RVTHTOOL_QRVTHTOOL_RVTHSORTFILTERPROXYMODEL_HPP__
#pragma once
#include <QtCore/QSortFilterProxyModel>
@ -26,5 +25,3 @@ class RvtHSortFilterProxyModel : public QSortFilterProxyModel
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const final;
bool lessThan(const QModelIndex &left, const QModelIndex &right) const final;
};
#endif /* __RVTHTOOL_QRVTHTOOL_RVTHSORTFILTERPROXYMODEL_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* DockManager.cpp: DockManager D-Bus implementation. *
* *
* Copyright (c) 2013-2019 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_DOCKMANAGER_HPP__
#define __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_DOCKMANAGER_HPP__
#pragma once
#include "TaskbarButtonManager.hpp"
@ -59,5 +58,3 @@ class DockManager : public TaskbarButtonManager
*/
void setWindow_timer_slot(void);
};
#endif /* __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_DOCKMANAGER_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* TaskbarButtonManager.hpp: Taskbar button manager base class. *
* *
* Copyright (c) 2013-2019 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGER_HPP__
#define __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGER_HPP__
#pragma once
#include <QtCore/QObject>
#include <QWidget>
@ -95,5 +94,3 @@ class TaskbarButtonManager : public QObject
*/
void windowDestroyed_slot(QObject *obj);
};
#endif /* __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGER_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* TaskbarButtonManagerFactory.hpp: TaskbarButtonManager factory class. *
* *
* Copyright (c) 2015-2019 by David Korth. *
* Copyright (c) 2015-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGERFACTORY_HPP__
#define __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGERFACTORY_HPP__
#pragma once
// for Q_DISABLE_COPY()
#include <QtCore/qglobal.h>
@ -30,5 +29,3 @@ class TaskbarButtonManagerFactory
*/
static TaskbarButtonManager *createManager(QObject *parent = nullptr);
};
#endif /* __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGERFACTORY_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* TaskbarButtonManager_p.hpp: Taskbar button manager base class. (PRIVATE)*
* *
* Copyright (c) 2013-2019 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGER_P_HPP__
#define __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGER_P_HPP__
#pragma once
#include "TaskbarButtonManager.hpp"
@ -31,5 +30,3 @@ class TaskbarButtonManagerPrivate
int progressBarValue; // Current progress. (-1 for no bar)
int progressBarMax; // Maximum progress.
};
#endif /* __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_TASKBARBUTTONMANAGER_P_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* UnityLauncher.cpp: Unity Launcher implementation. *
* *
* Copyright (c) 2013-2019 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_UNITYLAUNCHER_HPP__
#define __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_UNITYLAUNCHER_HPP__
#pragma once
#include "TaskbarButtonManager.hpp"
@ -51,5 +50,3 @@ class UnityLauncher : public TaskbarButtonManager
*/
void update(void) final;
};
#endif /* __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_UNITYLAUNCHER_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* Win7TaskbarList.hpp: Windows 7 ITaskBarList3 implementation. *
* *
* Copyright (c) 2013-2019 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_WIN7TASKBARLIST_HPP__
#define __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_WIN7TASKBARLIST_HPP__
#pragma once
#include "TaskbarButtonManager.hpp"
@ -51,5 +50,3 @@ class Win7TaskbarList : public TaskbarButtonManager
*/
void update(void) final;
};
#endif /* __RVTHTOOL_QRVTHTOOL_TASKBARBUTTONMANAGER_WIN7TASKBARLIST_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* TranslationManager.hpp: Qt translation manager. *
* *
* Copyright (c) 2014-2018 by David Korth. *
* Copyright (c) 2014-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_TRANSLATIONMANAGER_HPP__
#define __RVTHTOOL_QRVTHTOOL_TRANSLATIONMANAGER_HPP__
#pragma once
// Qt includes.
#include <QtCore/QObject>
@ -50,5 +49,3 @@ class TranslationManager : public QObject
*/
QMap<QString, QString> enumerate(void) const;
};
#endif /* __RVTHTOOL_QRVTHTOOL_TRANSLATIONMANAGER_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* WorkerObject.hpp: Worker object for extract/import/etc. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WORKEROBJECT_HPP__
#define __RVTHTOOL_QRVTHTOOL_WORKEROBJECT_HPP__
#pragma once
// librvth
#include "librvth/rvth.hpp"
@ -154,5 +153,3 @@ class WorkerObject : public QObject
*/
void doImport(void);
};
#endif /* __RVTHTOOL_QRVTHTOOL_WORKEROBJECT_HPP__ */

View File

@ -2,14 +2,11 @@
* RVT-H Tool (qrvthtool) *
* resource.h: Win32 resource script. *
* *
* Copyright (c) 2016-2018 by David Korth. *
* Copyright (c) 2016-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_RESOURCES_WIN32_RESOURCE_H__
#define __RVTHTOOL_QRVTHTOOL_RESOURCES_WIN32_RESOURCE_H__
#pragma once
/** Icons. **/
#define IDI_QRVTHTOOL 1
#endif /* __RVTHTOOL_QRVTHTOOL_RESOURCES_WIN32_RESOURCE_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* BankEntryView.hpp: Bank Entry view widget. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WIDGETS_BANKENTRYVIEW_HPP__
#define __RVTHTOOL_QRVTHTOOL_WIDGETS_BANKENTRYVIEW_HPP__
#pragma once
#include <QWidget>
@ -54,5 +53,3 @@ class BankEntryView : public QWidget
// State change event. (Used for switching the UI language at runtime.)
void changeEvent(QEvent *event) final;
};
#endif /* __RVTHTOOL_QRVTHTOOL_WIDGETS_BANKENTRYVIEW_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* LanguageMenu.hpp: QMenu subclass for selecting a UI language. *
* *
* Copyright (c) 2012-2019 by David Korth. *
* Copyright (c) 2012-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WIDGETS_LANGUAGEMENU_HPP__
#define __RVTHTOOL_QRVTHTOOL_WIDGETS_LANGUAGEMENU_HPP__
#pragma once
#include <QMenu>
@ -60,5 +59,3 @@ class LanguageMenu : public QMenu
*/
void changeEvent(QEvent *event) final;
};
#endif /* __RVTHTOOL_QRVTHTOOL_WIDGETS_LANGUAGEMENU_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* MessageWidget.hpp: Message widget. *
* *
* Copyright (c) 2014-2019 by David Korth. *
* Copyright (c) 2014-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WIDGETS_MESSAGEWIDGET_HPP__
#define __RVTHTOOL_QRVTHTOOL_WIDGETS_MESSAGEWIDGET_HPP__
#pragma once
#include <QWidget>
@ -107,5 +106,3 @@ class MessageWidget : public QWidget
*/
void dismissed(bool timeout);
};
#endif /* __RVTHTOOL_QRVTHTOOL_WIDGETS_MESSAGEWIDGET_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* MessageWidgetStack.hpp: Message widget stack. *
* *
* Copyright (c) 2014-2019 by David Korth. *
* Copyright (c) 2014-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WIDGETS_MESSAGEWIDGETSTACK_HPP__
#define __RVTHTOOL_QRVTHTOOL_WIDGETS_MESSAGEWIDGETSTACK_HPP__
#pragma once
#include <QWidget>
#include "MessageWidget.hpp"
@ -45,5 +44,3 @@ class MessageWidgetStack : public QWidget
*/
void messageWidget_destroyed_slot(QObject *obj);
};
#endif /* __RVTHTOOL_QRVTHTOOL_WIDGETS_MESSAGEWIDGETSTACK_HPP__ */

View File

@ -3,14 +3,13 @@
* QItemView_text.hpp: QItemView subclasses that show a message if no *
* items are present. *
* *
* Copyright (c) 2013-2022 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
// Reference: https://stackoverflow.com/questions/20765547/qlistview-show-text-when-list-is-empty
#ifndef __RVTHTOOL_QRVTHTOOL_WIDGETS_QITEMVIEW_TEXT_HPP__
#define __RVTHTOOL_QRVTHTOOL_WIDGETS_QITEMVIEW_TEXT_HPP__
#pragma once
#include <QListView>
#include <QListWidget>
@ -146,5 +145,3 @@ class QTreeWidget_Text : public QTreeWidget
inline QStyleOptionViewItem::Position decorationPosition(void) const { return m_decorationPosition; }
void setDecorationPosition(QStyleOptionViewItem::Position position);
};
#endif /* __RVTHTOOL_QRVTHTOOL_WIDGETS_QITEMVIEW_TEXT_HPP__ */

View File

@ -3,12 +3,11 @@
* QTreeViewOpt.hpp: QTreeView with drawing optimizations. *
* Specifically, don't update rows that are offscreen. *
* *
* Copyright (c) 2013-2019 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WIDGETS_QTREEVIEWOPT_HPP__
#define __RVTHTOOL_QRVTHTOOL_WIDGETS_QTREEVIEWOPT_HPP__
#pragma once
// Qt includes and classes.
#include <QTreeView>
@ -34,5 +33,3 @@ class QTreeViewOpt : public QTreeView
protected slots:
void showColumnContextMenu(const QPoint &point);
};
#endif /* __RVTHTOOL_QRVTHTOOL_WIDGETS_QTREEVIEWOPT_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* AboutDialog.hpp: About Dialog. *
* *
* Copyright (c) 2013-2019 by David Korth. *
* Copyright (c) 2013-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WINDOWS_ABOUTDIALOG_HPP__
#define __RVTHTOOL_QRVTHTOOL_WINDOWS_ABOUTDIALOG_HPP__
#pragma once
#include <QDialog>
@ -34,5 +33,3 @@ class AboutDialog : public QDialog
// State change event. (Used for switching the UI language at runtime.)
void changeEvent(QEvent *event) final;
};
#endif /* __RVTHTOOL_QRVTHTOOL_WINDOWS_ABOUTDIALOG_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* QRvtHToolWindow.hpp: Main window. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WINDOWS_QRVTHTOOLWINDOW_HPP__
#define __RVTHTOOL_QRVTHTOOL_WINDOWS_QRVTHTOOLWINDOW_HPP__
#pragma once
class QItemSelection;
#include <QMainWindow>
@ -112,5 +111,3 @@ class QRvtHToolWindow : public QMainWindow
*/
void btnCancel_clicked(void);
};
#endif /* __RVTHTOOL_QRVTHTOOL_WINDOWS_QRVTHTOOLWINDOW_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (qrvthtool) *
* SelectDeviceDialog.hpp: Select an RVT-H Reader device. *
* *
* Copyright (c) 2018-2019 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_QRVTHTOOL_WINDOWS_SELECTDEVICEDIALOG_HPP__
#define __RVTHTOOL_QRVTHTOOL_WINDOWS_SELECTDEVICEDIALOG_HPP__
#pragma once
#include <QDialog>
#include <QItemSelection>
@ -149,5 +148,3 @@ class SelectDeviceDialog : public QDialog
*/
void deviceStateChanged(const DeviceQueryData &queryData, RvtH_Listen_State_e state);
};
#endif /* __RVTHTOOL_QRVTHTOOL_WINDOWS_SELECTDEVICEDIALOG_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool *
* resource.common.inc.h: Common Win32 resource header. *
* *
* Copyright (c) 2016-2018 by David Korth. *
* Copyright (c) 2016-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_RESOURCE_COMMON_INC_H__
#define __RVTHTOOL_RESOURCE_COMMON_INC_H__
#pragma once
#ifndef RC_INVOKED
# error This file should only be included in Win32 resource scripts.
@ -48,5 +47,3 @@
#endif
#define RP_VS_FILEFLAGS (RP_VS_FF_DEBUG | RP_VS_FF_PRERELEASE)
#endif /* __RVTHTOOL_RESOURCE_COMMON_INC_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool *
* extract.h: Extract a bank from an RVT-H disk image. *
* *
* Copyright (c) 2018-2020 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_RVTHTOOL_EXTRACT_H__
#define __RVTHTOOL_RVTHTOOL_EXTRACT_H__
#pragma once
#include "tcharx.h"
@ -39,5 +38,3 @@ int import(const TCHAR *rvth_filename, const TCHAR *s_bank, const TCHAR *gcm_fil
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_RVTHTOOL_EXTRACT_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool *
* list-banks.h: List banks in an RVT-H disk image. *
* *
* Copyright (c) 2018-2020 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_RVTHTOOL_LIST_BANKS_H__
#define __RVTHTOOL_RVTHTOOL_LIST_BANKS_H__
#pragma once
#include "tcharx.h"
#include "librvth/rvth.hpp"
@ -36,5 +35,3 @@ int list_banks(const TCHAR *rvth_filename);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_RVTHTOOL_LIST_BANKS_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool *
* query.h: Query available RVT-H Reader devices. *
* *
* Copyright (c) 2018 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_RVTHTOOL_QUERY_H__
#define __RVTHTOOL_RVTHTOOL_QUERY_H__
#pragma once
#ifdef __cplusplus
extern "C" {
@ -22,5 +21,3 @@ int query(void);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_RVTHTOOL_QUERY_H__ */

View File

@ -3,7 +3,7 @@
* show-table.hpp: Print out the NHCD Bank Table for debugging an invalid *
* bank. *
* *
* Copyright (c) 2023 by David Korth. *
* Copyright (c) 2023-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/

View File

@ -2,12 +2,11 @@
* RVT-H Tool *
* undelete.h: Delete or undelete a bank in an RVT-H disk image. *
* *
* Copyright (c) 2018-2020 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_RVTHTOOL_UNDELETE_H__
#define __RVTHTOOL_RVTHTOOL_UNDELETE_H__
#pragma once
#include "tcharx.h"
@ -34,5 +33,3 @@ int undelete_bank(const TCHAR *rvth_filename, const TCHAR *s_bank);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_RVTHTOOL_UNDELETE_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool *
* verify.h: Verify a bank in an RVT-H disk image. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_RVTHTOOL_VERIFY_H__
#define __RVTHTOOL_RVTHTOOL_VERIFY_H__
#pragma once
#include "tcharx.h"
@ -26,5 +25,3 @@ int verify(const TCHAR *rvth_filename, const TCHAR *s_bank);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_RVTHTOOL_VERIFY_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool (librvth) *
* tcharx.h: TCHAR support for Windows and Linux. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_TCHAR_H__
#define __RVTHTOOL_TCHAR_H__
#pragma once
#ifdef _WIN32
@ -64,5 +63,3 @@ typedef char TCHAR;
#define _tcsrchr(s, c) strrchr((s), (c))
#endif /* _WIN32 */
#endif /* __RVTHTOOL_TCHAR_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool *
* time_r.h: Workaround for missing time functions. *
* *
* Copyright (c) 2017-2022 by David Korth. *
* Copyright (c) 2017-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_TIME_R_H__
#define __RVTHTOOL_TIME_R_H__
#pragma once
#include "config.libc.h"
@ -86,5 +85,3 @@ static inline time_t timegm(struct tm *tm)
#endif
}
#endif /* !HAVE_TIMEGM */
#endif /* __ROMPROPERTIES_TIME_R_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool: WAD Resigner *
* print-info.h: Print WAD information. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_WADRESIGN_PRINT_INFO_H__
#define __RVTHTOOL_WADRESIGN_PRINT_INFO_H__
#pragma once
#include <stdint.h>
#include <stdio.h>
@ -54,5 +53,3 @@ int print_wad_info(const TCHAR *wad_filename, bool verify);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_WADRESIGN_PRINT_INFO_H__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool: WAD Resigner *
* resign-wad.h: Re-sign a WAD file. *
* *
* Copyright (c) 2018-2022 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_WADRESIGN_RESIGN_WAD_HPP__
#define __RVTHTOOL_WADRESIGN_RESIGN_WAD_HPP__
#pragma once
#include "tcharx.h"
#include <stdint.h>
@ -37,5 +36,3 @@ int resign_wad(const TCHAR *src_wad, const TCHAR *dest_wad, int recrypt_key, int
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_WADRESIGN_RESIGN_WAD_HPP__ */

View File

@ -2,12 +2,11 @@
* RVT-H Tool: WAD Resigner *
* wad-fns.h: General WAD functions. *
* *
* Copyright (c) 2018-2020 by David Korth. *
* Copyright (c) 2018-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/
#ifndef __RVTHTOOL_WADRESIGN_WAD_FNS_H__
#define __RVTHTOOL_WADRESIGN_WAD_FNS_H__
#pragma once
#include <stdint.h>
@ -70,5 +69,3 @@ int getWadInfo_BWF(const Wii_WAD_Header_BWF *pWadHeader, WAD_Info_t *pWadInfo);
#ifdef __cplusplus
}
#endif
#endif /* __RVTHTOOL_WADRESIGN_PRINT_INFO_H__ */