| 140 | } |
| 141 | |
| 142 | static void HashToString(uint64_t hash, char* str) |
| 143 | { |
| 144 | static const char hex_chars[] = "0123456789abcdef"; |
| 145 | for (int i = 0; i < 8; ++i) |
| 146 | { |
| 147 | uint32_t x = (hash >> 8 * (7 - i)) & 0xff; |
| 148 | *str++ = hex_chars[x >> 4]; |
| 149 | *str++ = hex_chars[x & 0xf]; |
| 150 | } |
| 151 | *str = 0; |
| 152 | } |
| 153 | |
| 154 | static void ContentFilePath(HCache cache, uint64_t identifier_hash, char* path, int path_len) |
| 155 | { |