-#include <msp/error.h>
+/* $Id$
+
+This file is part of libmspstrings
+Copyright © 2006-2007 Mikko Rasa
+Distributed under the LGPL
+*/
+#include <msp/core/error.h>
#include "fmt.h"
using namespace std;
{
out.flags(((base==HEX) ? ios_base::hex : (base==OCT) ? ios_base::oct : ios_base::dec)
| ((fmode==SCI) ? ios_base::scientific : (fmode==FIXED) ? ios_base::fixed : ios_base::fmtflags(0))
- | (fillc ? ios_base::internal : (align==LEFT) ? ios_base::left : ios_base::right)
+ | (fillc=='0' ? ios_base::internal : (align==LEFT) ? ios_base::left : ios_base::right)
| (sbase ? ios_base::showbase : ios_base::fmtflags(0))
| (spoint ? ios_base::showpoint : ios_base::fmtflags(0))
| (spos ? ios_base::showpos : ios_base::fmtflags(0))
else if(*f=='o')
base=OCT;
else if(*f=='e' || *f=='E')
- fmode=EXP;
+ fmode=SCI;
else if(*f=='f' || *f=='F')
fmode=FIXED;
else if(*f=='g' || *f=='G')
- fmode=SCI;
+ fmode=EXP;
else if(*f=='p')
{
base=HEX;