pmt: initial 2.7.0 update

This commit is contained in:
2024-08-02 17:44:31 +03:00
parent ed745369fa
commit 5d51e44a2c
31 changed files with 223 additions and 191 deletions

View File

@@ -19,9 +19,9 @@
#ifndef __PMT_DEPRECATED_H
#define __PMT_DEPRECATED_H
#include <sys/cdefs.h>
#include <pmt/ExternC.h>
__BEGIN_DECLS
PMT_EXTERN_C_BEGIN
#define deprecated_opt 1
#define changed_opt 2
@@ -41,6 +41,8 @@ __BEGIN_DECLS
#define v230 "2.3.0"
#define v240 "2.4.0"
#define v250 "2.5.0"
#define v260 "2.6.0"
#define v270 "2.7.0"
#define vUNK NULL
struct pmt_deprecates {
@@ -92,7 +94,7 @@ __deprecated_opt_handle(int opt, const char* opt_long, const char* depr_msg)
#define DEPR_HANDLE(x, y, z) __deprecated_opt_handle(x, y, z)
__END_DECLS
PMT_EXTERN_C_END
#endif

30
include/pmt/ExternC.h Executable file
View File

@@ -0,0 +1,30 @@
/* By YZBruh */
/**
* Copyright 2024 Partition Manager
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __PMT_EXTERN_C_H_
#define __PMT_EXTERN_C_H_
#ifdef __cplusplus
#define PMT_EXTERN_C_BEGIN extern "C" {
#define PMT_EXTERN_C_END }
#else
#define PMT_EXTERN_C_BEGIN
#define PMT_EXTERN_C_END
#endif
#endif

View File

@@ -19,11 +19,13 @@
#ifndef __PMT_HELP_MSGS_H
#define __PMT_HELP_MSGS_H
__BEGIN_DECLS
#include <pmt/ExternC.h>
PMT_EXTERN_C_BEGIN
void help(void);
__END_DECLS
PMT_EXTERN_C_END
#endif

View File

@@ -20,15 +20,13 @@
#error "Your compiler is NOT clang. Please build with LLVM clang."
#endif
#include <sys/cdefs.h>
#include <pmt/ExternC.h>
__BEGIN_DECLS
PMT_EXTERN_C_BEGIN
#ifndef __PMT_H_
#define __PMT_H_
#define PMT_PACKAGE_NAME "Partition Manager"
#ifdef INC_MAIN_LIBS
#include <stdio.h>
#include <stdbool.h>
@@ -118,6 +116,6 @@ void debug(LogLevel status, const char* _Nullable fmt, ...);
#endif
__END_DECLS
PMT_EXTERN_C_END
/* end of code */

View File

@@ -19,7 +19,9 @@
#ifndef __PMT_STRINGKEYS_
#define __PMT_STRINGKEYS_
__BEGIN_DECLS
#include <pmt/ExternC.h>
PMT_EXTERN_C_BEGIN
/* The struct is a very good option for setting the languages of texts etc. */
struct pmt_langdb_general {
@@ -112,7 +114,7 @@ struct pmt_langdb_langs {
const char* _Nullable lang_pr;
};
__END_DECLS
PMT_EXTERN_C_END
#endif /* __PMT_STRINGKEYS_ */

View File

@@ -19,7 +19,9 @@
#ifndef __PMT_VERSIONING_H
#define __PMT_VERSIONING_H
__BEGIN_DECLS
#include <pmt/ExternC.h>
PMT_EXTERN_C_BEGIN
#ifdef __NDK_BUILD
#include <android/ndk-version.h>
@@ -28,10 +30,10 @@ __BEGIN_DECLS
/* versioning */
#define PMT_MAJOR 2
#define PMT_MINOR 6
#define PMT_MINOR 7
#define PMT_PATCHLEVEL 0
__END_DECLS
PMT_EXTERN_C_END
#endif