Mercurial > projects > ldc
comparison lphobos/std/format.d @ 662:88e23f8c2354
Applied downs' latest Phobos patch
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 06 Oct 2008 21:40:33 +0200 |
parents | 5825d48b27d1 |
children | eef8ac26c66c |
comparison
equal
deleted
inserted
replaced
661:99f32e967746 | 662:88e23f8c2354 |
---|---|
566 prefix = (*__pfloatfmt)(fc, flags | FLlngdbl, | 566 prefix = (*__pfloatfmt)(fc, flags | FLlngdbl, |
567 precision, &v, cast(char*)fbuf, &sl, field_width); | 567 precision, &v, cast(char*)fbuf, &sl, field_width); |
568 if (sl != -1) | 568 if (sl != -1) |
569 break; | 569 break; |
570 sl = fbuf.length * 2; | 570 sl = fbuf.length * 2; |
571 fbuf = (cast(char*)alloca(sl * char.sizeof))[0 .. sl]; | 571 fbuf = (cast(char*)/*alloca*/malloc(sl * char.sizeof))[0 .. sl]; |
572 } | 572 } |
573 putstr(fbuf[0 .. sl]); | 573 putstr(fbuf[0 .. sl]); |
574 } | 574 } |
575 else | 575 else |
576 { | 576 { |
611 } | 611 } |
612 if (n < 0) | 612 if (n < 0) |
613 sl = sl * 2; | 613 sl = sl * 2; |
614 else | 614 else |
615 sl = n + 1; | 615 sl = n + 1; |
616 fbuf = (cast(char*)alloca(sl * char.sizeof))[0 .. sl]; | 616 fbuf = (cast(char*)/*alloca*/malloc(sl * char.sizeof))[0 .. sl]; |
617 } | 617 } |
618 putstr(fbuf[0 .. sl]); | 618 putstr(fbuf[0 .. sl]); |
619 } | 619 } |
620 return; | 620 return; |
621 } | 621 } |