- Timestamp:
- Oct 6, 2010, 11:31:40 PM (11 years ago)
- Location:
- zzuf/trunk/src/libzzuf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/src/libzzuf/debug.c
r4671 r4673 47 47 char buf[128], *b = buf + 127; \ 48 48 if (i <= 0) \ 49 append((i = -i) ? "-" : "0", 1); /* XXX: hack here */ \50 if (i < =0) \49 append((i = 1 + ~i) ? "-" : "0", 1); /* XXX: hack here */ \ 50 if (i < 0) \ 51 51 { \ 52 i = -(i + base); /* XXX: special case for INT_MIN */ \52 i = 1 + ~(i + base); /* XXX: special case for INT_MIN */ \ 53 53 *b-- = hex2char[i % base]; \ 54 54 i = i / base + 1; \ … … 212 212 } 213 213 } 214 else if(f[0] == 'S') 215 { 216 uint16_t *s = va_arg(args, uint16_t *); 217 if(!s) 218 append("(nil)", 5); 219 else 220 { 221 int l = 0; 222 while(s[l]) 223 { 224 if (s[l] < 128) 225 { 226 char tmp = (char)s[l]; 227 append(&tmp, 1); 228 } 229 else 230 { 231 append("\\u", 2); 232 append(hex2char + ((s[l] & 0xf000) >> 12), 1); 233 append(hex2char + ((s[l] & 0xf00) >> 8), 1); 234 append(hex2char + ((s[l] & 0xf0) >> 4), 1); 235 append(hex2char + (s[l] & 0xf), 1); 236 } 237 l++; 238 } 239 } 240 } 214 241 else if(f[0] == '0' && f[1] == '2' && f[2] == 'x') 215 242 { -
zzuf/trunk/src/libzzuf/lib-win32.c
r4672 r4673 86 86 lpSecurityAttributes, dwCreationDisposition, 87 87 dwFlagsAndAttributes, hTemplateFile); 88 debug("CreateFileW(\"% s\", 0x%x, 0x%x, ..., 0x%x, 0x%x, ...) = [%i]",88 debug("CreateFileW(\"%S\", 0x%x, 0x%x, ..., 0x%x, 0x%x, ...) = [%i]", 89 89 lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, 90 90 dwFlagsAndAttributes, (int)ret);
Note: See TracChangeset
for help on using the changeset viewer.