+#ifdef ECERE_STATIC
+public import static "ecere"
+#endif
+
#include <stdarg.h>
extern int isblank(int c);
-class DynamicString : Array<char>
+public class DynamicString : Array<char>
{
minAllocSize = 1024;
get { return array; }
}
- void concat(String s)
+ const char * OnGetString(char * tempString, void * fieldData, bool * needClass)
+ {
+ return array;
+ }
+
+ bool OnGetDataFromString(const char * string)
+ {
+ this = (DynamicString)(char *)string;
+ return true;
+ }
+
+ void concat(const String s)
{
int len = strlen(s);
if(len)
}
}
- void concatf(char * format, ...)
+ void concatf(const char * format, ...)
{
// TODO: improve this to vsprinf directly in the Array<char> instead of calling concat
char string[MAX_F_STRING];
va_list args;
va_start(args, format);
- vsprintf(string, format, args);
+ vsnprintf(string, sizeof(string), format, args);
+ string[sizeof(string)-1] = 0;
va_end(args);
concat(string);
}
// TODO: improve this to work directly on the Array<char> instead of calling PrintStdArgsToBuffer
char string[MAX_F_STRING];
va_list args;
- int len;
+ //int len;
va_start(args, object);
- len = PrintStdArgsToBuffer(string, sizeof(string), object, args);
+ /*len = */PrintStdArgsToBuffer(string, sizeof(string), object, args);
concat(string);
va_end(args);
}