BcString Format(const char *Text,...) { va_list List; va_start(List,Text); int Size = strlen(Text) + MAX_STRING_FORMATTING_SIZE; //char Formatted[Size]; <--- Not acceptable on other compilers apparently char *Formatted = AllocStr(Size); vsnprintf(Formatted,Size,Text,List); va_end(List); BcString Str; for(Index i = 0;Formatted[i] != '\0';i++) { Str += Formatted[i]; } Str += '\0'; return Str; }
TCHAR *system_getuservariable(int varnum) { if (varnum < 0 || varnum >= __INST_LAST) return AllocString(); return AllocStr(g_variables+varnum*g_stringsize); }