| 83 | } |
| 84 | |
| 85 | static bool parseGUID(const QString &guidString, unsigned short guid[16]) |
| 86 | { |
| 87 | if (guidString.length() <= 35) { |
| 88 | return false; |
| 89 | } |
| 90 | |
| 91 | // Maps bytes to positions in guidString |
| 92 | const static int indexes[] = {6, 4, 2, 0, 11, 9, 16, 14, 19, 21, 24, 26, 28, 30, 32, 34}; |
| 93 | |
| 94 | for (int i = 0; i < 16; i++) { |
| 95 | int hex1 = hex2int(guidString[indexes[i]].cell()); |
| 96 | int hex2 = hex2int(guidString[indexes[i] + 1].cell()); |
| 97 | |
| 98 | if ((hex1 < 0) || (hex2 < 0)) { |
| 99 | return false; |
| 100 | } |
| 101 | |
| 102 | guid[i] = hex1 * 16 + hex2; |
| 103 | } |
| 104 | |
| 105 | return true; |
| 106 | } |
| 107 | |
| 108 | // Read next token of abbreviated path data |
| 109 | static bool nextAbbPathToken(AbbPathToken *token) |
no test coverage detected