Commit 4397d97d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Print 0x prefix with %#x format in traces.

parent 83fb79d4
...@@ -656,7 +656,7 @@ int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end) ...@@ -656,7 +656,7 @@ int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end)
TRACE("calling %p\n", **table); TRACE("calling %p\n", **table);
res = (**table)(); res = (**table)();
if (res) if (res)
TRACE("function %p failed: 0x%x\n", *table, res); TRACE("function %p failed: %#x\n", *table, res);
} }
table++; table++;
......
...@@ -1368,7 +1368,7 @@ int CDECL _locking(int fd, int mode, __msvcrt_long nbytes) ...@@ -1368,7 +1368,7 @@ int CDECL _locking(int fd, int mode, __msvcrt_long nbytes)
return -1; return -1;
} }
TRACE(":fd (%d) by 0x%lx mode %s\n", TRACE(":fd (%d) by %#lx mode %s\n",
fd, nbytes, (mode == _LK_UNLCK) ? "_LK_UNLCK" : fd, nbytes, (mode == _LK_UNLCK) ? "_LK_UNLCK" :
(mode == _LK_LOCK) ? "_LK_LOCK" : (mode == _LK_LOCK) ? "_LK_LOCK" :
(mode == _LK_NBLCK) ? "_LK_NBLCK" : (mode == _LK_NBLCK) ? "_LK_NBLCK" :
...@@ -1815,7 +1815,7 @@ int CDECL _fstat64(int fd, struct _stat64* buf) ...@@ -1815,7 +1815,7 @@ int CDECL _fstat64(int fd, struct _stat64* buf)
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&basic_info.LastWriteTime, &dw); RtlTimeToSecondsSince1970((LARGE_INTEGER *)&basic_info.LastWriteTime, &dw);
buf->st_mtime = buf->st_ctime = dw; buf->st_mtime = buf->st_ctime = dw;
buf->st_nlink = std_info.NumberOfLinks; buf->st_nlink = std_info.NumberOfLinks;
TRACE(":dwFileAttributes = 0x%lx, mode set to 0x%x\n", TRACE(":dwFileAttributes = %#lx, mode set to %#x\n",
basic_info.FileAttributes, buf->st_mode); basic_info.FileAttributes, buf->st_mode);
} }
release_ioinfo(info); release_ioinfo(info);
...@@ -2121,7 +2121,7 @@ static unsigned split_oflags(unsigned oflags) ...@@ -2121,7 +2121,7 @@ static unsigned split_oflags(unsigned oflags)
if ((unsupp = oflags & ~(_O_BINARY | _O_TEXT | _O_APPEND | _O_TRUNC | _O_EXCL | _O_CREAT | if ((unsupp = oflags & ~(_O_BINARY | _O_TEXT | _O_APPEND | _O_TRUNC | _O_EXCL | _O_CREAT |
_O_RDWR | _O_WRONLY | _O_TEMPORARY | _O_NOINHERIT | _O_SEQUENTIAL | _O_RDWR | _O_WRONLY | _O_TEMPORARY | _O_NOINHERIT | _O_SEQUENTIAL |
_O_RANDOM | _O_SHORT_LIVED | _O_WTEXT | _O_U16TEXT | _O_U8TEXT))) _O_RANDOM | _O_SHORT_LIVED | _O_WTEXT | _O_U16TEXT | _O_U8TEXT)))
ERR(":unsupported oflags 0x%04x\n",unsupp); ERR(":unsupported oflags %#x\n",unsupp);
return wxflags; return wxflags;
} }
...@@ -2212,7 +2212,7 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm ...@@ -2212,7 +2212,7 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm
int wxflag; int wxflag;
HANDLE hand; HANDLE hand;
TRACE("path: (%s) oflags: 0x%04x shflags: 0x%04x pmode: 0x%04x fd*: %p secure: %d\n", TRACE("path: (%s) oflags: %#x shflags: %#x pmode: %#x fd*: %p secure: %d\n",
debugstr_w(path), oflags, shflags, pmode, fd, secure); debugstr_w(path), oflags, shflags, pmode, fd, secure);
if (!MSVCRT_CHECK_PMT( fd != NULL )) return EINVAL; if (!MSVCRT_CHECK_PMT( fd != NULL )) return EINVAL;
...@@ -2261,7 +2261,7 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm ...@@ -2261,7 +2261,7 @@ int CDECL _wsopen_dispatch( const wchar_t* path, int oflags, int shflags, int pm
sharing = FILE_SHARE_READ | FILE_SHARE_WRITE; sharing = FILE_SHARE_READ | FILE_SHARE_WRITE;
break; break;
default: default:
ERR( "Unhandled shflags 0x%x\n", shflags ); ERR( "Unhandled shflags %#x\n", shflags );
return EINVAL; return EINVAL;
} }
...@@ -2547,7 +2547,7 @@ int CDECL _open_osfhandle(intptr_t handle, int oflags) ...@@ -2547,7 +2547,7 @@ int CDECL _open_osfhandle(intptr_t handle, int oflags)
flags |= split_oflags(oflags); flags |= split_oflags(oflags);
fd = msvcrt_alloc_fd((HANDLE)handle, flags); fd = msvcrt_alloc_fd((HANDLE)handle, flags);
TRACE(":handle (%Iu) fd (%d) flags 0x%08lx\n", handle, fd, flags); TRACE(":handle (%Iu) fd (%d) flags %#lx\n", handle, fd, flags);
return fd; return fd;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment