// iomanip -- instantiations of iomanip #include #include _STD_BEGIN // function resetiosflags static void rsfun(ios_base& iostr, ios_base::fmtflags mask) {iostr.setf(ios_base::_Fmtzero, mask); } // function setiosflags static void sifun(ios_base& iostr, ios_base::fmtflags mask) {iostr.setf(ios_base::_Fmtmask, mask); } // function setbase static void sbfun(ios_base& iostr, int n) {iostr.setf(n == 8 ? ios_base::oct : n == 10 ? ios_base::dec : n == 16 ? ios_base::hex : ios_base::_Fmtzero, ios_base::basefield); } // function setprecision static void spfun(ios_base& iostr, streamsize n) {iostr.precision(n); } // function setw static void swfun(ios_base& iostr, streamsize n) {iostr.width(n); } _CRTIMP2 _Smanip __cdecl resetiosflags(ios_base::fmtflags mask) {return (_Smanip(&rsfun, mask)); } _CRTIMP2 _Smanip __cdecl setiosflags(ios_base::fmtflags mask) {return (_Smanip(&sifun, mask)); } _CRTIMP2 _Smanip __cdecl setbase(int n) {return (_Smanip(&sbfun, n)); } _CRTIMP2 _Smanip __cdecl setprecision(streamsize n) {return (_Smanip(&spfun, n)); } _CRTIMP2 _Smanip __cdecl setw(streamsize n) {return (_Smanip(&swfun, n)); } _STD_END /* * Copyright (c) 1994 by P.J. Plauger. ALL RIGHTS RESERVED. * Consult your license regarding permissions and restrictions. */