]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fundamental: Move common string constants from basic/string-util.h to string-util...
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>
Wed, 7 May 2025 15:01:07 +0000 (18:01 +0300)
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>
Wed, 7 May 2025 15:10:51 +0000 (18:10 +0300)
src/basic/string-util.h
src/fundamental/string-util-fundamental.h

index 03bff1d5fc5fedade1fe62d6cc151fa1372af9e2..e00a5f59774f95328a1b096adc872e44c27b3703 100644 (file)
@@ -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;
index a9638b4d0e6559780c47ce2bbfd11b7fc194b110..b523b6c8bf9467318d96b28aa39c616085f83f30 100644 (file)
 #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