mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 07:35:45 +01:00
remove atrb_* macros for the attributes, and replace with single-word, all uppercase versions.
improves briefity, and reduces confusion.
This commit is contained in:
@@ -57,13 +57,3 @@
|
|||||||
#define NONNULL(...)
|
#define NONNULL(...)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define atrb_deprecated DEPRECATED
|
|
||||||
#define atrb_used USED
|
|
||||||
#define atrb_unused UNUSED
|
|
||||||
#define atrb_pure PURE
|
|
||||||
#define atrb_const CONST
|
|
||||||
#define atrb_noreturn NORET
|
|
||||||
#define atrb_malloc MALLOC
|
|
||||||
#define atrb_format FORMAT
|
|
||||||
#define atrb_nonnull NONNULL
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ int conf_procval(struct conf_entry const *opt, char const *restrict val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* utility function for conf_getpat to concatenate 3 strings, where we already know the size */
|
/* utility function for conf_getpat to concatenate 3 strings, where we already know the size */
|
||||||
atrb_nonnull(1, 3) static char *conf_getpat_concat(char const *restrict s1, char const *restrict s2, char const *restrict s3, size_t s1len, size_t s2len, size_t s3len) {
|
NONNULL(1, 3) static char *conf_getpat_concat(char const *restrict s1, char const *restrict s2, char const *restrict s3, size_t s1len, size_t s2len, size_t s3len) {
|
||||||
assert(s2 || (!s2 && !s2len)); // ensuring the programmer passes both s2 and s2len as 0, if they intend to
|
assert(s2 || (!s2 && !s2len)); // ensuring the programmer passes both s2 and s2len as 0, if they intend to
|
||||||
char *buf, *ptr;
|
char *buf, *ptr;
|
||||||
|
|
||||||
|
|||||||
@@ -67,4 +67,4 @@ int conf_procval(struct conf_entry const *opts, const char *restrict val);
|
|||||||
* - windows: reads %APPDATA%, if empty %USERPROFILE%\AppData\Roaming is used, if both are empty NULL is returned.
|
* - windows: reads %APPDATA%, if empty %USERPROFILE%\AppData\Roaming is used, if both are empty NULL is returned.
|
||||||
* - osx: reads $HOME, uses $HOME/Library/Application Support, if $HOME is empty NULL is returned.
|
* - osx: reads $HOME, uses $HOME/Library/Application Support, if $HOME is empty NULL is returned.
|
||||||
* !! A malloc'd null-terminated string is returned !! */
|
* !! A malloc'd null-terminated string is returned !! */
|
||||||
atrb_malloc atrb_nonnull(1) char *conf_getpat(const char *);
|
MALLOC NONNULL((1)) char *conf_getpat(const char *);
|
||||||
|
|||||||
Reference in New Issue
Block a user