diff options
Diffstat (limited to 'CPP/Common/StringToInt.h')
-rw-r--r-- | CPP/Common/StringToInt.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/CPP/Common/StringToInt.h b/CPP/Common/StringToInt.h index c9dce7d..31ab274 100644 --- a/CPP/Common/StringToInt.h +++ b/CPP/Common/StringToInt.h | |||
@@ -19,4 +19,20 @@ UInt64 ConvertOctStringToUInt64(const char *s, const char **end) throw(); | |||
19 | UInt32 ConvertHexStringToUInt32(const char *s, const char **end) throw(); | 19 | UInt32 ConvertHexStringToUInt32(const char *s, const char **end) throw(); |
20 | UInt64 ConvertHexStringToUInt64(const char *s, const char **end) throw(); | 20 | UInt64 ConvertHexStringToUInt64(const char *s, const char **end) throw(); |
21 | 21 | ||
22 | #define Z7_PARSE_HEX_DIGIT(c, err_op) \ | ||
23 | { c -= '0'; \ | ||
24 | if (c > 9) { \ | ||
25 | c -= 'A' - '0'; \ | ||
26 | c &= ~0x20u; \ | ||
27 | if (c > 5) { err_op } \ | ||
28 | c += 10; \ | ||
29 | } \ | ||
30 | } | ||
31 | |||
32 | const char *FindNonHexChar(const char *s) throw(); | ||
33 | |||
34 | // in: (dest != NULL) | ||
35 | // returns: pointer in dest array after last written byte | ||
36 | Byte *ParseHexString(const char *s, Byte *dest) throw(); | ||
37 | |||
22 | #endif | 38 | #endif |