move sprintf into std

This commit is contained in:
tqchen
2014-09-01 23:12:50 -07:00
parent 29a7027dba
commit bb5c151f57
5 changed files with 23 additions and 4 deletions

View File

@@ -23,3 +23,11 @@ void XGBoostCheck_R(int exp, const char *fmt, ...) {
error("%s\n", buf);
}
}
int XGBoostSPrintf_R(char *buf, size_t size, const char *fmt, ...) {
int ret;
va_list args;
va_start(args, fmt);
ret = vsnprintf(buf, size, fmt, args);
va_end(args);
return ret;
}