From: anonymix007 <48598263+anonymix007@users.noreply.github.com> Date: Wed, 7 May 2025 15:01:07 +0000 (+0300) Subject: fundamental: Move common string constants from basic/string-util.h to string-util... X-Git-Tag: v258-rc1~668^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f504ce8407bdb251170496f4b12be48ef7c21e38;p=thirdparty%2Fsystemd.git fundamental: Move common string constants from basic/string-util.h to string-util-fundamental.h --- diff --git a/src/basic/string-util.h b/src/basic/string-util.h index 03bff1d5fc5..e00a5f59774 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -9,23 +9,6 @@ #include "macro.h" #include "string-util-fundamental.h" -/* What is interpreted as whitespace? */ -#define WHITESPACE " \t\n\r" -#define NEWLINE "\n\r" -#define QUOTES "\"\'" -#define COMMENTS "#;" -#define GLOB_CHARS "*?[" -#define DIGITS "0123456789" -#define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz" -#define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -#define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS -#define ALPHANUMERICAL LETTERS DIGITS -#define HEXDIGITS DIGITS "abcdefABCDEF" -#define LOWERCASE_HEXDIGITS DIGITS "abcdef" -#define URI_RESERVED ":/?#[]@!$&'()*+;=" /* [RFC3986] */ -#define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */ -#define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */ - static inline char* strstr_ptr(const char *haystack, const char *needle) { if (!haystack || !needle) return NULL; diff --git a/src/fundamental/string-util-fundamental.h b/src/fundamental/string-util-fundamental.h index a9638b4d0e6..b523b6c8bf9 100644 --- a/src/fundamental/string-util-fundamental.h +++ b/src/fundamental/string-util-fundamental.h @@ -11,6 +11,23 @@ #include "assert-fundamental.h" #include "macro-fundamental.h" +/* What is interpreted as whitespace? */ +#define WHITESPACE " \t\n\r" +#define NEWLINE "\n\r" +#define QUOTES "\"\'" +#define COMMENTS "#;" +#define GLOB_CHARS "*?[" +#define DIGITS "0123456789" +#define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz" +#define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +#define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS +#define ALPHANUMERICAL LETTERS DIGITS +#define HEXDIGITS DIGITS "abcdefABCDEF" +#define LOWERCASE_HEXDIGITS DIGITS "abcdef" +#define URI_RESERVED ":/?#[]@!$&'()*+;=" /* [RFC3986] */ +#define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */ +#define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */ + #if SD_BOOT # define strlen strlen16 # define strcmp strcmp16