_sPrintf implemented
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11346 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -95,10 +95,23 @@ _debugPrintf(const char *fmt, ...)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_sPrintf(const char * message, ...)
|
_sPrintf(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
puts("*** _sPrintf call - not yet implemented ***");
|
va_list ap;
|
||||||
printf("%s\n", message);
|
int ret;
|
||||||
|
char buffer[256]; // seems to be the size used in R5
|
||||||
|
|
||||||
|
// TODO : we need locking here
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
ret = vsnprintf(buffer, 256, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
if (!ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
_kern_debug_output(buffer);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user