Browse Source

Fixed win32 build (#349)

Brucey 7 months ago
parent
commit
0e1dfb8d78
2 changed files with 21 additions and 0 deletions
  1. 10 0
      blitz.mod/blitz_string.h
  2. 11 0
      blitz.mod/blitz_string_ex.cpp

+ 10 - 0
blitz.mod/blitz_string.h

@@ -104,6 +104,16 @@ struct BBClass_String{
 	BBString* (*bbStringFromLongInt)( BBLONGINT n );
 	BBString* (*bbStringFromLongInt)( BBLONGINT n );
 	BBULONGINT (*bbStringToULongInt)( BBString *t );
 	BBULONGINT (*bbStringToULongInt)( BBString *t );
 	BBString* (*bbStringFromULongInt)( BBULONGINT n );
 	BBString* (*bbStringFromULongInt)( BBULONGINT n );
+
+	int (*bbStringToDoubleEx)( BBString *str, double *val, int start, int end, BBULONG format, BBString *sep );
+	int (*bbStringToFloatEx)( BBString *str, float *val, int start, int end, BBULONG format, BBString *sep );
+	int (*bbStringToIntEx)( BBString *str, int *val, int start, int end, BBULONG format, int base );
+	int (*bbStringToUIntEx)( BBString *str, unsigned int *val, int start, int end, BBULONG format, int base );
+	int (*bbStringToLongEx)( BBString *str, BBInt64 *val, int start, int end, BBULONG format, int base );
+	int (*bbStringToULongEx)( BBString *str, BBUInt64 *val, int start, int end, BBULONG format, int base );
+	int (*bbStringToSizeTEx)( BBString *str, BBSIZET *val, int start, int end, BBULONG format, int base );
+	int (*bbStringToLongIntEx)( BBString *str, BBLONGINT *val, int start, int end, BBULONG format, int base );
+	int (*bbStringToULongIntEx)( BBString *str, BBULONGINT *val, int start, int end, BBULONG format, int base );
 };
 };
 
 
 extern	struct BBClass_String bbStringClass;
 extern	struct BBClass_String bbStringClass;

+ 11 - 0
blitz.mod/blitz_string_ex.cpp

@@ -13,6 +13,17 @@
 */
 */
 #include "fast_float/fast_float.h"
 #include "fast_float/fast_float.h"
 #include "blitz_debug.h"
 #include "blitz_debug.h"
+#ifdef _WIN32
+#if defined(_WIN64)
+ typedef __int64 LONG_PTR; 
+ typedef unsigned __int64 UINT_PTR;
+#else
+ typedef long LONG_PTR;
+ typedef unsigned int UINT_PTR;
+#endif
+typedef UINT_PTR WPARAM;
+typedef LONG_PTR LPARAM;
+#endif
 #include "blitz_string.h"
 #include "blitz_string.h"
 
 
 // extracts a double from a string, from the range startPos to endPos
 // extracts a double from a string, from the range startPos to endPos