diff options
37 files changed, 489 insertions, 475 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8dbae9a..8faa72c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -161,6 +161,14 @@ * Fix installation target; +* Update header guards; +* Typedef structures again; +* Rename nthw to nothw; +* Add missing prefix to divmod types; +* Use structure for version constant (use oldstyle in C); +* Use maxval for inf fallback; + + # 0.0.2 * Migrate to CMake; @@ -197,7 +197,7 @@ int main() { num = 0x0; }; - ::std::cout <<"zp " <<::zp::ver <<"." <<::zp::extver <<", run-time test\n"; + ::std::cout <<"zp " <<::zp::ver.api <<"." <<::zp::ver.ext <<", run-time test\n"; try { /*[&] { diff --git a/zp/include-private/zp/imp/prv.ii b/zp/include-private/zp/imp/prv.ii index 21019b3..ae13d25 100644 --- a/zp/include-private/zp/imp/prv.ii +++ b/zp/include-private/zp/imp/prv.ii @@ -4,7 +4,7 @@ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>. */ -template<typename typ> zp_nthw ::zp::siz zp::det::strcpy(typ * dst,typ const * src) { +template<typename typ> zp_nothw ::zp::siz zp::det::strcpy(typ * dst,typ const * src) { //static_assert(::zp::ischrtyp<typ>::val,"type must be a character type"); typ * const dstsrt = dst; @@ -14,7 +14,7 @@ template<typename typ> zp_nthw ::zp::siz zp::det::strcpy(typ * dst,typ const * s return static_cast< ::zp::siz>(dst-dstsrt); /* Number of values copied. */ } -template<typename typ> zp_nthw bool zp::det::strequ(typ const * lstr,typ const * rstr) { +template<typename typ> zp_nothw bool zp::det::strequ(typ const * lstr,typ const * rstr) { //static_assert(::zp::ischrtyp<typ>::val,"type must be a character type"); for (;;++lstr,++rstr) { @@ -25,7 +25,7 @@ template<typename typ> zp_nthw bool zp::det::strequ(typ const * lstr,typ const * return true; } -template<typename typ> zp_nthw ::zp::siz zp::det::strfil(typ * str,typ const chr) { +template<typename typ> zp_nothw ::zp::siz zp::det::strfil(typ * str,typ const chr) { //static_assert(::zp::ischrtyp<typ>::val,"type must be a character type"); /* If the string format uses multiple values per character, the number of these values is returned (use utfXdeclen if the number of characters is needed). */ typ * const srt = str; @@ -35,7 +35,7 @@ template<typename typ> zp_nthw ::zp::siz zp::det::strfil(typ * str,typ const chr return static_cast< ::zp::siz>(str-srt)-0x1u; } -template<typename typ> zp_nthw ::zp::siz zp::det::strlen(typ const * str) { +template<typename typ> zp_nothw ::zp::siz zp::det::strlen(typ const * str) { //static_assert(::zp::ischrtyp<typ>::val,"type must be a character type"); /* If the string format uses multiple values per character, the number of these values is returned (use utfXdeclen if the number of characters is needed). */ typ const * const srt = str; @@ -45,7 +45,7 @@ template<typename typ> zp_nthw ::zp::siz zp::det::strlen(typ const * str) { return static_cast< ::zp::siz>(str-srt)-0x1u; } -template<typename typ> zp_nthw typ * zp::det::strsrh(typ const * str,typ const chr) { +template<typename typ> zp_nothw typ * zp::det::strsrh(typ const * str,typ const chr) { //static_assert(::zp::ischrtyp<typ>::val,"type must be a character type"); for (;;++str) { diff --git a/zp/include-private/zp/prv b/zp/include-private/zp/prv index 6660107..03e63e5 100644 --- a/zp/include-private/zp/prv +++ b/zp/include-private/zp/prv @@ -12,11 +12,11 @@ namespace zp { namespace det { - template<typename typ> zp_nthw ::zp::siz strcpy(typ * dst, typ const * src); - template<typename typ> zp_nthw bool strequ(typ const * lstr,typ const * rsrc); - template<typename typ> zp_nthw ::zp::siz strfil(typ * dst, typ chr); - template<typename typ> zp_nthw ::zp::siz strlen(typ const * str); - template<typename typ> zp_nthw typ * strsrh(typ const * str, typ chr); + template<typename typ> zp_nothw ::zp::siz strcpy(typ * dst, typ const * src); + template<typename typ> zp_nothw bool strequ(typ const * lstr,typ const * rsrc); + template<typename typ> zp_nothw ::zp::siz strfil(typ * dst, typ chr); + template<typename typ> zp_nothw ::zp::siz strlen(typ const * str); + template<typename typ> zp_nothw typ * strsrh(typ const * str, typ chr); } } diff --git a/zp/include/zp/imp/mem.ii b/zp/include/zp/imp/mem.ii index 1c2f718..8c439e8 100644 --- a/zp/include/zp/imp/mem.ii +++ b/zp/include/zp/imp/mem.ii @@ -34,7 +34,7 @@ template<typename buftyp,typename valtyp> constexpr auto zp::fil(buftyp * buf,va } #endif -template<typename dsttyp,typename srctyp> zp_nthw inline ::zp::cpyres<dsttyp,srctyp> zp::memcpy(dsttyp * dst,srctyp const * src,::zp::siz const num) { +template<typename dsttyp,typename srctyp> zp_nothw inline ::zp::cpyres<dsttyp,srctyp> zp::memcpy(dsttyp * dst,srctyp const * src,::zp::siz const num) { ::zp_cpyres const cpyres = ::zp_memcpy(dst,src,num); ::zp::cpyres<dsttyp,srctyp> res = { diff --git a/zp/include/zp/imp/str.ii b/zp/include/zp/imp/str.ii index 3822c7d..f5e40e3 100644 --- a/zp/include/zp/imp/str.ii +++ b/zp/include/zp/imp/str.ii @@ -47,7 +47,7 @@ template<typename typ> constexpr auto zp::fmtlen(typ val,::zp::i8m const bs) noe } #endif -template<typename typ> zp_nthw ::zp::siz zp::prv::numdig(typ fmtval,::zp::i8m const bs) { +template<typename typ> zp_nothw ::zp::siz zp::prv::numdig(typ fmtval,::zp::i8m const bs) { //static_assert(::zp::isinttyp<typ>::val,"type must be an integral type"); if (fmtval == typ (0x0)) return 0x1u; diff --git a/zp/include/zp/mem b/zp/include/zp/mem index ac73262..3f63fda 100644 --- a/zp/include/zp/mem +++ b/zp/include/zp/mem @@ -16,11 +16,11 @@ namespace zp { srctyp * src; }; - template<typename dsttyp,typename srctyp> zp_iln zp_nthw inline ::zp::cpyres<dsttyp,srctyp> memcpy(dsttyp * dst, srctyp const * src, ::zp::siz const num); - template<typename ltyp, typename rtyp> zp_useres zp_iln zp_nthw inline bool memequ(ltyp const * lbuf,rtyp const * rbuf,::zp::siz const num) {return ::zp_memequ(lbuf,rbuf,num);} - template<typename typ> zp_iln zp_nthw inline typ * memfil(typ * dst, char unsigned val, ::zp::siz const num) {return static_cast<typ *>(::zp_memfil(dst,val,num));} - template<typename typ> zp_useres zp_nthw zp_iln inline typ * memsrh(typ * buf, char unsigned val, ::zp::siz const num) {return static_cast<typ *>(::zp_memsrh(buf,val,num));} - template<typename typ> zp_useres zp_nthw zp_iln inline typ const * memsrh(typ const * buf, char unsigned val, ::zp::siz const num) {return const_cast<typ const *>(static_cast<typ *>(::zp_memsrh(buf,val,num)));} + template<typename dsttyp,typename srctyp> zp_iln zp_nothw inline ::zp::cpyres<dsttyp,srctyp> memcpy(dsttyp * dst, srctyp const * src, ::zp::siz const num); + template<typename ltyp, typename rtyp> zp_useres zp_iln zp_nothw inline bool memequ(ltyp const * lbuf,rtyp const * rbuf,::zp::siz const num) {return ::zp_memequ(lbuf,rbuf,num);} + template<typename typ> zp_iln zp_nothw inline typ * memfil(typ * dst, char unsigned val, ::zp::siz const num) {return static_cast<typ *>(::zp_memfil(dst,val,num));} + template<typename typ> zp_useres zp_nothw zp_iln inline typ * memsrh(typ * buf, char unsigned val, ::zp::siz const num) {return static_cast<typ *>(::zp_memsrh(buf,val,num));} + template<typename typ> zp_useres zp_nothw zp_iln inline typ const * memsrh(typ const * buf, char unsigned val, ::zp::siz const num) {return const_cast<typ const *>(static_cast<typ *>(::zp_memsrh(buf,val,num)));} #if zp_std_cxx11 template<typename ltyp, typename rtyp> constexpr auto cpy(ltyp * dst, rtyp * src, ::zp::siz num) noexcept -> ::zp::cpyres<ltyp,rtyp>; diff --git a/zp/include/zp/mem.h b/zp/include/zp/mem.h index 137bdc8..36de020 100644 --- a/zp/include/zp/mem.h +++ b/zp/include/zp/mem.h @@ -11,15 +11,15 @@ zp_prv_cdecl -struct zp_cpyres { +typedef struct { void * dst; void * src; -}; +} zp_cpyres; -zp_nthw struct zp_cpyres zp_memcpy(void * dst, void const * src, zp_siz num); -zp_nthw zp_useres bool zp_memequ(void const * lbuf,void const * rbuf,zp_siz num); -zp_nthw void * zp_memfil(void * dst, char unsigned val, zp_siz num); -zp_nthw zp_useres void * zp_memsrh(void const * buf, char unsigned val, zp_siz num); +zp_nothw zp_cpyres zp_memcpy(void * dst, void const * src, zp_siz num); +zp_nothw zp_useres bool zp_memequ(void const * lbuf,void const * rbuf,zp_siz num); +zp_nothw void * zp_memfil(void * dst, char unsigned val, zp_siz num); +zp_nothw zp_useres void * zp_memsrh(void const * buf, char unsigned val, zp_siz num); zp_prv_cdeclend diff --git a/zp/include/zp/mth b/zp/include/zp/mth index 5fce9ec..af419d4 100644 --- a/zp/include/zp/mth +++ b/zp/include/zp/mth @@ -104,157 +104,157 @@ namespace zp { } #endif - zp_iln zp_nthw zp_unseq zp_useres inline double isnan(double const val) {return zp_isnand( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long isnan(double long const val) {return zp_isnandl(val);} - zp_iln zp_nthw zp_unseq zp_useres inline float isnan(float const val) {return zp_isnanf( val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float abs(float const val) {return ::zp_absf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double abs(double const val) {return ::zp_absd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long abs(double long const val) {return ::zp_absdl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float acos(float const val) {return ::zp_acosf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double acos(double const val) {return ::zp_acosd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long acos(double long const val) {return ::zp_acosdl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float zp_acot(float const val) {return ::zp_acotf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double zp_acot(double const val) {return ::zp_acotd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long zp_acot(double long const val) {return ::zp_acotdl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float zp_acsc(float const val) {return ::zp_acscf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double zp_acsc(double const val) {return ::zp_acscd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long zp_acsc(double long const val) {return ::zp_acscdl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float asec(float const val) {return ::zp_asecf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double asec(double const val) {return ::zp_asecd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long asec(double long const val) {return ::zp_asecdl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float asin(float const val) {return ::zp_asinf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double asin(double const val) {return ::zp_asind( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long asin(double long const val) {return ::zp_asindl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float atan(float const val) {return ::zp_atanf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double atan(double const val) {return ::zp_atand( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long atan(double long const val) {return ::zp_atandl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float atan2(float const y,float const x) {return ::zp_atan2f( y,x);} - zp_iln zp_nthw zp_unseq zp_useres inline double atan2(double const y,double const x) {return ::zp_atan2d( y,x);} - zp_iln zp_nthw zp_unseq zp_useres inline double long atan2(double long const y,double long const x) {return ::zp_atan2dl(y,x);} - - zp_iln zp_nthw zp_unseq zp_useres inline float cbrt(float const val) {return ::zp_cbrtf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double cbrt(double const val) {return ::zp_cbrtd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long cbrt(double long const val) {return ::zp_cbrtdl(val);} - - zp_iln zp_nthw zp_unseq zp_useres inline float cos(float const ang) {return ::zp_cosf( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double cos(double const ang) {return ::zp_cosd( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double long cos(double long const ang) {return ::zp_cosdl(ang);} - - zp_iln zp_nthw zp_unseq zp_useres inline float cot(float const ang) {return ::zp_cotf( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double cot(double const ang) {return ::zp_cotd( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double long cot(double long const ang) {return ::zp_cotdl(ang);} - - zp_iln zp_nthw zp_unseq zp_useres inline float csc(float const ang) {return ::zp_cscf( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double csc(double const ang) {return ::zp_cscd( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double long csc(double long const ang) {return ::zp_cscdl(ang);} - - zp_iln zp_nthw zp_unseq zp_useres inline float dist2(float const x,float const y) {return ::zp_dst2f( x,y);} - zp_iln zp_nthw zp_unseq zp_useres inline double dist2(double const x,double const y) {return ::zp_dst2d( x,y);} - zp_iln zp_nthw zp_unseq zp_useres inline double long dist2(double long const x,double long const y) {return ::zp_dst2dl(x,y);} - - zp_iln zp_nthw zp_unseq zp_useres inline float dist3(float const x,float const y,float const z) {return ::zp_dst3f( x,y,z);} - zp_iln zp_nthw zp_unseq zp_useres inline double dist3(double const x,double const y,double const z) {return ::zp_dst3d( x,y,z);} - zp_iln zp_nthw zp_unseq zp_useres inline double long dist3(double long const x,double long const y,double long const z) {return ::zp_dst3dl(x,y,z);} - - zp_iln zp_nthw zp_unseq zp_useres inline float dist4(float const x,float const y,float const z,float w) {return ::zp_dst4f( x,y,z,w);} - zp_iln zp_nthw zp_unseq zp_useres inline double dist4(double const x,double const y,double const z,double w) {return ::zp_dst4d( x,y,z,w);} - zp_iln zp_nthw zp_unseq zp_useres inline double long dist4(double long const x,double long const y,double long const z,double long w) {return ::zp_dst4dl(x,y,z,w);} - - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::divmodres<char signed> divmod(char signed const num,char signed den); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::divmodres<short> divmod(short const num,short den); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::divmodres<int> divmod(int const num,int den); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::divmodres<long> divmod(long const num,long den); + zp_iln zp_nothw zp_unseq zp_useres inline double isnan(double const val) {return zp_isnand( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long isnan(double long const val) {return zp_isnandl(val);} + zp_iln zp_nothw zp_unseq zp_useres inline float isnan(float const val) {return zp_isnanf( val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float abs(float const val) {return ::zp_absf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double abs(double const val) {return ::zp_absd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long abs(double long const val) {return ::zp_absdl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float acos(float const val) {return ::zp_acosf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double acos(double const val) {return ::zp_acosd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long acos(double long const val) {return ::zp_acosdl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float zp_acot(float const val) {return ::zp_acotf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double zp_acot(double const val) {return ::zp_acotd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long zp_acot(double long const val) {return ::zp_acotdl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float zp_acsc(float const val) {return ::zp_acscf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double zp_acsc(double const val) {return ::zp_acscd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long zp_acsc(double long const val) {return ::zp_acscdl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float asec(float const val) {return ::zp_asecf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double asec(double const val) {return ::zp_asecd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long asec(double long const val) {return ::zp_asecdl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float asin(float const val) {return ::zp_asinf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double asin(double const val) {return ::zp_asind( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long asin(double long const val) {return ::zp_asindl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float atan(float const val) {return ::zp_atanf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double atan(double const val) {return ::zp_atand( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long atan(double long const val) {return ::zp_atandl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float atan2(float const y,float const x) {return ::zp_atan2f( y,x);} + zp_iln zp_nothw zp_unseq zp_useres inline double atan2(double const y,double const x) {return ::zp_atan2d( y,x);} + zp_iln zp_nothw zp_unseq zp_useres inline double long atan2(double long const y,double long const x) {return ::zp_atan2dl(y,x);} + + zp_iln zp_nothw zp_unseq zp_useres inline float cbrt(float const val) {return ::zp_cbrtf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double cbrt(double const val) {return ::zp_cbrtd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long cbrt(double long const val) {return ::zp_cbrtdl(val);} + + zp_iln zp_nothw zp_unseq zp_useres inline float cos(float const ang) {return ::zp_cosf( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double cos(double const ang) {return ::zp_cosd( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double long cos(double long const ang) {return ::zp_cosdl(ang);} + + zp_iln zp_nothw zp_unseq zp_useres inline float cot(float const ang) {return ::zp_cotf( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double cot(double const ang) {return ::zp_cotd( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double long cot(double long const ang) {return ::zp_cotdl(ang);} + + zp_iln zp_nothw zp_unseq zp_useres inline float csc(float const ang) {return ::zp_cscf( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double csc(double const ang) {return ::zp_cscd( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double long csc(double long const ang) {return ::zp_cscdl(ang);} + + zp_iln zp_nothw zp_unseq zp_useres inline float dist2(float const x,float const y) {return ::zp_dst2f( x,y);} + zp_iln zp_nothw zp_unseq zp_useres inline double dist2(double const x,double const y) {return ::zp_dst2d( x,y);} + zp_iln zp_nothw zp_unseq zp_useres inline double long dist2(double long const x,double long const y) {return ::zp_dst2dl(x,y);} + + zp_iln zp_nothw zp_unseq zp_useres inline float dist3(float const x,float const y,float const z) {return ::zp_dst3f( x,y,z);} + zp_iln zp_nothw zp_unseq zp_useres inline double dist3(double const x,double const y,double const z) {return ::zp_dst3d( x,y,z);} + zp_iln zp_nothw zp_unseq zp_useres inline double long dist3(double long const x,double long const y,double long const z) {return ::zp_dst3dl(x,y,z);} + + zp_iln zp_nothw zp_unseq zp_useres inline float dist4(float const x,float const y,float const z,float w) {return ::zp_dst4f( x,y,z,w);} + zp_iln zp_nothw zp_unseq zp_useres inline double dist4(double const x,double const y,double const z,double w) {return ::zp_dst4d( x,y,z,w);} + zp_iln zp_nothw zp_unseq zp_useres inline double long dist4(double long const x,double long const y,double long const z,double long w) {return ::zp_dst4dl(x,y,z,w);} + + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::divmodres<char signed> divmod(char signed const num,char signed den); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::divmodres<short> divmod(short const num,short den); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::divmodres<int> divmod(int const num,int den); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::divmodres<long> divmod(long const num,long den); #if zp_std_c99 || zp_std_cxx11 - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::divmodres<long long> divmodl(long long const num,long long den); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::divmodres<long long> divmodl(long long const num,long long den); #endif - zp_iln zp_nthw zp_unseq zp_useres inline float dot2(::zp::vec2<float> const lvec,::zp::vec2<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline double dot2(::zp::vec2<double> const lvec,::zp::vec2<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline double long dot2(::zp::vec2<double long> const lvec,::zp::vec2<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline float dot2(::zp::vec2<float> const lvec,::zp::vec2<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline double dot2(::zp::vec2<double> const lvec,::zp::vec2<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline double long dot2(::zp::vec2<double long> const lvec,::zp::vec2<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline float dot3(::zp::vec3<float> const lvec,::zp::vec3<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline double dot3(::zp::vec3<double> const lvec,::zp::vec3<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline double long dot3(::zp::vec3<double long> const lvec,::zp::vec3<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline float dot3(::zp::vec3<float> const lvec,::zp::vec3<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline double dot3(::zp::vec3<double> const lvec,::zp::vec3<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline double long dot3(::zp::vec3<double long> const lvec,::zp::vec3<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline float dot4(::zp::vec4<float> const lvec,::zp::vec4<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline double dot4(::zp::vec4<double> const lvec,::zp::vec4<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline double long dot4(::zp::vec4<double long> const lvec,::zp::vec4<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline float dot4(::zp::vec4<float> const lvec,::zp::vec4<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline double dot4(::zp::vec4<double> const lvec,::zp::vec4<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline double long dot4(::zp::vec4<double long> const lvec,::zp::vec4<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline float exp(float const val,float n) {return ::zp_expf( val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline double exp(double const val,double n) {return ::zp_expd( val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline double long exp(double long const val,double long n) {return ::zp_expdl(val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline float exp(float const val,float n) {return ::zp_expf( val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline double exp(double const val,double n) {return ::zp_expd( val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline double long exp(double long const val,double long n) {return ::zp_expdl(val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline float lb(float const val) {return ::zp_lbf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double lb(double const val) {return ::zp_lbd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long lb(double long const val) {return ::zp_lbdl(val);} + zp_iln zp_nothw zp_unseq zp_useres inline float lb(float const val) {return ::zp_lbf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double lb(double const val) {return ::zp_lbd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long lb(double long const val) {return ::zp_lbdl(val);} - zp_iln zp_nthw zp_unseq zp_useres inline float lg(float const val) {return ::zp_lgf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double lg(double const val) {return ::zp_lgd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long lg(double long const val) {return ::zp_lgdl(val);} + zp_iln zp_nothw zp_unseq zp_useres inline float lg(float const val) {return ::zp_lgf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double lg(double const val) {return ::zp_lgd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long lg(double long const val) {return ::zp_lgdl(val);} - zp_iln zp_nthw zp_unseq zp_useres inline float ln(float const val) {return ::zp_lnf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double ln(double const val) {return ::zp_lnd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long ln(double long const val) {return ::zp_lndl(val);} + zp_iln zp_nothw zp_unseq zp_useres inline float ln(float const val) {return ::zp_lnf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double ln(double const val) {return ::zp_lnd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long ln(double long const val) {return ::zp_lndl(val);} - zp_iln zp_nthw zp_unseq zp_useres inline float log(float const val,float n) {return ::zp_logf( val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline double log(double const val,double n) {return ::zp_logd( val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline double long log(double long const val,double long n) {return ::zp_logdl(val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline float log(float const val,float n) {return ::zp_logf( val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline double log(double const val,double n) {return ::zp_logd( val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline double long log(double long const val,double long n) {return ::zp_logdl(val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline float nrt(float const val,float n) {return ::zp_nrtf( val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline double nrt(double const val,double n) {return ::zp_nrtd( val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline double long nrt(double long const val,double long n) {return ::zp_nrtdl(val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline float nrt(float const val,float n) {return ::zp_nrtf( val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline double nrt(double const val,double n) {return ::zp_nrtd( val,n);} + zp_iln zp_nothw zp_unseq zp_useres inline double long nrt(double long const val,double long n) {return ::zp_nrtdl(val,n);} - zp_iln zp_nthw zp_unseq zp_useres inline float sec(float const ang) {return ::zp_secf( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double sec(double const ang) {return ::zp_secd( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double long sec(double long const ang) {return ::zp_secdl(ang);} + zp_iln zp_nothw zp_unseq zp_useres inline float sec(float const ang) {return ::zp_secf( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double sec(double const ang) {return ::zp_secd( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double long sec(double long const ang) {return ::zp_secdl(ang);} - zp_iln zp_nthw zp_unseq zp_useres inline float sin(float const ang) {return ::zp_sinf( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double sin(double const ang) {return ::zp_sind( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double long sin(double long const ang) {return ::zp_sindl(ang);} + zp_iln zp_nothw zp_unseq zp_useres inline float sin(float const ang) {return ::zp_sinf( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double sin(double const ang) {return ::zp_sind( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double long sin(double long const ang) {return ::zp_sindl(ang);} - zp_iln zp_nthw zp_unseq zp_useres inline float sqrt(float const val) {return ::zp_sqrtf( val);;} - zp_iln zp_nthw zp_unseq zp_useres inline double sqrt(double const val) {return ::zp_sqrtd( val);;} - zp_iln zp_nthw zp_unseq zp_useres inline double long sqrt(double long const val) {return ::zp_sqrtdl(val);;} + zp_iln zp_nothw zp_unseq zp_useres inline float sqrt(float const val) {return ::zp_sqrtf( val);;} + zp_iln zp_nothw zp_unseq zp_useres inline double sqrt(double const val) {return ::zp_sqrtd( val);;} + zp_iln zp_nothw zp_unseq zp_useres inline double long sqrt(double long const val) {return ::zp_sqrtdl(val);;} - zp_iln zp_nthw zp_unseq zp_useres inline float tan(float const ang) {return ::zp_tanf( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double tan(double const ang) {return ::zp_tand( ang);} - zp_iln zp_nthw zp_unseq zp_useres inline double long tan(double long const ang) {return ::zp_tandl(ang);} + zp_iln zp_nothw zp_unseq zp_useres inline float tan(float const ang) {return ::zp_tanf( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double tan(double const ang) {return ::zp_tand( ang);} + zp_iln zp_nothw zp_unseq zp_useres inline double long tan(double long const ang) {return ::zp_tandl(ang);} - zp_iln zp_nthw zp_unseq zp_useres inline float tsrt(float const val) {return ::zp_tsrtf( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double tsrt(double const val) {return ::zp_tsrtd( val);} - zp_iln zp_nthw zp_unseq zp_useres inline double long tsrt(double long const val) {return ::zp_tsrtdl(val);} + zp_iln zp_nothw zp_unseq zp_useres inline float tsrt(float const val) {return ::zp_tsrtf( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double tsrt(double const val) {return ::zp_tsrtd( val);} + zp_iln zp_nothw zp_unseq zp_useres inline double long tsrt(double long const val) {return ::zp_tsrtdl(val);} - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec2<float> vadd2f( ::zp::vec2<float> const lvec,::zp::vec2<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec2<double> vadd2d( ::zp::vec2<double> const lvec,::zp::vec2<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec2<double long> vadd2dl(::zp::vec2<double long> const lvec,::zp::vec2<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec2<float> vadd2f( ::zp::vec2<float> const lvec,::zp::vec2<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec2<double> vadd2d( ::zp::vec2<double> const lvec,::zp::vec2<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec2<double long> vadd2dl(::zp::vec2<double long> const lvec,::zp::vec2<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec3<float> vadd3f( ::zp::vec3<float> const lvec,::zp::vec3<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec3<double> vadd3d( ::zp::vec3<double> const lvec,::zp::vec3<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec3<double long> vadd3dl(::zp::vec3<double long> const lvec,::zp::vec3<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec3<float> vadd3f( ::zp::vec3<float> const lvec,::zp::vec3<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec3<double> vadd3d( ::zp::vec3<double> const lvec,::zp::vec3<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec3<double long> vadd3dl(::zp::vec3<double long> const lvec,::zp::vec3<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec4<float> vadd4f( ::zp::vec4<float> const lvec,::zp::vec4<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec4<double> vadd4d( ::zp::vec4<double> const lvec,::zp::vec4<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec4<double long> vadd4dl(::zp::vec4<double long> const lvec,::zp::vec4<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec4<float> vadd4f( ::zp::vec4<float> const lvec,::zp::vec4<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec4<double> vadd4d( ::zp::vec4<double> const lvec,::zp::vec4<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec4<double long> vadd4dl(::zp::vec4<double long> const lvec,::zp::vec4<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec2<float> vsub2f( ::zp::vec2<float> const lvec,::zp::vec2<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec2<double> vsub2d( ::zp::vec2<double> const lvec,::zp::vec2<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec2<double long> vsub2dl(::zp::vec2<double long> const lvec,::zp::vec2<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec2<float> vsub2f( ::zp::vec2<float> const lvec,::zp::vec2<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec2<double> vsub2d( ::zp::vec2<double> const lvec,::zp::vec2<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec2<double long> vsub2dl(::zp::vec2<double long> const lvec,::zp::vec2<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec3<float> vsub3f( ::zp::vec3<float> const lvec,::zp::vec3<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec3<double> vsub3d( ::zp::vec3<double> const lvec,::zp::vec3<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec3<double long> vsub3dl(::zp::vec3<double long> const lvec,::zp::vec3<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec3<float> vsub3f( ::zp::vec3<float> const lvec,::zp::vec3<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec3<double> vsub3d( ::zp::vec3<double> const lvec,::zp::vec3<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec3<double long> vsub3dl(::zp::vec3<double long> const lvec,::zp::vec3<double long> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec4<float> vsub4f( ::zp::vec4<float> const lvec,::zp::vec4<float> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec4<double> vsub4d( ::zp::vec4<double> const lvec,::zp::vec4<double> const rvec); - zp_iln zp_nthw zp_unseq zp_useres inline ::zp::vec4<double long> vsub4dl(::zp::vec4<double long> const lvec,::zp::vec4<double long> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec4<float> vsub4f( ::zp::vec4<float> const lvec,::zp::vec4<float> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec4<double> vsub4d( ::zp::vec4<double> const lvec,::zp::vec4<double> const rvec); + zp_iln zp_nothw zp_unseq zp_useres inline ::zp::vec4<double long> vsub4dl(::zp::vec4<double long> const lvec,::zp::vec4<double long> const rvec); } #endif diff --git a/zp/include/zp/mth.h b/zp/include/zp/mth.h index a6ba22c..1a4790a 100644 --- a/zp/include/zp/mth.h +++ b/zp/include/zp/mth.h @@ -14,17 +14,17 @@ zp_prv_cdecl #if zp_prv_hasbltin(__builtin_huge_val) #define zp_infd (__builtin_huge_val()) #else -#define zp_infd (0.0); +#define zp_infd (zp_maxvald) #endif #if zp_prv_hasbltin(__builtin_huge_valf) #define zp_inff (__builtin_huge_valf()) #else -#define zp_inff (0.0f); +#define zp_inff (zp_maxvalf) #endif #if zp_prv_hasbltin(__builtin_huge_vall) #define zp_infld (__builtin_huge_vall()) #else -#define zp_infld (0.0l); +#define zp_infld (zp_maxvaldl) #endif #if zp_prv_hasbltin(__builtin_nan) @@ -43,76 +43,76 @@ zp_prv_cdecl #define zp_nanld (0.0l); #endif -struct divmodressc { +typedef struct { char signed lval; char signed rval; -}; -struct divmodress { +} zp_divmodressc; +typedef struct { short lval; short rval; -}; -struct divmodresi { +} zp_divmodress; +typedef struct { int lval; int rval; -}; -struct divmodresl { +} zp_divmodresi; +typedef struct { long lval; long rval; -}; +} zp_divmodresl; #if zp_std_c99 || zp_std_cxx11 -struct divmodresll { +typedef struct { long long lval; long long rval; -}; +} zp_divmodresll; #endif -struct zp_vec2d { +typedef struct { double x; double y; -}; -struct zp_vec2f { - float x; - float y; -}; -struct zp_vec2dl { +} zp_vec2d; +typedef struct { double long x; double long y; -}; +} zp_vec2dl; +typedef struct { + float x; + float y; +} zp_vec2f; -struct zp_vec3d { +typedef struct { double x; double y; double z; -}; -struct zp_vec3f { - float x; - float y; - float z; -}; -struct zp_vec3dl { +} zp_vec3d; +typedef struct { double long x; double long y; double long z; -}; +} zp_vec3dl; +typedef struct { + float x; + float y; + float z; +} zp_vec3f; -struct zp_vec4d { +typedef struct { double x; double y; double z; double w; -}; -struct zp_vec4f { - float x; - float y; - float z; - float w; -}; -struct zp_vec4dl { +} zp_vec4d; +typedef struct { double long x; double long y; double long z; double long w; -}; +} zp_vec4dl; +typedef struct { + float x; + float y; + float z; + float w; +} zp_vec4f; /* is not-a-number */ #define zp_isnand( val) ((bool)((val) != (val))) @@ -120,188 +120,188 @@ struct zp_vec4dl { #define zp_isnanf( val) ((bool)((val) != (val))) /* absolute */ -zp_nthw zp_unseq zp_useres double zp_absd( double val); -zp_nthw zp_unseq zp_useres double long zp_absdl(double long val); -zp_nthw zp_unseq zp_useres float zp_absf( float val); +zp_nothw zp_unseq zp_useres double zp_absd( double val); +zp_nothw zp_unseq zp_useres double long zp_absdl(double long val); +zp_nothw zp_unseq zp_useres float zp_absf( float val); /* arccosine */ -zp_nthw zp_unseq zp_useres double zp_acosd( double val); -zp_nthw zp_unseq zp_useres double long zp_acosdl(double long val); -zp_nthw zp_unseq zp_useres float zp_acosf( float val); +zp_nothw zp_unseq zp_useres double zp_acosd( double val); +zp_nothw zp_unseq zp_useres double long zp_acosdl(double long val); +zp_nothw zp_unseq zp_useres float zp_acosf( float val); /* arccotangent */ -zp_nthw zp_unseq zp_useres double zp_acotd( double val); -zp_nthw zp_unseq zp_useres double long zp_acotdl(double long val); -zp_nthw zp_unseq zp_useres float zp_acotf( float val); +zp_nothw zp_unseq zp_useres double zp_acotd( double val); +zp_nothw zp_unseq zp_useres double long zp_acotdl(double long val); +zp_nothw zp_unseq zp_useres float zp_acotf( float val); /* arccosecant */ -zp_nthw zp_unseq zp_useres double zp_acscd( double val); -zp_nthw zp_unseq zp_useres double long zp_acscdl(double long val); -zp_nthw zp_unseq zp_useres float zp_acscf( float val); +zp_nothw zp_unseq zp_useres double zp_acscd( double val); +zp_nothw zp_unseq zp_useres double long zp_acscdl(double long val); +zp_nothw zp_unseq zp_useres float zp_acscf( float val); /* arcsecant */ -zp_nthw zp_unseq zp_useres double zp_asecd( double val); -zp_nthw zp_unseq zp_useres double long zp_asecdl(double long val); -zp_nthw zp_unseq zp_useres float zp_asecf( float val); +zp_nothw zp_unseq zp_useres double zp_asecd( double val); +zp_nothw zp_unseq zp_useres double long zp_asecdl(double long val); +zp_nothw zp_unseq zp_useres float zp_asecf( float val); /* arcsine */ -zp_nthw zp_unseq zp_useres double zp_asind( double val); -zp_nthw zp_unseq zp_useres double long zp_asindl(double long val); -zp_nthw zp_unseq zp_useres float zp_asinf( float val); +zp_nothw zp_unseq zp_useres double zp_asind( double val); +zp_nothw zp_unseq zp_useres double long zp_asindl(double long val); +zp_nothw zp_unseq zp_useres float zp_asinf( float val); /* arctangens */ -zp_nthw zp_unseq zp_useres double zp_atand( double val); -zp_nthw zp_unseq zp_useres double long zp_atandl(double long val); -zp_nthw zp_unseq zp_useres float zp_atanf( float val); +zp_nothw zp_unseq zp_useres double zp_atand( double val); +zp_nothw zp_unseq zp_useres double long zp_atandl(double long val); +zp_nothw zp_unseq zp_useres float zp_atanf( float val); /* arctangens 2 */ -zp_nthw zp_unseq zp_useres double zp_atan2d( double y,double x); -zp_nthw zp_unseq zp_useres double long zp_atan2dl(double long y,double long x); -zp_nthw zp_unseq zp_useres float zp_atan2f( float y,float x); +zp_nothw zp_unseq zp_useres double zp_atan2d( double y,double x); +zp_nothw zp_unseq zp_useres double long zp_atan2dl(double long y,double long x); +zp_nothw zp_unseq zp_useres float zp_atan2f( float y,float x); /* cube root */ -zp_nthw zp_unseq zp_useres double zp_cbrtd( double val); -zp_nthw zp_unseq zp_useres double long zp_cbrtdl(double long val); -zp_nthw zp_unseq zp_useres float zp_cbrtf( float val); +zp_nothw zp_unseq zp_useres double zp_cbrtd( double val); +zp_nothw zp_unseq zp_useres double long zp_cbrtdl(double long val); +zp_nothw zp_unseq zp_useres float zp_cbrtf( float val); /* cosine */ -zp_nthw zp_unseq zp_useres double zp_cosd( double ang); -zp_nthw zp_unseq zp_useres double long zp_cosdl(double long ang); -zp_nthw zp_unseq zp_useres float zp_cosf( float ang); +zp_nothw zp_unseq zp_useres double zp_cosd( double ang); +zp_nothw zp_unseq zp_useres double long zp_cosdl(double long ang); +zp_nothw zp_unseq zp_useres float zp_cosf( float ang); /* cotangent */ -zp_nthw zp_unseq zp_useres double zp_cotd( double ang); -zp_nthw zp_unseq zp_useres double long zp_cotdl(double long ang); -zp_nthw zp_unseq zp_useres float zp_cotf( float ang); +zp_nothw zp_unseq zp_useres double zp_cotd( double ang); +zp_nothw zp_unseq zp_useres double long zp_cotdl(double long ang); +zp_nothw zp_unseq zp_useres float zp_cotf( float ang); /* cosecant */ -zp_nthw zp_unseq zp_useres double zp_cscd( double ang); -zp_nthw zp_unseq zp_useres double long zp_cscdl(double long ang); -zp_nthw zp_unseq zp_useres float zp_cscf( float ang); +zp_nothw zp_unseq zp_useres double zp_cscd( double ang); +zp_nothw zp_unseq zp_useres double long zp_cscdl(double long ang); +zp_nothw zp_unseq zp_useres float zp_cscf( float ang); /* two-space distance */ -zp_nthw zp_unseq zp_useres double zp_dst2d( double x,double y); -zp_nthw zp_unseq zp_useres double long zp_dst2dl(double long x,double long y); -zp_nthw zp_unseq zp_useres float zp_dst2f( float x,float y); +zp_nothw zp_unseq zp_useres double zp_dst2d( double x,double y); +zp_nothw zp_unseq zp_useres double long zp_dst2dl(double long x,double long y); +zp_nothw zp_unseq zp_useres float zp_dst2f( float x,float y); /* three-space distance */ -zp_nthw zp_unseq zp_useres double zp_dst3d( double x,double y,double z); -zp_nthw zp_unseq zp_useres double long zp_dst3dl(double long x,double long y,double long z); -zp_nthw zp_unseq zp_useres float zp_dst3f( float x,float y,float z); +zp_nothw zp_unseq zp_useres double zp_dst3d( double x,double y,double z); +zp_nothw zp_unseq zp_useres double long zp_dst3dl(double long x,double long y,double long z); +zp_nothw zp_unseq zp_useres float zp_dst3f( float x,float y,float z); /* four-space distance */ -zp_nthw zp_unseq zp_useres double zp_dst4d( double x,double y,double z,double w); -zp_nthw zp_unseq zp_useres double long zp_dst4dl(double long x,double long y,double long z,double long w); -zp_nthw zp_unseq zp_useres float zp_dst4f( float x,float y,float z,float w); +zp_nothw zp_unseq zp_useres double zp_dst4d( double x,double y,double z,double w); +zp_nothw zp_unseq zp_useres double long zp_dst4dl(double long x,double long y,double long z,double long w); +zp_nothw zp_unseq zp_useres float zp_dst4f( float x,float y,float z,float w); /* division-modulo */ -zp_nthw zp_unseq zp_useres struct divmodressc zp_divmodsc(char signed num,char signed den); -zp_nthw zp_unseq zp_useres struct divmodress zp_divmods( short num,short den); -zp_nthw zp_unseq zp_useres struct divmodresi zp_divmodi( int num,int den); -zp_nthw zp_unseq zp_useres struct divmodresl zp_divmodl( long num,long den); +zp_nothw zp_unseq zp_useres zp_divmodressc zp_divmodsc(char signed num,char signed den); +zp_nothw zp_unseq zp_useres zp_divmodress zp_divmods( short num,short den); +zp_nothw zp_unseq zp_useres zp_divmodresi zp_divmodi( int num,int den); +zp_nothw zp_unseq zp_useres zp_divmodresl zp_divmodl( long num,long den); #if zp_std_c99 || zp_std_cxx11 -zp_nthw zp_unseq zp_useres struct divmodresll zp_divmodll(long long num,long long den); +zp_nothw zp_unseq zp_useres zp_divmodresll zp_divmodll(long long num,long long den); #endif /* two-space dot product */ -zp_nthw zp_unseq zp_useres float zp_dot2f( zp_vec2f lvec,zp_vec2f rvec); -zp_nthw zp_unseq zp_useres double zp_dot2d( zp_vec2d lvec,zp_vec2d rvec); -zp_nthw zp_unseq zp_useres double long zp_dot2dl(zp_vec2dl lvec,zp_vec2dl rvec); +zp_nothw zp_unseq zp_useres float zp_dot2f( zp_vec2f lvec,zp_vec2f rvec); +zp_nothw zp_unseq zp_useres double zp_dot2d( zp_vec2d lvec,zp_vec2d rvec); +zp_nothw zp_unseq zp_useres double long zp_dot2dl(zp_vec2dl lvec,zp_vec2dl rvec); /* three-space dot product */ -zp_nthw zp_unseq zp_useres float zp_dot3f( zp_vec3f lvec,zp_vec3f rvec); -zp_nthw zp_unseq zp_useres double zp_dot3d( zp_vec3d lvec,zp_vec3d rvec); -zp_nthw zp_unseq zp_useres double long zp_dot3dl(zp_vec3dl lvec,zp_vec3dl rvec); +zp_nothw zp_unseq zp_useres float zp_dot3f( zp_vec3f lvec,zp_vec3f rvec); +zp_nothw zp_unseq zp_useres double zp_dot3d( zp_vec3d lvec,zp_vec3d rvec); +zp_nothw zp_unseq zp_useres double long zp_dot3dl(zp_vec3dl lvec,zp_vec3dl rvec); /* four-space dot product */ -zp_nthw zp_unseq zp_useres float zp_dot4f( zp_vec4f lvec,zp_vec4f rvec); -zp_nthw zp_unseq zp_useres double zp_dot4d( zp_vec4d lvec,zp_vec4d rvec); -zp_nthw zp_unseq zp_useres double long zp_dot4dl(zp_vec4dl lvec,zp_vec4dl rvec); +zp_nothw zp_unseq zp_useres float zp_dot4f( zp_vec4f lvec,zp_vec4f rvec); +zp_nothw zp_unseq zp_useres double zp_dot4d( zp_vec4d lvec,zp_vec4d rvec); +zp_nothw zp_unseq zp_useres double long zp_dot4dl(zp_vec4dl lvec,zp_vec4dl rvec); /* exponentation */ -zp_nthw zp_unseq zp_useres float zp_expd( float val,float n); -zp_nthw zp_unseq zp_useres double zp_expf( double val,double n); -zp_nthw zp_unseq zp_useres double long zp_expdl(double long val,double long n); +zp_nothw zp_unseq zp_useres float zp_expd( float val,float n); +zp_nothw zp_unseq zp_useres double zp_expf( double val,double n); +zp_nothw zp_unseq zp_useres double long zp_expdl(double long val,double long n); /* binary logarithm */ -zp_nthw zp_unseq zp_useres double zp_lbd( double val); -zp_nthw zp_unseq zp_useres double long zp_lbdl(double long val); -zp_nthw zp_unseq zp_useres float zp_lbf( float val); +zp_nothw zp_unseq zp_useres double zp_lbd( double val); +zp_nothw zp_unseq zp_useres double long zp_lbdl(double long val); +zp_nothw zp_unseq zp_useres float zp_lbf( float val); /* common logarithm */ -zp_nthw zp_unseq zp_useres double zp_lgd( double val); -zp_nthw zp_unseq zp_useres double long zp_lgdl(double long val); -zp_nthw zp_unseq zp_useres float zp_lgf( float val); +zp_nothw zp_unseq zp_useres double zp_lgd( double val); +zp_nothw zp_unseq zp_useres double long zp_lgdl(double long val); +zp_nothw zp_unseq zp_useres float zp_lgf( float val); /* natual logarithm */ -zp_nthw zp_unseq zp_useres double zp_lnd( double val); -zp_nthw zp_unseq zp_useres double long zp_lndl(double long val); -zp_nthw zp_unseq zp_useres float zp_lnf( float val); +zp_nothw zp_unseq zp_useres double zp_lnd( double val); +zp_nothw zp_unseq zp_useres double long zp_lndl(double long val); +zp_nothw zp_unseq zp_useres float zp_lnf( float val); /* logarithm */ -zp_nthw zp_unseq zp_useres double zp_logd( double val,double n); -zp_nthw zp_unseq zp_useres double long zp_logdl(double long val,double long n); -zp_nthw zp_unseq zp_useres float zp_logf( float val,float n); +zp_nothw zp_unseq zp_useres double zp_logd( double val,double n); +zp_nothw zp_unseq zp_useres double long zp_logdl(double long val,double long n); +zp_nothw zp_unseq zp_useres float zp_logf( float val,float n); /* nth root */ -zp_nthw zp_unseq zp_useres double zp_nrtd( double val,double n); -zp_nthw zp_unseq zp_useres double long zp_nrtdl(double long val,double long n); -zp_nthw zp_unseq zp_useres float zp_nrtf( float val,float n); +zp_nothw zp_unseq zp_useres double zp_nrtd( double val,double n); +zp_nothw zp_unseq zp_useres double long zp_nrtdl(double long val,double long n); +zp_nothw zp_unseq zp_useres float zp_nrtf( float val,float n); /* secant */ -zp_nthw zp_unseq zp_useres double zp_secd( double ang); -zp_nthw zp_unseq zp_useres double long zp_secdl(double long ang); -zp_nthw zp_unseq zp_useres float zp_secf( float ang); +zp_nothw zp_unseq zp_useres double zp_secd( double ang); +zp_nothw zp_unseq zp_useres double long zp_secdl(double long ang); +zp_nothw zp_unseq zp_useres float zp_secf( float ang); /* sine */ -zp_nthw zp_unseq zp_useres double zp_sind( double ang); -zp_nthw zp_unseq zp_useres double long zp_sindl(double long ang); -zp_nthw zp_unseq zp_useres float zp_sinf( float ang); +zp_nothw zp_unseq zp_useres double zp_sind( double ang); +zp_nothw zp_unseq zp_useres double long zp_sindl(double long ang); +zp_nothw zp_unseq zp_useres float zp_sinf( float ang); /* square root */ -zp_nthw zp_unseq zp_useres double zp_sqrtd( double val); -zp_nthw zp_unseq zp_useres double long zp_sqrtdl(double long val); -zp_nthw zp_unseq zp_useres float zp_sqrtf( float val); +zp_nothw zp_unseq zp_useres double zp_sqrtd( double val); +zp_nothw zp_unseq zp_useres double long zp_sqrtdl(double long val); +zp_nothw zp_unseq zp_useres float zp_sqrtf( float val); /* tangens */ -zp_nthw zp_unseq zp_useres double zp_tand( double ang); -zp_nthw zp_unseq zp_useres double long zp_tandl(double long ang); -zp_nthw zp_unseq zp_useres float zp_tanf( float ang); +zp_nothw zp_unseq zp_useres double zp_tand( double ang); +zp_nothw zp_unseq zp_useres double long zp_tandl(double long ang); +zp_nothw zp_unseq zp_useres float zp_tanf( float ang); /* "tesseract" (fourth) root */ -zp_nthw zp_unseq zp_useres double zp_tsrtd( double val); -zp_nthw zp_unseq zp_useres double long zp_tsrtdl(double long val); -zp_nthw zp_unseq zp_useres float zp_tsrtf( float val); +zp_nothw zp_unseq zp_useres double zp_tsrtd( double val); +zp_nothw zp_unseq zp_useres double long zp_tsrtdl(double long val); +zp_nothw zp_unseq zp_useres float zp_tsrtf( float val); /* two-space vector addition */ -zp_nthw zp_unseq zp_useres zp_vec2f zp_vadd2f( zp_vec2f lvec,zp_vec2f rvec); -zp_nthw zp_unseq zp_useres zp_vec2d zp_vadd2d( zp_vec2d lvec,zp_vec2d rvec); -zp_nthw zp_unseq zp_useres zp_vec2dl zp_vadd2dl(zp_vec2dl lvec,zp_vec2dl rvec); +zp_nothw zp_unseq zp_useres zp_vec2f zp_vadd2f( zp_vec2f lvec,zp_vec2f rvec); +zp_nothw zp_unseq zp_useres zp_vec2d zp_vadd2d( zp_vec2d lvec,zp_vec2d rvec); +zp_nothw zp_unseq zp_useres zp_vec2dl zp_vadd2dl(zp_vec2dl lvec,zp_vec2dl rvec); /* three-space vector addition */ -zp_nthw zp_unseq zp_useres zp_vec3f zp_vadd3f( zp_vec3f lvec,zp_vec3f rvec); -zp_nthw zp_unseq zp_useres zp_vec3d zp_vadd3d( zp_vec3d lvec,zp_vec3d rvec); -zp_nthw zp_unseq zp_useres zp_vec3dl zp_vadd3dl(zp_vec3dl lvec,zp_vec3dl rvec); +zp_nothw zp_unseq zp_useres zp_vec3f zp_vadd3f( zp_vec3f lvec,zp_vec3f rvec); +zp_nothw zp_unseq zp_useres zp_vec3d zp_vadd3d( zp_vec3d lvec,zp_vec3d rvec); +zp_nothw zp_unseq zp_useres zp_vec3dl zp_vadd3dl(zp_vec3dl lvec,zp_vec3dl rvec); /* four-space vector addition */ -zp_nthw zp_unseq zp_useres zp_vec4f zp_v4addf( zp_vec4f lvec,zp_vec4f rvec); -zp_nthw zp_unseq zp_useres zp_vec4d zp_v4addd( zp_vec4d lvec,zp_vec4d rvec); -zp_nthw zp_unseq zp_useres zp_vec4dl zp_v4adddl(zp_vec4dl lvec,zp_vec4dl rvec); +zp_nothw zp_unseq zp_useres zp_vec4f zp_v4addf( zp_vec4f lvec,zp_vec4f rvec); +zp_nothw zp_unseq zp_useres zp_vec4d zp_v4addd( zp_vec4d lvec,zp_vec4d rvec); +zp_nothw zp_unseq zp_useres zp_vec4dl zp_v4adddl(zp_vec4dl lvec,zp_vec4dl rvec); /* two-space vector subtraction */ -zp_nthw zp_unseq zp_useres zp_vec2f zp_vsub2f( zp_vec2f lvec,zp_vec2f rvec); -zp_nthw zp_unseq zp_useres zp_vec2d zp_vsub2d( zp_vec2d lvec,zp_vec2d rvec); -zp_nthw zp_unseq zp_useres zp_vec2dl zp_vsub2dl(zp_vec2dl lvec,zp_vec2dl rvec); +zp_nothw zp_unseq zp_useres zp_vec2f zp_vsub2f( zp_vec2f lvec,zp_vec2f rvec); +zp_nothw zp_unseq zp_useres zp_vec2d zp_vsub2d( zp_vec2d lvec,zp_vec2d rvec); +zp_nothw zp_unseq zp_useres zp_vec2dl zp_vsub2dl(zp_vec2dl lvec,zp_vec2dl rvec); /* three-space vector subtraction */ -zp_nthw zp_unseq zp_useres zp_vec3f zp_vsub3f( zp_vec3f lvec,zp_vec3f rvec); -zp_nthw zp_unseq zp_useres zp_vec3d zp_vsub3d( zp_vec3d lvec,zp_vec3d rvec); -zp_nthw zp_unseq zp_useres zp_vec3dl zp_vsub3dl(zp_vec3dl lvec,zp_vec3dl rvec); +zp_nothw zp_unseq zp_useres zp_vec3f zp_vsub3f( zp_vec3f lvec,zp_vec3f rvec); +zp_nothw zp_unseq zp_useres zp_vec3d zp_vsub3d( zp_vec3d lvec,zp_vec3d rvec); +zp_nothw zp_unseq zp_useres zp_vec3dl zp_vsub3dl(zp_vec3dl lvec,zp_vec3dl rvec); /* four-space vector subtraction */ -zp_nthw zp_unseq zp_useres zp_vec4f zp_v4subf( zp_vec4f lvec,zp_vec4f rvec); -zp_nthw zp_unseq zp_useres zp_vec4d zp_v4subd( zp_vec4d lvec,zp_vec4d rvec); -zp_nthw zp_unseq zp_useres zp_vec4dl zp_v4subdl(zp_vec4dl lvec,zp_vec4dl rvec); +zp_nothw zp_unseq zp_useres zp_vec4f zp_v4subf( zp_vec4f lvec,zp_vec4f rvec); +zp_nothw zp_unseq zp_useres zp_vec4d zp_v4subd( zp_vec4d lvec,zp_vec4d rvec); +zp_nothw zp_unseq zp_useres zp_vec4dl zp_v4subdl(zp_vec4dl lvec,zp_vec4dl rvec); zp_prv_cdeclend diff --git a/zp/include/zp/str b/zp/include/zp/str index ae9a721..0e7cf0f 100644 --- a/zp/include/zp/str +++ b/zp/include/zp/str @@ -12,45 +12,45 @@ namespace zp { namespace prv { - template<typename typ> zp_nthw zp_useres ::zp::siz numdig(typ val,::zp::i8m bs); + template<typename typ> zp_nothw zp_useres ::zp::siz numdig(typ val,::zp::i8m bs); } - zp_iln zp_nthw inline ::zp::siz strcpy(char * dst, char const * src) {return ::zp_strcpy(dst,src);} - zp_iln zp_nthw zp_useres inline bool strequ(char const * lstr,char const * rstr) {return ::zp_strequ(lstr,rstr);} - zp_iln zp_nthw zp_useres inline ::zp::siz strfil(char * str,char chr) {return ::zp_strfil(str,chr);} - zp_iln zp_nthw inline ::zp::siz strlen(char const * str) {return ::zp_strlen(str);} - zp_iln zp_nthw zp_useres inline char * strsrh(char * str, char chr) {return ::zp_strsrh(str,chr);} - zp_iln zp_nthw zp_useres inline char const * strsrh(char const * str, char chr) {return const_cast<char const *>(::zp_strsrh(str,chr));} - - zp_iln zp_nthw inline ::zp::siz wstrcpy(wchar_t * dst, wchar_t const * src) {return ::zp_wstrcpy(dst,src);} - zp_iln zp_nthw zp_useres inline bool wstrequ(wchar_t const * lstr,wchar_t const * rstr) {return ::zp_wstrequ(lstr,rstr);} - zp_iln zp_nthw zp_useres inline ::zp::siz wstrfil(wchar_t * str,wchar_t chr) {return ::zp_wstrfil(str,chr);} - zp_iln zp_nthw inline ::zp::siz wstrlen(wchar_t const * str) {return ::zp_wstrlen(str);} - zp_iln zp_nthw zp_useres inline wchar_t * wstrsrh(wchar_t * str, wchar_t chr) {return ::zp_wstrsrh(str,chr);} - zp_iln zp_nthw zp_useres inline wchar_t const * wstrsrh(wchar_t const * str, wchar_t chr) {return const_cast<wchar_t const *>(::zp_wstrsrh(str,chr));} - - zp_iln zp_nthw inline ::zp::siz utf32cpy(::zp::c02 * dst, ::zp::c02 const * src) {return ::zp_utf32cpy(dst,src);} - zp_iln zp_nthw zp_useres inline bool utf32equ(::zp::c02 const * lstr,::zp::c02 const * rstr) {return ::zp_utf32equ(lstr,rstr);} - zp_iln zp_nthw zp_useres inline ::zp::siz utf32fil(::zp::c02 * str, ::zp::c02 chr) {return ::zp_utf32fil(str,chr);} - zp_iln zp_nthw inline ::zp::siz utf32len(::zp::c02 const * str) {return ::zp_utf32len(str);} - zp_iln zp_nthw zp_useres inline ::zp::c02 * utf32srh(::zp::c02 * str, ::zp::c02 chr) {return ::zp_utf32srh(str,chr);} - zp_iln zp_nthw zp_useres inline ::zp::c02 const * utf32srh(::zp::c02 const * str, ::zp::c02 chr) {return const_cast< ::zp::c02 const *>(::zp_utf32srh(str,chr));} - - zp_iln zp_nthw zp_useres inline ::zp::siz utf8enclen( ::zp::c02 const * str) {return ::zp_utf8enclen(str);} - zp_iln zp_nthw zp_useres inline ::zp::siz utf8declen( ::zp::c8 const * str) {return ::zp_utf8declen(str);} - zp_iln zp_nthw zp_useres inline ::zp::siz utf16enclen(::zp::c02 const * str) {return ::zp_utf16enclen(str);} - zp_iln zp_nthw zp_useres inline ::zp::siz utf16declen(::zp::c01 const * str) {return ::zp_utf16declen(str);} - - zp_iln zp_nthw inline void utf8enc( ::zp::c8 * dst,::zp::c02 const * src) {return ::zp_utf8enc(dst,src);} - zp_iln zp_nthw inline void utf8dec( ::zp::c02 * dst,::zp::c8 const * src) {return ::zp_utf8dec(dst,src);} - zp_iln zp_nthw inline void utf16enc( ::zp::c01 * dst,::zp::c02 const * src) {return ::zp_utf16enc(dst,src);} - zp_iln zp_nthw inline void utf16dec( ::zp::c02 * dst,::zp::c01 const * src) {return ::zp_utf16dec(dst,src);} - zp_iln zp_nthw inline void win1252enc(::zp::c8 * dst,::zp::c02 const * src) {return ::zp_win1252enc(dst,src);} - zp_iln zp_nthw inline void win1252dec(::zp::c02 * dst,::zp::c8 const * src) {return ::zp_win1252dec(dst,src);} - - //template<typename typ> zp_nthw zp_useres ::zp::siz fmtlen(typ val,::zp::i8m bs); /* Including (potential) decorations. */ - - //template<typename typ> zp_nthw void fmt(::zp::c02 * buf,typ val,::zp::i8m bs,bool rtl = false); + zp_iln zp_nothw inline ::zp::siz strcpy(char * dst, char const * src) {return ::zp_strcpy(dst,src);} + zp_iln zp_nothw zp_useres inline bool strequ(char const * lstr,char const * rstr) {return ::zp_strequ(lstr,rstr);} + zp_iln zp_nothw zp_useres inline ::zp::siz strfil(char * str,char chr) {return ::zp_strfil(str,chr);} + zp_iln zp_nothw inline ::zp::siz strlen(char const * str) {return ::zp_strlen(str);} + zp_iln zp_nothw zp_useres inline char * strsrh(char * str, char chr) {return ::zp_strsrh(str,chr);} + zp_iln zp_nothw zp_useres inline char const * strsrh(char const * str, char chr) {return const_cast<char const *>(::zp_strsrh(str,chr));} + + zp_iln zp_nothw inline ::zp::siz wstrcpy(wchar_t * dst, wchar_t const * src) {return ::zp_wstrcpy(dst,src);} + zp_iln zp_nothw zp_useres inline bool wstrequ(wchar_t const * lstr,wchar_t const * rstr) {return ::zp_wstrequ(lstr,rstr);} + zp_iln zp_nothw zp_useres inline ::zp::siz wstrfil(wchar_t * str,wchar_t chr) {return ::zp_wstrfil(str,chr);} + zp_iln zp_nothw inline ::zp::siz wstrlen(wchar_t const * str) {return ::zp_wstrlen(str);} + zp_iln zp_nothw zp_useres inline wchar_t * wstrsrh(wchar_t * str, wchar_t chr) {return ::zp_wstrsrh(str,chr);} + zp_iln zp_nothw zp_useres inline wchar_t const * wstrsrh(wchar_t const * str, wchar_t chr) {return const_cast<wchar_t const *>(::zp_wstrsrh(str,chr));} + + zp_iln zp_nothw inline ::zp::siz utf32cpy(::zp::c02 * dst, ::zp::c02 const * src) {return ::zp_utf32cpy(dst,src);} + zp_iln zp_nothw zp_useres inline bool utf32equ(::zp::c02 const * lstr,::zp::c02 const * rstr) {return ::zp_utf32equ(lstr,rstr);} + zp_iln zp_nothw zp_useres inline ::zp::siz utf32fil(::zp::c02 * str, ::zp::c02 chr) {return ::zp_utf32fil(str,chr);} + zp_iln zp_nothw inline ::zp::siz utf32len(::zp::c02 const * str) {return ::zp_utf32len(str);} + zp_iln zp_nothw zp_useres inline ::zp::c02 * utf32srh(::zp::c02 * str, ::zp::c02 chr) {return ::zp_utf32srh(str,chr);} + zp_iln zp_nothw zp_useres inline ::zp::c02 const * utf32srh(::zp::c02 const * str, ::zp::c02 chr) {return const_cast< ::zp::c02 const *>(::zp_utf32srh(str,chr));} + + zp_iln zp_nothw zp_useres inline ::zp::siz utf8enclen( ::zp::c02 const * str) {return ::zp_utf8enclen(str);} + zp_iln zp_nothw zp_useres inline ::zp::siz utf8declen( ::zp::c8 const * str) {return ::zp_utf8declen(str);} + zp_iln zp_nothw zp_useres inline ::zp::siz utf16enclen(::zp::c02 const * str) {return ::zp_utf16enclen(str);} + zp_iln zp_nothw zp_useres inline ::zp::siz utf16declen(::zp::c01 const * str) {return ::zp_utf16declen(str);} + + zp_iln zp_nothw inline void utf8enc( ::zp::c8 * dst,::zp::c02 const * src) {return ::zp_utf8enc(dst,src);} + zp_iln zp_nothw inline void utf8dec( ::zp::c02 * dst,::zp::c8 const * src) {return ::zp_utf8dec(dst,src);} + zp_iln zp_nothw inline void utf16enc( ::zp::c01 * dst,::zp::c02 const * src) {return ::zp_utf16enc(dst,src);} + zp_iln zp_nothw inline void utf16dec( ::zp::c02 * dst,::zp::c01 const * src) {return ::zp_utf16dec(dst,src);} + zp_iln zp_nothw inline void win1252enc(::zp::c8 * dst,::zp::c02 const * src) {return ::zp_win1252enc(dst,src);} + zp_iln zp_nothw inline void win1252dec(::zp::c02 * dst,::zp::c8 const * src) {return ::zp_win1252dec(dst,src);} + + //template<typename typ> zp_nothw zp_useres ::zp::siz fmtlen(typ val,::zp::i8m bs); /* Including (potential) decorations. */ + + //template<typename typ> zp_nothw void fmt(::zp::c02 * buf,typ val,::zp::i8m bs,bool rtl = false); } #include <zp/imp/str.ii> diff --git a/zp/include/zp/str.h b/zp/include/zp/str.h index 6fe716a..ba51f5f 100644 --- a/zp/include/zp/str.h +++ b/zp/include/zp/str.h @@ -11,60 +11,60 @@ zp_prv_cdecl -zp_nthw zp_siz zp_strcpy(char * dst, char const * src); -zp_nthw zp_useres bool zp_strequ(char const * lstr,char const * rstr); -zp_nthw zp_siz zp_strfil(char * str, char chr); -zp_nthw zp_siz zp_strlen(char const * str); -zp_nthw char * zp_strsrh(char const * str, char chr); +zp_nothw zp_siz zp_strcpy(char * dst, char const * src); +zp_nothw zp_useres bool zp_strequ(char const * lstr,char const * rstr); +zp_nothw zp_siz zp_strfil(char * str, char chr); +zp_nothw zp_siz zp_strlen(char const * str); +zp_nothw char * zp_strsrh(char const * str, char chr); -zp_nthw zp_siz zp_wstrcpy(zp_wchr * dst, zp_wchr const * src); -zp_nthw zp_useres bool zp_wstrequ(zp_wchr const * lstr,zp_wchr const * rstr); -zp_nthw zp_siz zp_wstrfil(zp_wchr * str, zp_wchr chr); -zp_nthw zp_siz zp_wstrlen(zp_wchr const * str); -zp_nthw zp_wchr * zp_wstrsrh(zp_wchr const * str, zp_wchr chr); +zp_nothw zp_siz zp_wstrcpy(zp_wchr * dst, zp_wchr const * src); +zp_nothw zp_useres bool zp_wstrequ(zp_wchr const * lstr,zp_wchr const * rstr); +zp_nothw zp_siz zp_wstrfil(zp_wchr * str, zp_wchr chr); +zp_nothw zp_siz zp_wstrlen(zp_wchr const * str); +zp_nothw zp_wchr * zp_wstrsrh(zp_wchr const * str, zp_wchr chr); -zp_nthw zp_siz zp_utf32cpy(zp_c02 * dst, zp_c02 const * src); -zp_nthw zp_useres bool zp_utf32equ(zp_c02 const * lstr,zp_c02 const * rstr); -zp_nthw zp_siz zp_utf32fil(zp_c02 * str, zp_c02 chr); -zp_nthw zp_siz zp_utf32len(zp_c02 const * str); -zp_nthw zp_c02 * zp_utf32srh(zp_c02 const * str, zp_c02 chr); +zp_nothw zp_siz zp_utf32cpy(zp_c02 * dst, zp_c02 const * src); +zp_nothw zp_useres bool zp_utf32equ(zp_c02 const * lstr,zp_c02 const * rstr); +zp_nothw zp_siz zp_utf32fil(zp_c02 * str, zp_c02 chr); +zp_nothw zp_siz zp_utf32len(zp_c02 const * str); +zp_nothw zp_c02 * zp_utf32srh(zp_c02 const * str, zp_c02 chr); -zp_nthw zp_useres zp_siz zp_utf8enclen( zp_c02 const * str); -zp_nthw zp_useres zp_siz zp_utf8declen( zp_c8 const * str); -zp_nthw zp_useres zp_siz zp_utf16enclen(zp_c02 const * str); -zp_nthw zp_useres zp_siz zp_utf16declen(zp_c01 const * str); +zp_nothw zp_useres zp_siz zp_utf8enclen( zp_c02 const * str); +zp_nothw zp_useres zp_siz zp_utf8declen( zp_c8 const * str); +zp_nothw zp_useres zp_siz zp_utf16enclen(zp_c02 const * str); +zp_nothw zp_useres zp_siz zp_utf16declen(zp_c01 const * str); -zp_nthw void zp_utf8enc( zp_c8 * dst,zp_c02 const * src); -zp_nthw void zp_utf8dec( zp_c02 * dst,zp_c8 const * src); -zp_nthw void zp_utf16enc( zp_c01 * dst,zp_c02 const * src); -zp_nthw void zp_utf16dec( zp_c02 * dst,zp_c01 const * src); -zp_nthw void zp_win1252enc(zp_c8 * dst,zp_c02 const * src); -zp_nthw void zp_win1252dec(zp_c02 * dst,zp_c8 const * src); +zp_nothw void zp_utf8enc( zp_c8 * dst,zp_c02 const * src); +zp_nothw void zp_utf8dec( zp_c02 * dst,zp_c8 const * src); +zp_nothw void zp_utf16enc( zp_c01 * dst,zp_c02 const * src); +zp_nothw void zp_utf16dec( zp_c02 * dst,zp_c01 const * src); +zp_nothw void zp_win1252enc(zp_c8 * dst,zp_c02 const * src); +zp_nothw void zp_win1252dec(zp_c02 * dst,zp_c8 const * src); -zp_nthw zp_useres zp_siz zp_fmtleni( int val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlenl( long val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlens( short val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlensc( char signed val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlenuc( char unsigned val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlenui( int unsigned val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlenul( long unsigned val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlenus( short unsigned val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtleni( int val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlenl( long val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlens( short val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlensc( char signed val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlenuc( char unsigned val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlenui( int unsigned val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlenul( long unsigned val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlenus( short unsigned val,zp_i8m bs); #if zp_std_c99 || zp_std_cxx11 -zp_nthw zp_useres zp_siz zp_fmtlenll( long long val,zp_i8m bs); -zp_nthw zp_useres zp_siz zp_fmtlenull(long long unsigned val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlenll( long long val,zp_i8m bs); +zp_nothw zp_useres zp_siz zp_fmtlenull(long long unsigned val,zp_i8m bs); #endif -zp_nthw void zp_fmti( zp_c02 * buf,int val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmtl( zp_c02 * buf,long val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmts( zp_c02 * buf,short val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmtsc( zp_c02 * buf,char signed val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmtuc( zp_c02 * buf,char unsigned val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmtui( zp_c02 * buf,int unsigned val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmtul( zp_c02 * buf,long unsigned val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmtus( zp_c02 * buf,short unsigned val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmti( zp_c02 * buf,int val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtl( zp_c02 * buf,long val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmts( zp_c02 * buf,short val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtsc( zp_c02 * buf,char signed val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtuc( zp_c02 * buf,char unsigned val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtui( zp_c02 * buf,int unsigned val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtul( zp_c02 * buf,long unsigned val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtus( zp_c02 * buf,short unsigned val,zp_i8m bs,bool rtl); #if zp_std_c99 || zp_std_cxx11 -zp_nthw void zp_fmtll( zp_c02 * buf,long long val,zp_i8m bs,bool rtl); -zp_nthw void zp_fmtull(zp_c02 * buf,long long unsigned val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtll( zp_c02 * buf,long long val,zp_i8m bs,bool rtl); +zp_nothw void zp_fmtull(zp_c02 * buf,long long unsigned val,zp_i8m bs,bool rtl); #endif zp_prv_cdeclend diff --git a/zp/include/zp/zp b/zp/include/zp/zp index 1efbf0e..32e13be 100644 --- a/zp/include/zp/zp +++ b/zp/include/zp/zp @@ -4,8 +4,8 @@ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>. */ -#ifndef zp_prv_cxxhdr_bs -#define zp_prv_cxxhdr_bs +#ifndef zp_prv_cxxhdr_zp +#define zp_prv_cxxhdr_zp #ifndef __cplusplus #error C++ header included from C @@ -24,9 +24,9 @@ translation units has undefined behaviour. */ #if zp_std_cxx11 -#define zp_prv_trtval(typ) constexpr typ +#define zp_prv_trtval (typ) constexpr typ #else -#define zp_prv_trtval(typ) static typ const +#define zp_prv_trtval (typ) static typ const #endif namespace zp { @@ -330,21 +330,27 @@ namespace zp { template<typename typ> concept inttyp = ::zp::isinttyp<typ>::val; #endif - zp_prv_trtval(::zp::i04m) api = zp_api; - zp_prv_trtval(::zp::i04m) ext = zp_ext; + namespace det { + template<typename typ> struct vertyp { + typ api; + typ ext; + }; + } - zp_prv_trtval(::zp::siz) bytelen = zp_bytelen; + zp_prv_trtval (::zp::det::vertyp< ::zp::i04>) ver = {zp_apiver,zp_extver}; - zp_prv_trtval(::zp::siz) nopos = zp_nopos; + zp_prv_trtval (::zp::siz) bytelen = zp_bytelen; - zp_prv_trtval(::zp::c02) unimax = zp_unimax; + zp_prv_trtval (::zp::siz) nopos = zp_nopos; + + zp_prv_trtval (::zp::c02) unimax = zp_unimax; #if zp_std_cxx11 zp_iln constexpr auto iscstevl() noexcept -> bool; // is constant-evaluated #endif - zp_iln zp_noret zp_nthw inline void trp() {::zp_trp();} - zp_iln zp_noret zp_nthw inline void urch() {zp_unrch();} + zp_iln zp_noret zp_nothw inline void trp() {::zp_trp();} + zp_iln zp_noret zp_nothw inline void urch() {zp_unrch();} #if zp_std_cxx11 // We cannot use template parameter packs before C++11, so this function becomes quite non-trivial to implement. template<typename... typs> zp_iln inline auto syscal(::zp::syscalidt idt,typs const &... args) -> ::zp::syscalres {return ::zp_syscal(idt,args...);} diff --git a/zp/include/zp/zp.h b/zp/include/zp/zp.h index 4b20273..e6c7580 100644 --- a/zp/include/zp/zp.h +++ b/zp/include/zp/zp.h @@ -16,8 +16,8 @@ └→ str */ -#ifndef zp_prv_hdr_bs -#define zp_prv_hdr_bs +#ifndef zp_prv_hdr_zp +#define zp_prv_hdr_zp /* Sources for pre-defined macros: @@ -193,11 +193,11 @@ typedef char unsigned zp_prv_bool; #endif #if zp_prv_hasatr(__nothrow__) -#define zp_nthw __attribute__ ((__nothrow__)) +#define zp_nothw __attribute__ ((__nothrow__)) #elif zp_imp_msvc -#define zp_nthw __declspec (nothrow) +#define zp_nothw __declspec (nothrow) #else -#define zp_nthw +#define zp_nothw #endif #if zp_prv_hasatr(__const__) @@ -275,8 +275,8 @@ typedef typeof (nullptr) zp_nulptrtyp; typedef decltype (nullptr) zp_nulptrtyp; #endif -#define zp_api ((zp_i04m)+0x1u) /* Programs expecting this version will still compile with the current extension version. */ -#define zp_ext ((zp_i04m)+0x0u) /* The extension versions adds functionality without breaking the existing ones. */ +#define zp_apiver ((zp_i04m)+0x1u) /* Programs expecting this version will still compile with the current extension version. */ +#define zp_extver ((zp_i04m)+0x0u) /* The extension versions adds functionality without breaking the existing ones. */ /* The patch version is not public as it only changes implementation details. */ #define zp_bytelen ((zp_siz)+0x8u) diff --git a/zp/source/any/mem/memcpy.c b/zp/source/any/mem/memcpy.c index dbfbebd..f9848df 100644 --- a/zp/source/any/mem/memcpy.c +++ b/zp/source/any/mem/memcpy.c @@ -6,8 +6,8 @@ #include <zp/mem.h> -zp_nthw struct zp_cpyres zp_memcpy(void * const dstptr,void const * const srcptr,zp_siz const num) { - struct zp_cpyres res; +zp_nothw zp_cpyres zp_memcpy(void * const dstptr,void const * const srcptr,zp_siz const num) { + zp_cpyres res; char unsigned * dst = dstptr; char unsigned const * src = srcptr; diff --git a/zp/source/any/mth/abs.cc b/zp/source/any/mth/abs.cc index 55cfe0f..4164643 100644 --- a/zp/source/any/mth/abs.cc +++ b/zp/source/any/mth/abs.cc @@ -7,7 +7,7 @@ #include <zp/mth> extern "C" { - zp_nthw float zp_absf( float const val) {return ::zp::abs(val);} - zp_nthw double zp_absd( double const val) {return ::zp::abs(val);} - zp_nthw double long zp_absdl(double long const val) {return ::zp::abs(val);} + zp_nothw float zp_absf( float const val) {return ::zp::abs(val);} + zp_nothw double zp_absd( double const val) {return ::zp::abs(val);} + zp_nothw double long zp_absdl(double long const val) {return ::zp::abs(val);} } diff --git a/zp/source/any/mth/divmod.cc b/zp/source/any/mth/divmod.cc index ab3621a..f51cb76 100644 --- a/zp/source/any/mth/divmod.cc +++ b/zp/source/any/mth/divmod.cc @@ -7,9 +7,9 @@ #include <zp/mth> extern "C" { - zp_nthw auto zp_divmodsc(char signed const num,char signed const den) -> ::divmodressc {return ::zp::divmod(num,den).cpair();} - zp_nthw auto zp_divmods( short const num,short const den) -> ::divmodress {return ::zp::divmod(num,den).cpair();} - zp_nthw auto zp_divmodi( int const num,int const den) -> ::divmodresi {return ::zp::divmod(num,den).cpair();} - zp_nthw auto zp_divmodl( long const num,long const den) -> ::divmodresl {return ::zp::divmod(num,den).cpair();} - zp_nthw auto zp_divmodll(long long const num,long long const den) -> ::divmodresll {return ::zp::divmod(num,den).cpair();} + zp_nothw auto zp_divmodsc(char signed const num,char signed const den) -> ::divmodressc {return ::zp::divmod(num,den).cpair();} + zp_nothw auto zp_divmods( short const num,short const den) -> ::divmodress {return ::zp::divmod(num,den).cpair();} + zp_nothw auto zp_divmodi( int const num,int const den) -> ::divmodresi {return ::zp::divmod(num,den).cpair();} + zp_nothw auto zp_divmodl( long const num,long const den) -> ::divmodresl {return ::zp::divmod(num,den).cpair();} + zp_nothw auto zp_divmodll(long long const num,long long const den) -> ::divmodresll {return ::zp::divmod(num,den).cpair();} } diff --git a/zp/source/any/mth/dot.cc b/zp/source/any/mth/dot.cc index ac58cac..55ddd38 100644 --- a/zp/source/any/mth/dot.cc +++ b/zp/source/any/mth/dot.cc @@ -7,15 +7,15 @@ #include <zp/mth> extern "C" { - zp_nthw auto zp_dot2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> float {return ::zp::dot(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,});} - zp_nthw auto zp_dot2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> double {return ::zp::dot(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,});} - zp_nthw auto zp_dot2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> double long {return ::zp::dot(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,});} + zp_nothw auto zp_dot2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> float {return ::zp::dot(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,});} + zp_nothw auto zp_dot2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> double {return ::zp::dot(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,});} + zp_nothw auto zp_dot2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> double long {return ::zp::dot(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,});} - zp_nthw auto zp_dot3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> float {return ::zp::dot(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,});} - zp_nthw auto zp_dot3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> double {return ::zp::dot(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,});} - zp_nthw auto zp_dot3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> double long {return ::zp::dot(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,});} + zp_nothw auto zp_dot3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> float {return ::zp::dot(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,});} + zp_nothw auto zp_dot3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> double {return ::zp::dot(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,});} + zp_nothw auto zp_dot3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> double long {return ::zp::dot(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,});} - zp_nthw auto zp_dot4f( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> float {return ::zp::dot(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,});} - zp_nthw auto zp_dot4d( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> double {return ::zp::dot(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,});} - zp_nthw auto zp_dot4dl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> double long {return ::zp::dot(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,});} + zp_nothw auto zp_dot4f( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> float {return ::zp::dot(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,});} + zp_nothw auto zp_dot4d( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> double {return ::zp::dot(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,});} + zp_nothw auto zp_dot4dl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> double long {return ::zp::dot(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,});} } diff --git a/zp/source/any/mth/vadd.cc b/zp/source/any/mth/vadd.cc index 31c3dc3..cca0041 100644 --- a/zp/source/any/mth/vadd.cc +++ b/zp/source/any/mth/vadd.cc @@ -7,15 +7,15 @@ #include <zp/mth> extern "C" { - zp_nthw auto zp_vadd2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> ::zp_vec2f {return ::zp::vadd(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,}).cvec();} - zp_nthw auto zp_vadd2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> ::zp_vec2d {return ::zp::vadd(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,}).cvec();} - zp_nthw auto zp_vadd2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> ::zp_vec2dl {return ::zp::vadd(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,}).cvec();} + zp_nothw auto zp_vadd2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> ::zp_vec2f {return ::zp::vadd(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,}).cvec();} + zp_nothw auto zp_vadd2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> ::zp_vec2d {return ::zp::vadd(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,}).cvec();} + zp_nothw auto zp_vadd2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> ::zp_vec2dl {return ::zp::vadd(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,}).cvec();} - zp_nthw auto zp_vadd3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> ::zp_vec3f {return ::zp::vadd(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,}).cvec();} - zp_nthw auto zp_vadd3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> ::zp_vec3d {return ::zp::vadd(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,}).cvec();} - zp_nthw auto zp_vadd3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> ::zp_vec3dl {return ::zp::vadd(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,}).cvec();} + zp_nothw auto zp_vadd3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> ::zp_vec3f {return ::zp::vadd(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,}).cvec();} + zp_nothw auto zp_vadd3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> ::zp_vec3d {return ::zp::vadd(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,}).cvec();} + zp_nothw auto zp_vadd3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> ::zp_vec3dl {return ::zp::vadd(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,}).cvec();} - zp_nthw auto zp_v4addf( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> ::zp_vec4f {return ::zp::vadd(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} - zp_nthw auto zp_v4addd( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> ::zp_vec4d {return ::zp::vadd(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} - zp_nthw auto zp_v4adddl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> ::zp_vec4dl {return ::zp::vadd(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} + zp_nothw auto zp_v4addf( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> ::zp_vec4f {return ::zp::vadd(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} + zp_nothw auto zp_v4addd( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> ::zp_vec4d {return ::zp::vadd(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} + zp_nothw auto zp_v4adddl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> ::zp_vec4dl {return ::zp::vadd(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} } diff --git a/zp/source/any/mth/vsub.cc b/zp/source/any/mth/vsub.cc index feac3e6..466655a 100644 --- a/zp/source/any/mth/vsub.cc +++ b/zp/source/any/mth/vsub.cc @@ -7,15 +7,15 @@ #include <zp/mth> extern "C" { - zp_nthw auto zp_vsub2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> ::zp_vec2f {return ::zp::vsub(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,}).cvec();} - zp_nthw auto zp_vsub2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> ::zp_vec2d {return ::zp::vsub(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,}).cvec();} - zp_nthw auto zp_vsub2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> ::zp_vec2dl {return ::zp::vsub(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,}).cvec();} + zp_nothw auto zp_vsub2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> ::zp_vec2f {return ::zp::vsub(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,}).cvec();} + zp_nothw auto zp_vsub2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> ::zp_vec2d {return ::zp::vsub(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,}).cvec();} + zp_nothw auto zp_vsub2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> ::zp_vec2dl {return ::zp::vsub(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,}).cvec();} - zp_nthw auto zp_vsub3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> ::zp_vec3f {return ::zp::vsub(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,}).cvec();} - zp_nthw auto zp_vsub3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> ::zp_vec3d {return ::zp::vsub(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,}).cvec();} - zp_nthw auto zp_vsub3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> ::zp_vec3dl {return ::zp::vsub(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,}).cvec();} + zp_nothw auto zp_vsub3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> ::zp_vec3f {return ::zp::vsub(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,}).cvec();} + zp_nothw auto zp_vsub3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> ::zp_vec3d {return ::zp::vsub(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,}).cvec();} + zp_nothw auto zp_vsub3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> ::zp_vec3dl {return ::zp::vsub(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,}).cvec();} - zp_nthw auto zp_v4subf( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> ::zp_vec4f {return ::zp::vsub(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} - zp_nthw auto zp_v4subd( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> ::zp_vec4d {return ::zp::vsub(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} - zp_nthw auto zp_v4subdl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> ::zp_vec4dl {return ::zp::vsub(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} + zp_nothw auto zp_v4subf( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> ::zp_vec4f {return ::zp::vsub(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} + zp_nothw auto zp_v4subd( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> ::zp_vec4d {return ::zp::vsub(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} + zp_nothw auto zp_v4subdl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> ::zp_vec4dl {return ::zp::vsub(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();} } diff --git a/zp/source/any/str/fmt.cc b/zp/source/any/str/fmt.cc index 8abe76f..4edb623 100644 --- a/zp/source/any/str/fmt.cc +++ b/zp/source/any/str/fmt.cc @@ -7,14 +7,14 @@ #include <zp/str> /*extern "C" { - zp_nthw auto zp_fmti( char32_t * const buf,int const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtl( char32_t * const buf,long const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtll( char32_t * const buf,long long const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmts( char32_t * const buf,short const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtsc( char32_t * const buf,char signed const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtuc( char32_t * const buf,char unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtui( char32_t * const buf,int unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtul( char32_t * const buf,long unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtull(char32_t * const buf,long long unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} - zp_nthw auto zp_fmtus( char32_t * const buf,short unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmti( char32_t * const buf,int const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtl( char32_t * const buf,long const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtll( char32_t * const buf,long long const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmts( char32_t * const buf,short const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtsc( char32_t * const buf,char signed const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtuc( char32_t * const buf,char unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtui( char32_t * const buf,int unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtul( char32_t * const buf,long unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtull(char32_t * const buf,long long unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} + zp_nothw auto zp_fmtus( char32_t * const buf,short unsigned const val,::zp::i8m const bs,bool const rtl) -> void {return ::zp::fmt(buf,val,bs,rtl);} }*/ diff --git a/zp/source/any/str/fmtlen.cc b/zp/source/any/str/fmtlen.cc index f95b2a8..1f281a8 100644 --- a/zp/source/any/str/fmtlen.cc +++ b/zp/source/any/str/fmtlen.cc @@ -8,14 +8,14 @@ #include <zp/str> /* extern "C" { - zp_nthw auto zp_fmtleni( int const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlenl( long const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlenll( long long const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlens( short const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlensc( char signed const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlenuc( char unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlenui( int unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlenul( long unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlenull(long long unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} - zp_nthw auto zp_fmtlenus( short unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtleni( int const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlenl( long const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlenll( long long const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlens( short const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlensc( char signed const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlenuc( char unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlenui( int unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlenul( long unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlenull(long long unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} + zp_nothw auto zp_fmtlenus( short unsigned const val,::zp::i8m const bs) -> ::zp::siz {return ::zp::fmtlen(val,bs);} } */ diff --git a/zp/source/any/str/strcpy.cc b/zp/source/any/str/strcpy.cc index bcd4583..b7af3f9 100644 --- a/zp/source/any/str/strcpy.cc +++ b/zp/source/any/str/strcpy.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::siz zp_strcpy(char * const dst,char const * const src) { +extern "C" zp_nothw ::zp::siz zp_strcpy(char * const dst,char const * const src) { return ::zp::det::strcpy(dst,src); } diff --git a/zp/source/any/str/strequ.cc b/zp/source/any/str/strequ.cc index 2bc3b85..6e4cedc 100644 --- a/zp/source/any/str/strequ.cc +++ b/zp/source/any/str/strequ.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw bool zp_strequ(char const * const lstr,char const * const rstr) { +extern "C" zp_nothw bool zp_strequ(char const * const lstr,char const * const rstr) { return ::zp::det::strequ(lstr,rstr); } diff --git a/zp/source/any/str/strfil.cc b/zp/source/any/str/strfil.cc index a456d14..ac98d0f 100644 --- a/zp/source/any/str/strfil.cc +++ b/zp/source/any/str/strfil.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw bool zp_strfil(char * const str,char const chr) { +extern "C" zp_nothw bool zp_strfil(char * const str,char const chr) { return ::zp::det::strfil(str,chr); } diff --git a/zp/source/any/str/strlen.cc b/zp/source/any/str/strlen.cc index 6a9a0a8..955567c 100644 --- a/zp/source/any/str/strlen.cc +++ b/zp/source/any/str/strlen.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::siz zp_strlen(char const * const str) { +extern "C" zp_nothw ::zp::siz zp_strlen(char const * const str) { return ::zp::det::strlen(str); } diff --git a/zp/source/any/str/strsrh.cc b/zp/source/any/str/strsrh.cc index a3f99dd..e92c998 100644 --- a/zp/source/any/str/strsrh.cc +++ b/zp/source/any/str/strsrh.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw char * zp_strsrh(char const * const str,char const chr) { +extern "C" zp_nothw char * zp_strsrh(char const * const str,char const chr) { return ::zp::det::strsrh(str,chr); } diff --git a/zp/source/any/str/utf32cpy.cc b/zp/source/any/str/utf32cpy.cc index 630b539..aed4370 100644 --- a/zp/source/any/str/utf32cpy.cc +++ b/zp/source/any/str/utf32cpy.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::siz zp_utf32cpy(::zp::c02 * const dst,::zp::c02 const * const src) { +extern "C" zp_nothw ::zp::siz zp_utf32cpy(::zp::c02 * const dst,::zp::c02 const * const src) { return ::zp::det::strcpy(dst,src); } diff --git a/zp/source/any/str/utf32equ.cc b/zp/source/any/str/utf32equ.cc index 483d1a8..a293122 100644 --- a/zp/source/any/str/utf32equ.cc +++ b/zp/source/any/str/utf32equ.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw bool zp_utf32equ(::zp::c02 const * const lstr,::zp::c02 const * const rstr) { +extern "C" zp_nothw bool zp_utf32equ(::zp::c02 const * const lstr,::zp::c02 const * const rstr) { return ::zp::det::strequ(lstr,rstr); } diff --git a/zp/source/any/str/utf32fil.cc b/zp/source/any/str/utf32fil.cc index 7760ebc..2ce6b30 100644 --- a/zp/source/any/str/utf32fil.cc +++ b/zp/source/any/str/utf32fil.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw bool zp_utf32fil(::zp::c02 * const str,::zp::c02 const chr) { +extern "C" zp_nothw bool zp_utf32fil(::zp::c02 * const str,::zp::c02 const chr) { return ::zp::det::strfil(str,chr); } diff --git a/zp/source/any/str/utf32len.cc b/zp/source/any/str/utf32len.cc index 7847f74..1ee26a0 100644 --- a/zp/source/any/str/utf32len.cc +++ b/zp/source/any/str/utf32len.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::siz zp_utf32len(::zp::c02 const * const str) { +extern "C" zp_nothw ::zp::siz zp_utf32len(::zp::c02 const * const str) { return ::zp::det::strlen(str); } diff --git a/zp/source/any/str/utf32srh.cc b/zp/source/any/str/utf32srh.cc index 31bda0c..91fbbe8 100644 --- a/zp/source/any/str/utf32srh.cc +++ b/zp/source/any/str/utf32srh.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::c02 * zp_utf32srh(::zp::c02 const * const str,::zp::c02 const chr) { +extern "C" zp_nothw ::zp::c02 * zp_utf32srh(::zp::c02 const * const str,::zp::c02 const chr) { return ::zp::det::strsrh(str,chr); } diff --git a/zp/source/any/str/wstrcpy.cc b/zp/source/any/str/wstrcpy.cc index 9d17061..ac4520f 100644 --- a/zp/source/any/str/wstrcpy.cc +++ b/zp/source/any/str/wstrcpy.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::siz zp_wstrcpy(::zp::wchr * const dst,::zp::wchr const * const src) { +extern "C" zp_nothw ::zp::siz zp_wstrcpy(::zp::wchr * const dst,::zp::wchr const * const src) { return ::zp::det::strcpy(dst,src); } diff --git a/zp/source/any/str/wstrequ.cc b/zp/source/any/str/wstrequ.cc index 9d3c90b..2dbba05 100644 --- a/zp/source/any/str/wstrequ.cc +++ b/zp/source/any/str/wstrequ.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw bool zp_wstrequ(::zp::wchr const * const lstr,::zp::wchr const * const rstr) { +extern "C" zp_nothw bool zp_wstrequ(::zp::wchr const * const lstr,::zp::wchr const * const rstr) { return ::zp::det::strequ(lstr,rstr);; } diff --git a/zp/source/any/str/wstrfil.cc b/zp/source/any/str/wstrfil.cc index 1c8172c..4685a12 100644 --- a/zp/source/any/str/wstrfil.cc +++ b/zp/source/any/str/wstrfil.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw bool zp_wstrfil(::zp::wchr * const str,::zp::wchr const chr) { +extern "C" zp_nothw bool zp_wstrfil(::zp::wchr * const str,::zp::wchr const chr) { return ::zp::det::strfil(str,chr); } diff --git a/zp/source/any/str/wstrlen.cc b/zp/source/any/str/wstrlen.cc index 9aed25f..51c7d96 100644 --- a/zp/source/any/str/wstrlen.cc +++ b/zp/source/any/str/wstrlen.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::siz zp_wstrlen(::zp::wchr const * const str) { +extern "C" zp_nothw ::zp::siz zp_wstrlen(::zp::wchr const * const str) { return ::zp::det::strlen(str); } diff --git a/zp/source/any/str/wstrsrh.cc b/zp/source/any/str/wstrsrh.cc index 1076d9b..bf758e1 100644 --- a/zp/source/any/str/wstrsrh.cc +++ b/zp/source/any/str/wstrsrh.cc @@ -6,6 +6,6 @@ #include <zp/prv> -extern "C" zp_nthw ::zp::wchr * zp_wstrsrh(::zp::wchr const * const str,::zp::wchr const chr) { +extern "C" zp_nothw ::zp::wchr * zp_wstrsrh(::zp::wchr const * const str,::zp::wchr const chr) { return ::zp::det::strsrh(str,chr); } |