chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f766403
)
basic: define HEXDIGITS
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Tue, 17 May 2016 13:44:32 +0000
(09:44 -0400)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:58 +0000
(10:12 +0200)
define HEXDIGITS alongside DIGITS, and use it where it's already useful. We'll
use it again shortly when parsing MAC addresses.
src/basic/string-util.h
patch
|
blob
|
history
diff --git
a/src/basic/string-util.h
b/src/basic/string-util.h
index ad0c813761ed9dc81dd9aa254b54421719cc0b20..139cc8c91b42bb551fed22c2215fd4922b272e49 100644
(file)
--- a/
src/basic/string-util.h
+++ b/
src/basic/string-util.h
@@
-37,6
+37,7
@@
#define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS
#define ALPHANUMERICAL LETTERS DIGITS
+#define HEXDIGITS DIGITS "abcdefABCDEF"
#define streq(a,b) (strcmp((a),(b)) == 0)
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)