Release unused space in debug strings to avoid too frequent

wrap-arounds in the circular buffer.
This commit is contained in:
Alexandre Julliard 2000-02-25 21:44:49 +00:00
parent 23ce7f10a9
commit d6dff398a4

View File

@ -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;
}