Move gnprintf/atcprintf from core to logic.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <ITextParsers.h>
|
||||
#include <ctype.h>
|
||||
#include "stringutil.h"
|
||||
#include "sprintf.h"
|
||||
#include <am-string.h>
|
||||
|
||||
inline const char *_strstr(const char *str, const char *substr)
|
||||
@@ -188,7 +189,7 @@ static cell_t sm_formatex(IPluginContext *pCtx, const cell_t *params)
|
||||
|
||||
pCtx->LocalToString(params[1], &buf);
|
||||
pCtx->LocalToString(params[3], &fmt);
|
||||
res = smcore.atcprintf(buf, static_cast<size_t>(params[2]), fmt, pCtx, params, &arg);
|
||||
res = atcprintf(buf, static_cast<size_t>(params[2]), fmt, pCtx, params, &arg);
|
||||
|
||||
return static_cast<cell_t>(res);
|
||||
}
|
||||
@@ -257,7 +258,7 @@ static cell_t sm_format(IPluginContext *pCtx, const cell_t *params)
|
||||
}
|
||||
|
||||
buf = (copy) ? __copy_buf : destbuf;
|
||||
res = smcore.atcprintf(buf, maxlen, fmt, pCtx, params, &arg);
|
||||
res = atcprintf(buf, maxlen, fmt, pCtx, params, &arg);
|
||||
|
||||
if (copy)
|
||||
{
|
||||
@@ -307,7 +308,7 @@ static cell_t sm_vformat(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
pContext->LocalToString(params[3], &format);
|
||||
|
||||
size_t total = smcore.atcprintf(destination, maxlen, format, pContext, local_params, &vargPos);
|
||||
size_t total = atcprintf(destination, maxlen, format, pContext, local_params, &vargPos);
|
||||
|
||||
/* Perform copy-on-write if we need to */
|
||||
if (copy)
|
||||
|
||||
Reference in New Issue
Block a user