Revert "Merge pull request #2905 from 9rnsr/revert_pull2902"

This reverts commit 80f463a1e2, reversing
changes made to 588c76c19b.
This commit is contained in:
Daniel Murphy 2015-01-26 04:42:37 +11:00
parent e453ecec38
commit 4c737a672f
2 changed files with 9 additions and 29 deletions

View file

@ -311,26 +311,15 @@ class OutBuffer
*/
void printf(string format, ...) @trusted
{
version (Win64)
{
vprintf(format, _argptr);
}
else version (X86_64)
{
va_list ap;
static if (is(typeof(__va_argsave)))
va_start(ap, __va_argsave);
else
va_start(ap, format);
vprintf(format, ap);
va_end(ap);
}
else
{
va_list ap;
ap = cast(va_list)&format;
ap += format.sizeof;
vprintf(format, ap);
}
}
/*****************************************
* At offset index into buffer, create nbytes of space by shifting upwards

View file

@ -1204,25 +1204,16 @@ class Stream : InputStream, OutputStream {
// writes data to stream using printf() syntax,
// returns number of bytes written
version (Win64)
size_t printf(const(char)[] format, ...) {
return vprintf(format, _argptr);
}
else version (X86_64)
size_t printf(const(char)[] format, ...) {
va_list ap;
static if (is(typeof(__va_argsave)))
va_start(ap, __va_argsave);
else
va_start(ap, format);
auto result = vprintf(format, ap);
va_end(ap);
return result;
}
else
size_t printf(const(char)[] format, ...) {
va_list ap;
ap = cast(va_list) &format;
ap += format.sizeof;
return vprintf(format, ap);
}
private void doFormatCallback(dchar c) {
char[4] buf;