mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
More cats and cpys in files that xcode doesn't see
This commit is contained in:
parent
dce7f5f6b3
commit
d9a723d533
21 changed files with 43 additions and 43 deletions
|
|
@ -184,7 +184,7 @@ void afxAudioBank::packData(BitStream* stream)
|
||||||
if(!mFilename)
|
if(!mFilename)
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
else
|
else
|
||||||
dStrcpy(buffer, mFilename);
|
dStrcpy(buffer, mFilename, 256);
|
||||||
stream->writeString(buffer);
|
stream->writeString(buffer);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ inline int isatty(int) { return 0; }
|
||||||
buf[n++] = (char) c; \
|
buf[n++] = (char) c; \
|
||||||
result = n; \
|
result = n; \
|
||||||
}
|
}
|
||||||
|
|
||||||
// General helper stuff.
|
// General helper stuff.
|
||||||
static int lineIndex;
|
static int lineIndex;
|
||||||
|
|
||||||
|
|
@ -411,10 +411,10 @@ static int Sc_ScanString(int ret)
|
||||||
CMDtext[CMDleng - 1] = 0;
|
CMDtext[CMDleng - 1] = 0;
|
||||||
if(!collapseEscape(CMDtext+1))
|
if(!collapseEscape(CMDtext+1))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
char* buffer = ( char* ) consoleAlloc( dStrlen( CMDtext ) );
|
char* buffer = ( char* ) consoleAlloc( dStrlen( CMDtext ) );
|
||||||
dStrcpy( buffer, CMDtext + 1 );
|
dStrcpy( buffer, CMDtext + 1, dStrlen( CMDtext ) );
|
||||||
|
|
||||||
CMDlval.str = MakeToken< char* >( buffer, lineIndex );
|
CMDlval.str = MakeToken< char* >( buffer, lineIndex );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -319,8 +319,8 @@ DefineConsoleFunction( consoleExportXML, const char*, (), ,"Exports console defi
|
||||||
Con::XMLExport xmlExport;
|
Con::XMLExport xmlExport;
|
||||||
String xml;
|
String xml;
|
||||||
xmlExport.exportXML(xml);
|
xmlExport.exportXML(xml);
|
||||||
char* ret = Con::getReturnBuffer(xml.length() + 1);
|
char* ret = Con::getReturnBuffer(xml.size());
|
||||||
dStrcpy(ret, xml.c_str());
|
dStrcpy(ret, xml.c_str(), xml.size());
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ public:
|
||||||
/// the FrameAllocator. For example:
|
/// the FrameAllocator. For example:
|
||||||
/// @code
|
/// @code
|
||||||
/// FrameTemp<char> tempStr(32); // NOTE! This parameter is NOT THE SIZE IN BYTES. See constructor docs.
|
/// FrameTemp<char> tempStr(32); // NOTE! This parameter is NOT THE SIZE IN BYTES. See constructor docs.
|
||||||
/// dStrcat( tempStr, SomeOtherString );
|
/// dStrcat( tempStr, SomeOtherString, 32 * sizeof(char) );
|
||||||
/// tempStr[2] = 'l';
|
/// tempStr[2] = 'l';
|
||||||
/// Con::printf( tempStr );
|
/// Con::printf( tempStr );
|
||||||
/// Con::printf( "Foo: %s", ~tempStr );
|
/// Con::printf( "Foo: %s", ~tempStr );
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ private:
|
||||||
{
|
{
|
||||||
// Find a unique filename
|
// Find a unique filename
|
||||||
U32 count = 1;
|
U32 count = 1;
|
||||||
dStrcpy(fileBuf, filename);
|
dStrcpy(fileBuf, filename, bufSize);
|
||||||
|
|
||||||
while(zip->findFileInfo(fileBuf))
|
while(zip->findFileInfo(fileBuf))
|
||||||
{
|
{
|
||||||
|
|
@ -109,7 +109,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(fileBuf && bufSize > 0)
|
else if(fileBuf && bufSize > 0)
|
||||||
dStrcpy(fileBuf, filename);
|
dStrcpy(fileBuf, filename, bufSize);
|
||||||
|
|
||||||
// Try and write to the file
|
// Try and write to the file
|
||||||
Stream * stream = zip->openFile(fileBuf ? fileBuf : filename, ZipArchive::Write);
|
Stream * stream = zip->openFile(fileBuf ? fileBuf : filename, ZipArchive::Write);
|
||||||
|
|
|
||||||
|
|
@ -390,7 +390,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontCol
|
||||||
U32 r, g, b;
|
U32 r, g, b;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
|
||||||
dStrcpy( buf, argv[3] );
|
dStrcpy( buf, argv[3], 64 );
|
||||||
char* temp = dStrtok( buf, " \0" );
|
char* temp = dStrtok( buf, " \0" );
|
||||||
r = temp ? dAtoi( temp ) : 0;
|
r = temp ? dAtoi( temp ) : 0;
|
||||||
temp = dStrtok( NULL, " \0" );
|
temp = dStrtok( NULL, " \0" );
|
||||||
|
|
@ -399,7 +399,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontCol
|
||||||
b = temp ? dAtoi( temp ) : 0;
|
b = temp ? dAtoi( temp ) : 0;
|
||||||
fontColor.set( r, g, b );
|
fontColor.set( r, g, b );
|
||||||
|
|
||||||
dStrcpy( buf, argv[4] );
|
dStrcpy( buf, argv[4], 64 );
|
||||||
temp = dStrtok( buf, " \0" );
|
temp = dStrtok( buf, " \0" );
|
||||||
r = temp ? dAtoi( temp ) : 0;
|
r = temp ? dAtoi( temp ) : 0;
|
||||||
temp = dStrtok( NULL, " \0" );
|
temp = dStrtok( NULL, " \0" );
|
||||||
|
|
@ -408,7 +408,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontCol
|
||||||
b = temp ? dAtoi( temp ) : 0;
|
b = temp ? dAtoi( temp ) : 0;
|
||||||
fontColorHL.set( r, g, b );
|
fontColorHL.set( r, g, b );
|
||||||
|
|
||||||
dStrcpy( buf, argv[5] );
|
dStrcpy( buf, argv[5], 64 );
|
||||||
temp = dStrtok( buf, " \0" );
|
temp = dStrtok( buf, " \0" );
|
||||||
r = temp ? dAtoi( temp ) : 0;
|
r = temp ? dAtoi( temp ) : 0;
|
||||||
temp = dStrtok( NULL, " \0" );
|
temp = dStrtok( NULL, " \0" );
|
||||||
|
|
@ -426,7 +426,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontCol
|
||||||
// U32 r, g, b;
|
// U32 r, g, b;
|
||||||
// char buf[64];
|
// char buf[64];
|
||||||
//
|
//
|
||||||
// dStrcpy( buf, argv[3] );
|
// dStrcpy( buf, argv[3], 64 );
|
||||||
// char* temp = dStrtok( buf, " \0" );
|
// char* temp = dStrtok( buf, " \0" );
|
||||||
// r = temp ? dAtoi( temp ) : 0;
|
// r = temp ? dAtoi( temp ) : 0;
|
||||||
// temp = dStrtok( NULL, " \0" );
|
// temp = dStrtok( NULL, " \0" );
|
||||||
|
|
@ -435,7 +435,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontCol
|
||||||
// b = temp ? dAtoi( temp ) : 0;
|
// b = temp ? dAtoi( temp ) : 0;
|
||||||
// fontColor.set( r, g, b );
|
// fontColor.set( r, g, b );
|
||||||
//
|
//
|
||||||
// dStrcpy( buf, argv[4] );
|
// dStrcpy( buf, argv[4], 64 );
|
||||||
// temp = dStrtok( buf, " \0" );
|
// temp = dStrtok( buf, " \0" );
|
||||||
// r = temp ? dAtoi( temp ) : 0;
|
// r = temp ? dAtoi( temp ) : 0;
|
||||||
// temp = dStrtok( NULL, " \0" );
|
// temp = dStrtok( NULL, " \0" );
|
||||||
|
|
@ -444,7 +444,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontCol
|
||||||
// b = temp ? dAtoi( temp ) : 0;
|
// b = temp ? dAtoi( temp ) : 0;
|
||||||
// fontColorHL.set( r, g, b );
|
// fontColorHL.set( r, g, b );
|
||||||
//
|
//
|
||||||
// dStrcpy( buf, argv[5] );
|
// dStrcpy( buf, argv[5], 64 );
|
||||||
// temp = dStrtok( buf, " \0" );
|
// temp = dStrtok( buf, " \0" );
|
||||||
// r = temp ? dAtoi( temp ) : 0;
|
// r = temp ? dAtoi( temp ) : 0;
|
||||||
// temp = dStrtok( NULL, " \0" );
|
// temp = dStrtok( NULL, " \0" );
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ U32 LeapMotionDevice::LM_FRAME = 0;
|
||||||
LeapMotionDevice::LeapMotionDevice()
|
LeapMotionDevice::LeapMotionDevice()
|
||||||
{
|
{
|
||||||
// From IInputDevice
|
// From IInputDevice
|
||||||
dStrcpy(mName, "leapmotion");
|
dStrcpy(mName, "leapmotion", 30);
|
||||||
mDeviceType = INPUTMGR->getNextDeviceType();
|
mDeviceType = INPUTMGR->getNextDeviceType();
|
||||||
|
|
||||||
mController = NULL;
|
mController = NULL;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ F32 OculusVRDevice::smPositionTrackingScale = 1.0f;
|
||||||
OculusVRDevice::OculusVRDevice()
|
OculusVRDevice::OculusVRDevice()
|
||||||
{
|
{
|
||||||
// From IInputDevice
|
// From IInputDevice
|
||||||
dStrcpy(mName, "oculusvr");
|
dStrcpy(mName, "oculusvr", 30);
|
||||||
mDeviceType = INPUTMGR->getNextDeviceType();
|
mDeviceType = INPUTMGR->getNextDeviceType();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -493,7 +493,7 @@ OpenVRProvider::OpenVRProvider() :
|
||||||
mDrawCanvas(NULL),
|
mDrawCanvas(NULL),
|
||||||
mGameConnection(NULL)
|
mGameConnection(NULL)
|
||||||
{
|
{
|
||||||
dStrcpy(mName, "openvr");
|
dStrcpy(mName, "openvr", 30);
|
||||||
mDeviceType = INPUTMGR->getNextDeviceType();
|
mDeviceType = INPUTMGR->getNextDeviceType();
|
||||||
buildInputCodeTable();
|
buildInputCodeTable();
|
||||||
GFXDevice::getDeviceEventSignal().notify(this, &OpenVRProvider::_handleDeviceEvent);
|
GFXDevice::getDeviceEventSignal().notify(this, &OpenVRProvider::_handleDeviceEvent);
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ U32 RazerHydraDevice::RH_FRAME = 0;
|
||||||
RazerHydraDevice::RazerHydraDevice()
|
RazerHydraDevice::RazerHydraDevice()
|
||||||
{
|
{
|
||||||
// From IInputDevice
|
// From IInputDevice
|
||||||
dStrcpy(mName, "razerhydra");
|
dStrcpy(mName, "razerhydra", 30);
|
||||||
mDeviceType = INPUTMGR->getNextDeviceType();
|
mDeviceType = INPUTMGR->getNextDeviceType();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
dStrncpy(pathEl, currChar, pathElLen);
|
dStrncpy(pathEl, currChar, pathElLen);
|
||||||
pathEl[pathElLen] = '\0';
|
pathEl[pathElLen] = '\0';
|
||||||
dStrncpy(testPath, tempBuf, MaxPath);
|
dStrncpy(testPath, tempBuf, MaxPath);
|
||||||
dStrcat(testPath, pathEl);
|
dStrcat(testPath, pathEl, MaxPath);
|
||||||
if (stat(testPath, &filestat) != -1)
|
if (stat(testPath, &filestat) != -1)
|
||||||
{
|
{
|
||||||
dStrncpy(tempBuf, testPath, MaxPath);
|
dStrncpy(tempBuf, testPath, MaxPath);
|
||||||
|
|
@ -226,7 +226,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
if (dStricmp(pathEl, ent->d_name) == 0)
|
if (dStricmp(pathEl, ent->d_name) == 0)
|
||||||
{
|
{
|
||||||
foundMatch = true;
|
foundMatch = true;
|
||||||
dStrcat(tempBuf, ent->d_name);
|
dStrcat(tempBuf, ent->d_name, MaxPath);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -238,7 +238,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
}
|
}
|
||||||
if (*termChar == '/')
|
if (*termChar == '/')
|
||||||
{
|
{
|
||||||
dStrcat(tempBuf, "/");
|
dStrcat(tempBuf, "/", MaxPath);
|
||||||
termChar++;
|
termChar++;
|
||||||
currChar = termChar;
|
currChar = termChar;
|
||||||
}
|
}
|
||||||
|
|
@ -935,7 +935,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
|
|
||||||
TempAlloc< UTF8 > buf( dStrlen( newDir ) + 2 );
|
TempAlloc< UTF8 > buf( dStrlen( newDir ) + 2 );
|
||||||
|
|
||||||
dStrcpy( buf, newDir );
|
dStrcpy( buf, newDir, buf.size );
|
||||||
|
|
||||||
ForwardSlash( buf );
|
ForwardSlash( buf );
|
||||||
return chdir( buf ) == 0;
|
return chdir( buf ) == 0;
|
||||||
|
|
@ -1267,7 +1267,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
{
|
{
|
||||||
char child[1024];
|
char child[1024];
|
||||||
if ( (basePath[dStrlen(basePath) - 1]) == '/')
|
if ( (basePath[dStrlen(basePath) - 1]) == '/')
|
||||||
dStrcpy (child, d->d_name);
|
dStrcpy (child, d->d_name, 1024);
|
||||||
else
|
else
|
||||||
dSprintf(child, 1024, "/%s", d->d_name);
|
dSprintf(child, 1024, "/%s", d->d_name);
|
||||||
if (currentDepth < recurseDepth || recurseDepth == -1)
|
if (currentDepth < recurseDepth || recurseDepth == -1)
|
||||||
|
|
|
||||||
|
|
@ -554,7 +554,7 @@ bool XClipboard::setClipboard(const char *text)
|
||||||
checkTDataSize(len);
|
checkTDataSize(len);
|
||||||
|
|
||||||
// copy the data into the storage buffer
|
// copy the data into the storage buffer
|
||||||
dStrcpy(mTData, text);
|
dStrcpy(mTData, text, mTDataSize);
|
||||||
|
|
||||||
// tell X that we own the clipboard. (we'll get events
|
// tell X that we own the clipboard. (we'll get events
|
||||||
// if an app tries to paste)
|
// if an app tries to paste)
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ static Socket* addPolledSocket(NetSocket& fd, S32 state,
|
||||||
sock->fd = fd;
|
sock->fd = fd;
|
||||||
sock->state = state;
|
sock->state = state;
|
||||||
if (remoteAddr)
|
if (remoteAddr)
|
||||||
dStrcpy(sock->remoteAddr, remoteAddr);
|
dStrcpy(sock->remoteAddr, remoteAddr, 256);
|
||||||
if (port != -1)
|
if (port != -1)
|
||||||
sock->remotePort = port;
|
sock->remotePort = port;
|
||||||
gPolledSockets.push_back(sock);
|
gPolledSockets.push_back(sock);
|
||||||
|
|
@ -242,7 +242,7 @@ NetSocket Net::openConnectTo(const char *addressString)
|
||||||
if(!dStrnicmp(addressString, "ip:", 3))
|
if(!dStrnicmp(addressString, "ip:", 3))
|
||||||
addressString += 3; // eat off the ip:
|
addressString += 3; // eat off the ip:
|
||||||
char remoteAddr[256];
|
char remoteAddr[256];
|
||||||
dStrcpy(remoteAddr, addressString);
|
dStrcpy(remoteAddr, addressString, 256);
|
||||||
|
|
||||||
char *portString = dStrchr(remoteAddr, ':');
|
char *portString = dStrchr(remoteAddr, ':');
|
||||||
|
|
||||||
|
|
@ -814,7 +814,7 @@ bool Net::stringToAddress(const char *addressString, NetAddress *address)
|
||||||
if(strlen(addressString) > 255)
|
if(strlen(addressString) > 255)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
dStrcpy(remoteAddr, addressString);
|
dStrcpy(remoteAddr, addressString, 256);
|
||||||
|
|
||||||
char *portString = dStrchr(remoteAddr, ':');
|
char *portString = dStrchr(remoteAddr, ':');
|
||||||
if(portString)
|
if(portString)
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ bool InitOpenGL()
|
||||||
// Get the video settings from the prefs:
|
// Get the video settings from the prefs:
|
||||||
const char* resString = Con::getVariable( "$pref::Video::resolution" );
|
const char* resString = Con::getVariable( "$pref::Video::resolution" );
|
||||||
char* tempBuf = new char[dStrlen( resString ) + 1];
|
char* tempBuf = new char[dStrlen( resString ) + 1];
|
||||||
dStrcpy( tempBuf, resString );
|
dStrcpy( tempBuf, resString, dStrlen(resString) + 1 );
|
||||||
char* temp = dStrtok( tempBuf, " x\0" );
|
char* temp = dStrtok( tempBuf, " x\0" );
|
||||||
U32 width = ( temp ? dAtoi( temp ) : 800 );
|
U32 width = ( temp ? dAtoi( temp ) : 800 );
|
||||||
temp = dStrtok( NULL, " x\0" );
|
temp = dStrtok( NULL, " x\0" );
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ void UnixRedBookDevice::setDeviceInfo(S32 deviceId, const char *deviceName)
|
||||||
#if !defined(__FreeBSD__)
|
#if !defined(__FreeBSD__)
|
||||||
mDeviceId = deviceId;
|
mDeviceId = deviceId;
|
||||||
mDeviceName = new char[dStrlen(deviceName) + 1];
|
mDeviceName = new char[dStrlen(deviceName) + 1];
|
||||||
dStrcpy(mDeviceName, deviceName);
|
dStrcpy(mDeviceName, deviceName, dStrlen(deviceName) + 1);
|
||||||
#endif // !defined(__FreeBSD__)
|
#endif // !defined(__FreeBSD__)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ void ShaderConnectorHLSL::sortVars()
|
||||||
|
|
||||||
void ShaderConnectorHLSL::setName( char *newName )
|
void ShaderConnectorHLSL::setName( char *newName )
|
||||||
{
|
{
|
||||||
dStrcpy( (char*)mName, newName );
|
dStrcpy( (char*)mName, newName, 32 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShaderConnectorHLSL::reset()
|
void ShaderConnectorHLSL::reset()
|
||||||
|
|
|
||||||
|
|
@ -1159,7 +1159,7 @@ bool ActionMap::getKeyString(const U32 action, char* buffer)
|
||||||
}
|
}
|
||||||
//for (U32 i = 0; gVirtualMap[i].code != 0xFFFFFFFF; i++) {
|
//for (U32 i = 0; gVirtualMap[i].code != 0xFFFFFFFF; i++) {
|
||||||
// if (gVirtualMap[i].code == action) {
|
// if (gVirtualMap[i].code == action) {
|
||||||
// dStrcpy(buffer, gVirtualMap[i].pDescription);
|
// dStrcpy(buffer, gVirtualMap[i].pDescription, 16);
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public:
|
||||||
static char buffer[512];
|
static char buffer[512];
|
||||||
dSprintf(buffer, sizeof(buffer), "%s - \"", getClassName());
|
dSprintf(buffer, sizeof(buffer), "%s - \"", getClassName());
|
||||||
expandEscape(buffer + dStrlen(buffer), mString.getString());
|
expandEscape(buffer + dStrlen(buffer), mString.getString());
|
||||||
dStrcat(buffer, "\"");
|
dStrcat(buffer, "\"", 512);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,8 @@ struct GhostInfo;
|
||||||
/// // the ScopeAlways flag indicates that the object is always scoped
|
/// // the ScopeAlways flag indicates that the object is always scoped
|
||||||
/// // on all active connections.
|
/// // on all active connections.
|
||||||
/// mNetFlags.set(ScopeAlways | Ghostable);
|
/// mNetFlags.set(ScopeAlways | Ghostable);
|
||||||
/// dStrcpy(message1, "Hello World 1!");
|
/// dStrcpy(message1, "Hello World 1!", bufLen);
|
||||||
/// dStrcpy(message2, "Hello World 2!");
|
/// dStrcpy(message2, "Hello World 2!", bufLen);
|
||||||
/// }
|
/// }
|
||||||
/// @endcode
|
/// @endcode
|
||||||
///
|
///
|
||||||
|
|
@ -187,12 +187,12 @@ struct GhostInfo;
|
||||||
/// void setMessage1(const char *msg)
|
/// void setMessage1(const char *msg)
|
||||||
/// {
|
/// {
|
||||||
/// setMaskBits(Message1Mask);
|
/// setMaskBits(Message1Mask);
|
||||||
/// dStrcpy(message1, msg);
|
/// dStrcpy(message1, msg, bufLen);
|
||||||
/// }
|
/// }
|
||||||
/// void setMessage2(const char *msg)
|
/// void setMessage2(const char *msg)
|
||||||
/// {
|
/// {
|
||||||
/// setMaskBits(Message2Mask);
|
/// setMaskBits(Message2Mask);
|
||||||
/// dStrcpy(message2, msg);
|
/// dStrcpy(message2, msg, bufLen);
|
||||||
/// }
|
/// }
|
||||||
/// @endcode
|
/// @endcode
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -158,18 +158,18 @@ S32 Callback(void *pArg, S32 argc, char **argv, char **columnNames)
|
||||||
// DBEUG CODE
|
// DBEUG CODE
|
||||||
// Con::printf("%s = %s\n", columnNames[i], argv[i] ? argv[i] : "NULL");
|
// Con::printf("%s = %s\n", columnNames[i], argv[i] ? argv[i] : "NULL");
|
||||||
name = new char[dStrlen(columnNames[i]) + 1];
|
name = new char[dStrlen(columnNames[i]) + 1];
|
||||||
dStrcpy(name, columnNames[i]);
|
dStrcpy(name, columnNames[i], dStrlen(columnNames[i]) + 1);
|
||||||
pRow->vColumnNames.push_back(name);
|
pRow->vColumnNames.push_back(name);
|
||||||
if (argv[i])
|
if (argv[i])
|
||||||
{
|
{
|
||||||
value = new char[dStrlen(argv[i]) + 1];
|
value = new char[dStrlen(argv[i]) + 1];
|
||||||
dStrcpy(value, argv[i]);
|
dStrcpy(value, argv[i], dStrlen(argv[i]) + 1);
|
||||||
pRow->vColumnValues.push_back(value);
|
pRow->vColumnValues.push_back(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
value = new char[10];
|
value = new char[10];
|
||||||
dStrcpy(value, "NULL");
|
dStrcpy(value, "NULL", 10);
|
||||||
pRow->vColumnValues.push_back(value);
|
pRow->vColumnValues.push_back(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,8 @@ DefineConsoleFunction( runAllUnitTests, int, (const char* testSpecs), (""),
|
||||||
testArgc = 2;
|
testArgc = 2;
|
||||||
testArgv = new char*[2];
|
testArgv = new char*[2];
|
||||||
testArgv[0] = NULL; // Program name is unused by googletest.
|
testArgv[0] = NULL; // Program name is unused by googletest.
|
||||||
testArgv[1] = new char[specs.length()+1];
|
testArgv[1] = new char[specs.size()];
|
||||||
dStrcpy(testArgv[1], specs);
|
dStrcpy(testArgv[1], specs, specs.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize Google Test.
|
// Initialize Google Test.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue