| 47 | } |
| 48 | |
| 49 | static int ParseLength(const char* format, int* length) |
| 50 | { |
| 51 | const char* f = format; |
| 52 | switch (*f) { |
| 53 | case 'h': |
| 54 | case 'l': |
| 55 | if (f[1] == f[0]) { |
| 56 | *length = (f[1] << 8) + f[0]; |
| 57 | f += 2; |
| 58 | } else { |
| 59 | *length = f[0]; |
| 60 | ++f; |
| 61 | } |
| 62 | break; |
| 63 | case 'j': |
| 64 | case 'z': |
| 65 | case 't': |
| 66 | case 'L': |
| 67 | *length = *f; |
| 68 | ++f; |
| 69 | break; |
| 70 | default: |
| 71 | *length = 0; |
| 72 | } |
| 73 | |
| 74 | return f - format; |
| 75 | } |
| 76 | |
| 77 | static inline void ScanSetSetChar(char (*cs)[32], char c, bool value) |
| 78 | { |