diff --git a/stl/inc/cvt/wbuffer b/stl/inc/cvt/wbuffer index d1b5977db..dbec71ab6 100644 --- a/stl/inc/cvt/wbuffer +++ b/stl/inc/cvt/wbuffer @@ -261,7 +261,8 @@ namespace stdext { while (_Status != _Eof) { // get using codecvt facet char* _Buf = &_Str[0]; - _Elem _Ch, *_Dest; + _Elem _Ch; + _Elem* _Dest; const char* _Src; int _Meta; diff --git a/stl/inc/iostream b/stl/inc/iostream index f356ac224..ea6a3a935 100644 --- a/stl/inc/iostream +++ b/stl/inc/iostream @@ -18,27 +18,45 @@ _STL_DISABLE_CLANG_WARNINGS #undef new _STD_BEGIN #ifdef _M_CEE_PURE -__PURE_APPDOMAIN_GLOBAL extern istream cin, *_Ptr_cin; -__PURE_APPDOMAIN_GLOBAL extern ostream cout, *_Ptr_cout; -__PURE_APPDOMAIN_GLOBAL extern ostream cerr, *_Ptr_cerr; -__PURE_APPDOMAIN_GLOBAL extern ostream clog, *_Ptr_clog; +__PURE_APPDOMAIN_GLOBAL extern istream cin; +__PURE_APPDOMAIN_GLOBAL extern ostream cout; +__PURE_APPDOMAIN_GLOBAL extern ostream cerr; +__PURE_APPDOMAIN_GLOBAL extern ostream clog; +__PURE_APPDOMAIN_GLOBAL extern istream* _Ptr_cin; +__PURE_APPDOMAIN_GLOBAL extern ostream* _Ptr_cout; +__PURE_APPDOMAIN_GLOBAL extern ostream* _Ptr_cerr; +__PURE_APPDOMAIN_GLOBAL extern ostream* _Ptr_clog; + +__PURE_APPDOMAIN_GLOBAL extern wistream wcin; +__PURE_APPDOMAIN_GLOBAL extern wostream wcout; +__PURE_APPDOMAIN_GLOBAL extern wostream wcerr; +__PURE_APPDOMAIN_GLOBAL extern wostream wclog; +__PURE_APPDOMAIN_GLOBAL extern wistream* _Ptr_wcin; +__PURE_APPDOMAIN_GLOBAL extern wostream* _Ptr_wcout; +__PURE_APPDOMAIN_GLOBAL extern wostream* _Ptr_wcerr; +__PURE_APPDOMAIN_GLOBAL extern wostream* _Ptr_wclog; -__PURE_APPDOMAIN_GLOBAL extern wistream wcin, *_Ptr_wcin; -__PURE_APPDOMAIN_GLOBAL extern wostream wcout, *_Ptr_wcout; -__PURE_APPDOMAIN_GLOBAL extern wostream wcerr, *_Ptr_wcerr; -__PURE_APPDOMAIN_GLOBAL extern wostream wclog, *_Ptr_wclog; #else // _M_CEE_PURE // OBJECTS -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT istream cin, *_Ptr_cin; -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream cout, *_Ptr_cout; -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream cerr, *_Ptr_cerr; -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream clog, *_Ptr_clog; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT istream cin; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream cout; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream cerr; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream clog; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT istream* _Ptr_cin; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream* _Ptr_cout; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream* _Ptr_cerr; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT ostream* _Ptr_clog; + +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wistream wcin; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream wcout; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream wcerr; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream wclog; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wistream* _Ptr_wcin; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream* _Ptr_wcout; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream* _Ptr_wcerr; +__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream* _Ptr_wclog; -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wistream wcin, *_Ptr_wcin; -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream wcout, *_Ptr_wcout; -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream wcerr, *_Ptr_wcerr; -__PURE_APPDOMAIN_GLOBAL extern _CRTDATA2_IMPORT wostream wclog, *_Ptr_wclog; // CLASS _Winit class _CRTIMP2_PURE_IMPORT _Winit { diff --git a/stl/inc/random b/stl/inc/random index 2a0988f8c..9f4004ea3 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -619,7 +619,9 @@ struct _Circ_buf { // holds historical values for generators bool _Equals(const _Circ_buf& _Right) const { const _Ty* _Last1 = _Ax + _Idx; const _Ty* _Last2 = _Right._Ax + _Right._Idx; - const _Ty *_First, *_Last, *_Other; + const _Ty* _First; + const _Ty* _Last; + const _Ty* _Other; bool _Use2 = _Base() < _Right._Base(); if (_Use2) { // _Right's range is higher up in the array diff --git a/stl/inc/xiosbase b/stl/inc/xiosbase index 8a5643424..19f3a15bd 100644 --- a/stl/inc/xiosbase +++ b/stl/inc/xiosbase @@ -508,7 +508,8 @@ private: } _Iosarray& __CLR_OR_THIS_CALL _Findarr(int _Idx) { // locate or make a variable array element - _Iosarray *_Ptr1, *_Ptr2; + _Iosarray* _Ptr1; + _Iosarray* _Ptr2; for (_Ptr1 = _Arr, _Ptr2 = nullptr; _Ptr1; _Ptr1 = _Ptr1->_Next) { if (_Ptr1->_Index == _Idx) { @@ -529,7 +530,8 @@ private: void __CLR_OR_THIS_CALL _Tidy() noexcept { // discard storage for an ios_base _Callfns(erase_event); - _Iosarray *_Ptr1, *_Ptr2; + _Iosarray* _Ptr1; + _Iosarray* _Ptr2; for (_Ptr1 = _Arr; _Ptr1; _Ptr1 = _Ptr2) { // delete array element _Ptr2 = _Ptr1->_Next; @@ -537,7 +539,8 @@ private: } _Arr = nullptr; - _Fnarray *_Pfa1, *_Pfa2; + _Fnarray* _Pfa1; + _Fnarray* _Pfa2; for (_Pfa1 = _Calls; _Pfa1; _Pfa1 = _Pfa2) { // delete callback element _Pfa2 = _Pfa1->_Next; delete _Pfa1; diff --git a/stl/inc/ymath.h b/stl/inc/ymath.h index 60c3274ff..850ccd6e1 100644 --- a/stl/inc/ymath.h +++ b/stl/inc/ymath.h @@ -45,7 +45,11 @@ _CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Dtest(double*); _CRTIMP2_PURE double __CLRCALL_PURE_OR_CDECL _Sinh(double, double); _CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _Exp(double*, double, short); -extern _CRTIMP2_PURE_IMPORT /* const */ _Dconst _Denorm, _Hugeval, _Inf, _Nan, _Snan; +extern _CRTIMP2_PURE_IMPORT _Dconst _Denorm; +extern _CRTIMP2_PURE_IMPORT _Dconst _Hugeval; +extern _CRTIMP2_PURE_IMPORT _Dconst _Inf; +extern _CRTIMP2_PURE_IMPORT _Dconst _Nan; +extern _CRTIMP2_PURE_IMPORT _Dconst _Snan; // float DECLARATIONS _CRTIMP2_PURE float __CLRCALL_PURE_OR_CDECL _FCosh(float, float); @@ -53,7 +57,10 @@ _CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _FDtest(float*); _CRTIMP2_PURE float __CLRCALL_PURE_OR_CDECL _FSinh(float, float); _CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _FExp(float*, float, short); -extern _CRTIMP2_PURE_IMPORT /* const */ _Dconst _FDenorm, _FInf, _FNan, _FSnan; +extern _CRTIMP2_PURE_IMPORT _Dconst _FDenorm; +extern _CRTIMP2_PURE_IMPORT _Dconst _FInf; +extern _CRTIMP2_PURE_IMPORT _Dconst _FNan; +extern _CRTIMP2_PURE_IMPORT _Dconst _FSnan; // long double DECLARATIONS _CRTIMP2_PURE long double __CLRCALL_PURE_OR_CDECL _LCosh(long double, long double); @@ -61,7 +68,10 @@ _CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _LDtest(long double*); _CRTIMP2_PURE long double __CLRCALL_PURE_OR_CDECL _LSinh(long double, long double); _CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _LExp(long double*, long double, short); -extern _CRTIMP2_PURE_IMPORT /* const */ _Dconst _LDenorm, _LInf, _LNan, _LSnan; +extern _CRTIMP2_PURE_IMPORT _Dconst _LDenorm; +extern _CRTIMP2_PURE_IMPORT _Dconst _LInf; +extern _CRTIMP2_PURE_IMPORT _Dconst _LNan; +extern _CRTIMP2_PURE_IMPORT _Dconst _LSnan; _END_EXTERN_C_UNLESS_PURE diff --git a/stl/src/filesys.cpp b/stl/src/filesys.cpp index 1e7420063..120c5e5e6 100644 --- a/stl/src/filesys.cpp +++ b/stl/src/filesys.cpp @@ -314,7 +314,9 @@ _FS_DLL space_info __CLRCALL_PURE_OR_CDECL _Statvfs(const wchar_t* _Fname) { _Devname.push_back(L'/'); } - _ULARGE_INTEGER _Available, _Capacity, _Free; + _ULARGE_INTEGER _Available; + _ULARGE_INTEGER _Capacity; + _ULARGE_INTEGER _Free; if (GetDiskFreeSpaceExW(_Devname.c_str(), &_Available, &_Capacity, &_Free)) { // convert values _Ans.capacity = _Capacity.QuadPart; diff --git a/stl/src/xstol.cpp b/stl/src/xstol.cpp index 4c1160956..f1c5f2447 100644 --- a/stl/src/xstol.cpp +++ b/stl/src/xstol.cpp @@ -18,7 +18,8 @@ _CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Stoulx(const char*, char**, _CRTIMP2_PURE long __CLRCALL_PURE_OR_CDECL _Stolx( const char* s, char** endptr, int base, int* perr) { // convert string to long, with checking const char* sc; - char *se, sign; + char* se; + char sign; unsigned long x; if (endptr == 0) { diff --git a/stl/src/xstoll.cpp b/stl/src/xstoll.cpp index 1de310910..df446e5ad 100644 --- a/stl/src/xstoll.cpp +++ b/stl/src/xstoll.cpp @@ -16,7 +16,8 @@ _CRTIMP2_PURE unsigned long long __CLRCALL_PURE_OR_CDECL _Stoullx(const char*, c _CRTIMP2_PURE long long __CLRCALL_PURE_OR_CDECL _Stollx( const char* s, char** endptr, int base, int* perr) { // convert string to long long, with checking const char* sc; - char *se, sign; + char* se; + char sign; unsigned long long x; if (endptr == 0) { diff --git a/stl/src/xstoul.cpp b/stl/src/xstoul.cpp index d43dbc91d..1824ef9a2 100644 --- a/stl/src/xstoul.cpp +++ b/stl/src/xstoul.cpp @@ -32,12 +32,15 @@ static const char ndigs[_Base_max + 1] = {0, 0, 33, 21, 17, 14, 13, 12, 11, 11, _CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Stoulx( const char* s, char** endptr, int base, int* perr) { // convert string to unsigned long, with checking - const char *sc, *sd; - const char *s1, *s2; + const char* sc; + const char* sd; + const char* s1; + const char* s2; char dig = 0; char sign; ptrdiff_t n; - unsigned long x, y; + unsigned long x; + unsigned long y; if (perr != 0) { *perr = 0; diff --git a/stl/src/xstoull.cpp b/stl/src/xstoull.cpp index 1c5ceb13f..103cf8afe 100644 --- a/stl/src/xstoull.cpp +++ b/stl/src/xstoull.cpp @@ -24,11 +24,15 @@ static const char ndigs[_Base_max + 1] = {0, 0, 65, 41, 33, 28, 25, 23, 22, 21, _CRTIMP2_PURE unsigned long long __CLRCALL_PURE_OR_CDECL _Stoullx( const char* s, char** endptr, int base, int* perr) { // convert string to unsigned long long, with checking - const char *sc, *sd; - const char *s1, *s2; - char dig, sign; + const char* sc; + const char* sd; + const char* s1; + const char* s2; + char dig; + char sign; ptrdiff_t n; - unsigned long long x, y; + unsigned long long x; + unsigned long long y; if (perr != 0) { *perr = 0; diff --git a/stl/src/xxxprec.h b/stl/src/xxxprec.h index d1b25d54f..72c7041e4 100644 --- a/stl/src/xxxprec.h +++ b/stl/src/xxxprec.h @@ -67,7 +67,8 @@ FTYPE FNAME(Xp_getw)(const FTYPE* p, int n) { // get total value FTYPE* FNAME(Xp_setw)(FTYPE* p, int n, FTYPE x) { // load a full-precision value FTYPE x0 = x; - short errx, xexp; + short errx; + short xexp; if (n > 0) { if (n == 1 || (errx = FNAME(Dunscale)(&xexp, &x0)) == 0) { @@ -102,7 +103,8 @@ FTYPE* FNAME(Xp_setw)(FTYPE* p, int n, FTYPE x) { // load a full-precision value FTYPE* FNAME(Xp_addh)(FTYPE* p, int n, FTYPE x0) { // add a half-precision value FTYPE xscaled = x0; - short errx, xexp; + short errx; + short xexp; if (n != 0) { if (0 < (errx = FNAME(Dunscale)(&xexp, &xscaled))) { @@ -209,7 +211,8 @@ FTYPE* FNAME(Xp_addh)(FTYPE* p, int n, FTYPE x0) { // add a half-precision value FTYPE* FNAME(Xp_mulh)(FTYPE* p, int n, FTYPE x0) { // multiply by a half-precision value short errx; - int j, k; + int j; + int k; FTYPE buf[NBUF]; if (0 < n) { // check for special values