mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
Release unused space in debug strings to avoid too frequent
wrap-arounds in the circular buffer.
This commit is contained in:
parent
23ce7f10a9
commit
d6dff398a4
@ -52,6 +52,15 @@ gimme1 (int n)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/* release extra space that we requested in gimme1() */
|
||||
static inline void release( void *ptr )
|
||||
{
|
||||
struct debug_info *info = NtCurrentTeb()->debug_info;
|
||||
info->str_pos = ptr;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
LPCSTR debugstr_an (LPCSTR src, int n)
|
||||
{
|
||||
LPSTR dst, res;
|
||||
@ -89,7 +98,8 @@ LPCSTR debugstr_an (LPCSTR src, int n)
|
||||
*dst++ = '.';
|
||||
*dst++ = '.';
|
||||
}
|
||||
*dst = '\0';
|
||||
*dst++ = '\0';
|
||||
release( dst );
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -132,7 +142,8 @@ LPCSTR debugstr_wn (LPCWSTR src, int n)
|
||||
*dst++ = '.';
|
||||
*dst++ = '.';
|
||||
}
|
||||
*dst = '\0';
|
||||
*dst++ = '\0';
|
||||
release( dst );
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user