mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Begin killing off sprintf
This commit is contained in:
@ -232,14 +232,6 @@ char * hsFormatStrV(const char * fmt, va_list args)
|
||||
return hsStrcpy(buf.c_str());
|
||||
}
|
||||
|
||||
static char hsStrBuf[100];
|
||||
|
||||
char *hsScalarToStr(float s)
|
||||
{
|
||||
sprintf(hsStrBuf, "%f", s);
|
||||
return hsStrBuf;
|
||||
}
|
||||
|
||||
class hsMinimizeClientGuard
|
||||
{
|
||||
#ifdef CLIENT
|
||||
|
@ -717,7 +717,7 @@ void SortNDumpUnfreedMemory(const char *nm, bool full) // file name base, and FU
|
||||
#endif
|
||||
|
||||
char fname[512];
|
||||
sprintf(fname,"%s_dmp.txt",nm);
|
||||
snprintf(fname,arrsize(fname),"%s_dmp.txt",nm);
|
||||
char *errStr = "";
|
||||
|
||||
|
||||
@ -807,7 +807,7 @@ static _CrtMemBlockHeader *cmbh_last; // Remember this header for next increme
|
||||
|
||||
CreateDirectory("Reports",NULL); // stick em in a sub directory
|
||||
char fnm[512];
|
||||
sprintf(fnm,"Reports\\%s",fname);
|
||||
snprintf(fnm,arrsize(fnm),"Reports\\%s",fname);
|
||||
|
||||
FILE * DumpLogFile = fopen( fnm, "w" );
|
||||
// long allocs=0;
|
||||
@ -835,7 +835,7 @@ static _CrtMemBlockHeader *cmbh_last; // Remember this header for next increme
|
||||
static int first=1;
|
||||
if (!full) // if this is a partial mem dump, write to the ROOMS.txt file a summary
|
||||
{
|
||||
sprintf(fnm,"Reports\\%s","ROOMS.txt");
|
||||
snprintf(fnm,arrsize(fnm),"Reports\\%s","ROOMS.txt");
|
||||
|
||||
if (first)
|
||||
{ DumpLogFile = fopen( fnm, "w" ); // first time clobber the old
|
||||
|
@ -155,7 +155,7 @@ void TArrayStats()
|
||||
|
||||
hsDlistNode * pNode = hsDlistNode::fpFirst;
|
||||
char fnm[512];
|
||||
sprintf(fnm,"Reports\\%s.txt","TArray");
|
||||
snprintf(fnm,arrsize(fnm),"Reports\\%s.txt","TArray");
|
||||
FILE * DumpLogFile = fopen( fnm, "w" );
|
||||
if (!DumpLogFile) return;
|
||||
int i=0;
|
||||
@ -209,7 +209,7 @@ void LargeArrayStats()
|
||||
|
||||
hsDlistNode * pNode = hsDlistNode::fpFirst;
|
||||
char fnm[512];
|
||||
sprintf(fnm,"Reports\\%s.txt","TArray");
|
||||
snprintf(fnm,arrsize(fnm),"Reports\\%s.txt","TArray");
|
||||
FILE * DumpLogFile = fopen( fnm, "w" );
|
||||
if (!DumpLogFile) return;
|
||||
int i=0;
|
||||
|
Reference in New Issue
Block a user