Fixed compile warning concerning C vs. C++ strings.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1456 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2008-04-02 21:22:16 +00:00
parent cfe52adc62
commit 70f24de25d
2 changed files with 15 additions and 12 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: DebuggerParser.cxx,v 1.103 2008-03-23 17:43:21 stephena Exp $
// $Id: DebuggerParser.cxx,v 1.104 2008-04-02 21:22:16 stephena Exp $
//============================================================================
#include <fstream>
@ -974,16 +974,19 @@ void DebuggerParser::executeList()
// "listbreaks"
void DebuggerParser::executeListbreaks()
{
char buf[255];
ostringstream buf;
int count = 0;
for(unsigned int i=0; i<0x10000; i++) {
if(debugger->breakpoints().isSet(i)) {
sprintf(buf, "%s ", debugger->equates().getFormatted(i, 4));
commandResult += buf;
if(! (++count % 8) ) commandResult += "\n";
for(unsigned int i = 0; i < 0x10000; i++)
{
if(debugger->breakpoints().isSet(i))
{
buf << debugger->equates().getFormatted(i, 4) << " ";
if(! (++count % 8) ) buf << "\n";
}
}
commandResult += buf.str();
/*
if(count)
return ret;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FrameBuffer.cxx,v 1.126 2008-03-13 22:58:06 stephena Exp $
// $Id: FrameBuffer.cxx,v 1.127 2008-04-02 21:22:16 stephena Exp $
//============================================================================
#include <sstream>
@ -79,14 +79,14 @@ void FrameBuffer::initialize(const string& title, uInt32 width, uInt32 height)
// Set the available video modes for this framebuffer
setAvailableVidModes();
// Set window title and icon
setWindowTitle(title);
if(myInitializedCount == 1) setWindowIcon();
// Initialize video subsystem
VideoMode mode = getSavedVidMode();
initSubsystem(mode);
// Set window title and icon
setWindowTitle(title);
setWindowIcon();
// And refresh the display
myOSystem->eventHandler().refreshDisplay();