| 11 | #include <stdio.h> |
| 12 | |
| 13 | int isUUID(char* p, int upper) { |
| 14 | char* p1 = p; |
| 15 | do { |
| 16 | if (!(isxdigit(*p1) || (*p1 == '-')) || (upper && islower(*p1)) || (!upper && isupper(*p1))) { |
| 17 | return 0; |
| 18 | } else { |
| 19 | } |
| 20 | } while (*++p1 != 0); |
| 21 | |
| 22 | if ((p[8] == '-') && (p[13] == '-') && (p[18] == '-') && (p[23] == '-')) { |
| 23 | return 1; |
| 24 | } else { |
| 25 | return 0; |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | int main() { |
| 30 | uuid_t uuid; |