114 typedef unsigned char jubyte; |
114 typedef unsigned char jubyte; |
115 typedef unsigned short jushort; |
115 typedef unsigned short jushort; |
116 typedef unsigned int juint; |
116 typedef unsigned int juint; |
117 typedef unsigned __int64 julong; |
117 typedef unsigned __int64 julong; |
118 |
118 |
119 //---------------------------------------------------------------------------------------------------- |
|
120 // Special (possibly not-portable) casts |
|
121 // Cast floats into same-size integers and vice-versa w/o changing bit-pattern |
|
122 |
|
123 inline jint jint_cast (jfloat x) { return *(jint* )&x; } |
|
124 inline jlong jlong_cast (jdouble x) { return *(jlong* )&x; } |
|
125 |
|
126 inline jfloat jfloat_cast (jint x) { return *(jfloat* )&x; } |
|
127 inline jdouble jdouble_cast(jlong x) { return *(jdouble*)&x; } |
|
128 |
|
129 |
119 |
130 //---------------------------------------------------------------------------------------------------- |
120 //---------------------------------------------------------------------------------------------------- |
131 // Non-standard stdlib-like stuff: |
121 // Non-standard stdlib-like stuff: |
132 inline int strcasecmp(const char *s1, const char *s2) { return _stricmp(s1,s2); } |
122 inline int strcasecmp(const char *s1, const char *s2) { return _stricmp(s1,s2); } |
133 inline int strncasecmp(const char *s1, const char *s2, size_t n) { |
123 inline int strncasecmp(const char *s1, const char *s2, size_t n) { |