You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2006-09-15 00:11:00
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23109/wxLua/docs Modified Files: changelog.txt Log Message: rename EVT_WXLUA_DEBUG_XXX to EVT_WXLUA_DEBUGGER since that's what they apply to rename wxEVT_WXLUA_DEBUG_XXX to wxEVT_WXLUA_DEBUGGER_XXX wxLuaDebugEvent renamed to wxLuaDebuggerEvent rename wxLUASOCKET_DEBUG_EVENT_XXX to wxLUASOCKET_DEBUGGEE_EVENT_XXX rename wxLUASOCKET_DEBUG_CMD_XXX to wxLUASOCKET_DEBUGGER_CMD_XXX make all wxLuaSocketBase::ReadXXX functions return bool for success checking rename wxLuaDebugServer to wxLuaDebuggerServer Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** changelog.txt 28 Aug 2006 05:26:20 -0000 1.16 --- changelog.txt 15 Sep 2006 00:10:55 -0000 1.17 *************** *** 41,44 **** --- 41,46 ---- modules/wxlua/include/internal.h and modules/wxlua/src/internal.cpp to other files. Please include wxlua/wxlstate.h instead of this file. + - Cleanup debugging socket code + version 2.6.2.0 (released 10/03/2006) |
From: John L. <jr...@us...> - 2006-09-15 00:10:59
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23109/wxLua/apps/wxlua/src Modified Files: editor.h wxlua.cpp wxlua.h Log Message: rename EVT_WXLUA_DEBUG_XXX to EVT_WXLUA_DEBUGGER since that's what they apply to rename wxEVT_WXLUA_DEBUG_XXX to wxEVT_WXLUA_DEBUGGER_XXX wxLuaDebugEvent renamed to wxLuaDebuggerEvent rename wxLUASOCKET_DEBUG_EVENT_XXX to wxLUASOCKET_DEBUGGEE_EVENT_XXX rename wxLUASOCKET_DEBUG_CMD_XXX to wxLUASOCKET_DEBUGGER_CMD_XXX make all wxLuaSocketBase::ReadXXX functions return bool for success checking rename wxLuaDebugServer to wxLuaDebuggerServer Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wxlua.cpp 7 Sep 2006 04:20:53 -0000 1.34 --- wxlua.cpp 15 Sep 2006 00:10:55 -0000 1.35 *************** *** 141,147 **** EVT_LUA_DEBUG_HOOK (wxID_ANY, wxLuaStandaloneApp::OnLua) ! EVT_WXLUA_DEBUG_STACK_ENUM( wxLuaStandaloneApp::OnDebugStackEnum) ! EVT_WXLUA_DEBUG_STACK_ENTRY_ENUM(wxLuaStandaloneApp::OnDebugStackEntryEnum) ! EVT_WXLUA_DEBUG_TABLE_ENUM( wxLuaStandaloneApp::OnDebugTableEnum) END_EVENT_TABLE() --- 141,147 ---- EVT_LUA_DEBUG_HOOK (wxID_ANY, wxLuaStandaloneApp::OnLua) ! EVT_WXLUA_DEBUGGER_STACK_ENUM( wxLuaStandaloneApp::OnDebugStackEnum) ! EVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM(wxLuaStandaloneApp::OnDebugStackEntryEnum) ! EVT_WXLUA_DEBUGGER_TABLE_ENUM( wxLuaStandaloneApp::OnDebugTableEnum) END_EVENT_TABLE() *************** *** 166,171 **** // to be able to start a new instance when running a lua program. m_programName = argv[0]; ! wxLuaDebugServer::SetProgramName(argv[0]); ! wxLuaDebugServer::SetNetworkName(wxGetHostName()); wxInitAllImageHandlers(); --- 166,171 ---- // to be able to start a new instance when running a lua program. m_programName = argv[0]; ! wxLuaDebuggerServer::SetProgramName(argv[0]); ! wxLuaDebuggerServer::SetNetworkName(wxGetHostName()); wxInitAllImageHandlers(); *************** *** 215,219 **** if (parser.Found(wxT("d"), &value)) { ! // wxLuaDebugServer::StartClient() runs wxExecute(m_programName -d[host]:[port], ...) // Set up for debugging --- 215,219 ---- if (parser.Found(wxT("d"), &value)) { ! // wxLuaDebuggerServer::StartClient() runs wxExecute(m_programName -d[host]:[port], ...) // Set up for debugging *************** *** 411,415 **** } ! void wxLuaStandaloneApp::OnDebugStackEnum(wxLuaDebugEvent &event) { if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) --- 411,415 ---- } ! void wxLuaStandaloneApp::OnDebugStackEnum(wxLuaDebuggerEvent &event) { if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) *************** *** 419,423 **** } ! void wxLuaStandaloneApp::OnDebugStackEntryEnum(wxLuaDebugEvent &event) { if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) --- 419,423 ---- } ! void wxLuaStandaloneApp::OnDebugStackEntryEnum(wxLuaDebuggerEvent &event) { if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) *************** *** 427,431 **** } ! void wxLuaStandaloneApp::OnDebugTableEnum(wxLuaDebugEvent &event) { if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) --- 427,431 ---- } ! void wxLuaStandaloneApp::OnDebugTableEnum(wxLuaDebuggerEvent &event) { if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxlua.h 7 Sep 2006 04:20:53 -0000 1.18 --- wxlua.h 15 Sep 2006 00:10:55 -0000 1.19 *************** *** 23,27 **** class WXDLLIMPEXP_WXLUA wxLuaEvent; class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog; ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugEvent; class LuaHandler; --- 23,27 ---- class WXDLLIMPEXP_WXLUA wxLuaEvent; class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog; ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerEvent; class LuaHandler; *************** *** 48,54 **** void OnLua(wxLuaEvent &event); ! void OnDebugStackEnum(wxLuaDebugEvent &event); ! void OnDebugTableEnum(wxLuaDebugEvent &event); ! void OnDebugStackEntryEnum(wxLuaDebugEvent &event); wxString m_programName; --- 48,54 ---- void OnLua(wxLuaEvent &event); ! void OnDebugStackEnum(wxLuaDebuggerEvent &event); ! void OnDebugTableEnum(wxLuaDebuggerEvent &event); ! void OnDebugStackEntryEnum(wxLuaDebuggerEvent &event); wxString m_programName; Index: editor.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/editor.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** editor.h 7 Sep 2006 04:20:53 -0000 1.16 --- editor.h 15 Sep 2006 00:10:55 -0000 1.17 *************** *** 9,14 **** extern const unsigned char wxLuaEditor[]; ! const size_t wxLuaEditor_len = 71959; ! const unsigned char wxLuaEditor[71960] = { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 45, 45, 45, 10, 45, 45, 32, 78, 97,109,101, 58, 32, 32, 32, 32, 32, 32, 32, 32, 69,100,105,116,111,114, 46,119,120, 46,108,117, 97, 10, --- 9,14 ---- extern const unsigned char wxLuaEditor[]; ! const size_t wxLuaEditor_len = 71989; ! const unsigned char wxLuaEditor[71990] = { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 45, 45, 45, 10, 45, 45, 32, 78, 97,109,101, 58, 32, 32, 32, 32, 32, 32, 32, 32, 69,100,105,116,111,114, 46,119,120, 46,108,117, 97, 10, *************** *** 85,89 **** 102, 72, 97,118,101, 70,111,117,110,100, 32, 32, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,116,114,117,101, 32,119,104,101,110, 32,115,116,114,105,110,103, 32,104, 97,115, 32, 98,101,101,110, 32,102,111,117,110,100, 10, 101,100,105,116,111,114, 65,112,112, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32,119,120, 46,119,120, 71,101,116, 65,112,112, 40, 41, 10, ! 100,101, 98,117,103, 83,101,114,118,101,114, 32, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,119,120, 76,117, 97, 68,101, 98,117,103, 83,101,114,118,101,114, 32,111, 98,106,101, 99,116, 32,119,104,101,110, 32,100,101, 98,117,103,103,105,110,103, 10, 102, 73,115, 82,117,110,110,105,110,103, 32, 32, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,116,114,117,101, 32,119,104,101,110, 32,116,104,101, 32,100,101, 98,117,103,103,101,101, 32,105,115, 32,114,117,110,110,105,110,103, 10, 102, 73,115, 67,111,110,110,101, 99,116,101,100, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,116,114,117,101, 32,119,104,101,110, 32, 97, 32, 99,108,105,101,110,116, 32,104, 97,115, 32, 99,111,110,110,101, 99,116,101,100, 10, --- 85,89 ---- 102, 72, 97,118,101, 70,111,117,110,100, 32, 32, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,116,114,117,101, 32,119,104,101,110, 32,115,116,114,105,110,103, 32,104, 97,115, 32, 98,101,101,110, 32,102,111,117,110,100, 10, 101,100,105,116,111,114, 65,112,112, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32,119,120, 46,119,120, 71,101,116, 65,112,112, 40, 41, 10, ! 100,101, 98,117,103, 83,101,114,118,101,114, 32, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,119,120, 76,117, 97, 68,101, 98,117,103,103,101,114, 83,101,114,118,101,114, 32,111, 98,106,101, 99,116, 32,119,104,101,110, 32,100,101, 98,117,103,103,105,110,103, 10, 102, 73,115, 82,117,110,110,105,110,103, 32, 32, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,116,114,117,101, 32,119,104,101,110, 32,116,104,101, 32,100,101, 98,117,103,103,101,101, 32,105,115, 32,114,117,110,110,105,110,103, 10, 102, 73,115, 67,111,110,110,101, 99,116,101,100, 32, 32, 32, 32, 32, 61, 32,110,105,108, 32, 32, 32, 32, 45, 45, 32,116,114,117,101, 32,119,104,101,110, 32, 97, 32, 99,108,105,101,110,116, 32,104, 97,115, 32, 99,111,110,110,101, 99,116,101,100, 10, *************** *** 1531,1535 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 65, 84, 84, 65, 67, 72, 95, 68, 69, 66, 85, 71, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32, 61, 32,119,120, 46,119,120, 76,117, 97, 68,101, 98,117,103, 83,101,114,118,101,114, 40,112,111,114,116, 78,117,109, 98,101,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 58, 83,116, 97,114,116, 83,101,114,118,101,114, 84,104,114,101, 97,100, 40, 41, 10, --- 1531,1535 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 65, 84, 84, 65, 67, 72, 95, 68, 69, 66, 85, 71, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32, 61, 32,119,120, 46,119,120, 76,117, 97, 68,101, 98,117,103,103,101,114, 83,101,114,118,101,114, 40,112,111,114,116, 78,117,109, 98,101,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 58, 83,116, 97,114,116, 83,101,114,118,101,114, 84,104,114,101, 97,100, 40, 41, 10, *************** *** 1575,1579 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 83, 84, 65, 82, 84, 95, 68, 69, 66, 85, 71, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32, 61, 32,119,120, 46,119,120, 76,117, 97, 68,101, 98,117,103, 83,101,114,118,101,114, 40,112,111,114,116, 78,117,109, 98,101,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 58, 83,116, 97,114,116, 67,108,105,101,110,116, 40, 41, 10, --- 1575,1579 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 83, 84, 65, 82, 84, 95, 68, 69, 66, 85, 71, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32, 61, 32,119,120, 46,119,120, 76,117, 97, 68,101, 98,117,103,103,101,114, 83,101,114,118,101,114, 40,112,111,114,116, 78,117,109, 98,101,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,101, 98,117,103, 83,101,114,118,101,114, 58, 83,116, 97,114,116, 67,108,105,101,110,116, 40, 41, 10, *************** *** 1595,1599 **** 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,105,100, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32,101,100,105,116,111,114, 58, 71,101,116, 73,100, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,105,108,101, 80, 97,116,104, 32, 32, 32, 61, 32,109, 97,107,101, 68,101, 98,117,103, 70,105,108,101, 78, 97,109,101, 40,101,100,105,116,111,114, 44, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,102,105,108,101, 80, 97,116,104, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119,120, 46,119,120, 76,117, 97, 68,101, 98,117,103, 83,101,114,118,101,114, 67,111,109,112,105,108,101, 40,102,105,108,101, 80, 97,116,104, 44, 32,101,100,105,116,111,114, 84,101,120,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 79, 77, 80, 73, 76, 69, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, --- 1595,1599 ---- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,105,100, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32,101,100,105,116,111,114, 58, 71,101,116, 73,100, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,105,108,101, 80, 97,116,104, 32, 32, 32, 61, 32,109, 97,107,101, 68,101, 98,117,103, 70,105,108,101, 78, 97,109,101, 40,101,100,105,116,111,114, 44, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,102,105,108,101, 80, 97,116,104, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119,120, 46,119,120, 76,117, 97, 68,101, 98,117,103,103,101,114, 83,101,114,118,101,114, 67,111,109,112,105,108,101, 40,102,105,108,101, 80, 97,116,104, 44, 32,101,100,105,116,111,114, 84,101,120,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 79, 77, 80, 73, 76, 69, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, *************** *** 1731,1735 **** 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 95, 67, 76, 73, 69, 78, 84, 95, 67, 79, 78, 78, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32,116,104,101,110, 10, --- 1731,1735 ---- 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 71, 69, 82, 95, 67, 76, 73, 69, 78, 84, 95, 67, 79, 78, 78, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,100,101, 98,117,103, 83,101,114,118,101,114, 32,116,104,101,110, 10, *************** *** 1758,1762 **** 101,110,100, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 95, 66, 82, 69, 65, 75, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,120,105,116,105,110,103, 80,114,111,103,114, 97,109, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,101,110,100, 10, --- 1758,1762 ---- 101,110,100, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 71, 69, 82, 95, 66, 82, 69, 65, 75, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,120,105,116,105,110,103, 80,114,111,103,114, 97,109, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,101,110,100, 10, *************** *** 1833,1847 **** 101,110,100, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 95, 80, 82, 73, 78, 84, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,105,115,112,108, 97,121, 79,117,116,112,117,116, 40,101,118,101,110,116, 58, 71,101,116, 77,101,115,115, 97,103,101, 40, 41, 46, 46, 34, 92,110, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 95, 69, 82, 82, 79, 82, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,105,115,112,108, 97,121, 79,117,116,112,117,116, 40,101,118,101,110,116, 58, 71,101,116, 77,101,115,115, 97,103,101, 40, 41, 46, 46, 34, 92,110, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 95, 69, 88, 73, 84, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,111,114, 32,105,100, 44, 32,100,111, 99,117,109,101,110,116, 32,105,110, 32,112, 97,105,114,115, 40,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 41, 32,100,111, 10, --- 1833,1847 ---- 101,110,100, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 71, 69, 82, 95, 80, 82, 73, 78, 84, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,105,115,112,108, 97,121, 79,117,116,112,117,116, 40,101,118,101,110,116, 58, 71,101,116, 77,101,115,115, 97,103,101, 40, 41, 46, 46, 34, 92,110, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 71, 69, 82, 95, 69, 82, 82, 79, 82, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,100,105,115,112,108, 97,121, 79,117,116,112,117,116, 40,101,118,101,110,116, 58, 71,101,116, 77,101,115,115, 97,103,101, 40, 41, 46, 46, 34, 92,110, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 71, 69, 82, 95, 69, 88, 73, 84, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,111,114, 32,105,100, 44, 32,100,111, 99,117,109,101,110,116, 32,105,110, 32,112, 97,105,114,115, 40,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 41, 32,100,111, 10, *************** *** 1860,1864 **** 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 95, 69, 86, 65, 76, 85, 65, 84, 69, 95, 69, 88, 80, 82, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 32,116,104,101,110, 10, --- 1860,1864 ---- 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 101,100,105,116,111,114, 65,112,112, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 73, 68, 95, 65, 78, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 87, 88, 76, 85, 65, 95, 68, 69, 66, 85, 71, 71, 69, 82, 95, 69, 86, 65, 76, 85, 65, 84, 69, 95, 69, 88, 80, 82, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 32,116,104,101,110, 10, |
From: John L. <jr...@us...> - 2006-09-15 00:10:59
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23109/wxLua/modules/wxluasocket/src Modified Files: dservice.cpp wxldserv.cpp wxldtarg.cpp wxlsock.cpp wxluasocket.cpp wxluasocket_bind.cpp Log Message: rename EVT_WXLUA_DEBUG_XXX to EVT_WXLUA_DEBUGGER since that's what they apply to rename wxEVT_WXLUA_DEBUG_XXX to wxEVT_WXLUA_DEBUGGER_XXX wxLuaDebugEvent renamed to wxLuaDebuggerEvent rename wxLUASOCKET_DEBUG_EVENT_XXX to wxLUASOCKET_DEBUGGEE_EVENT_XXX rename wxLUASOCKET_DEBUG_CMD_XXX to wxLUASOCKET_DEBUGGER_CMD_XXX make all wxLuaSocketBase::ReadXXX functions return bool for success checking rename wxLuaDebugServer to wxLuaDebuggerServer Index: dservice.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/dservice.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** dservice.cpp 13 Sep 2006 04:13:48 -0000 1.21 --- dservice.cpp 15 Sep 2006 00:10:56 -0000 1.22 *************** *** 226,335 **** if (debugSocket && debuggee) { ! wxLuaSocketDebugCommands_Type debugCommand = (wxLuaSocketDebugCommands_Type)debugSocket->ReadByte(); ! switch(debugCommand) { ! case wxLUASOCKET_DEBUG_CMD_NONE : { break; } ! case wxLUASOCKET_DEBUG_CMD_ADD_BREAKPOINT: { ! wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); ! debuggee->AddBreakPoint(fileName, lineNumber); } ! break; ! ! case wxLUASOCKET_DEBUG_CMD_REMOVE_BREAKPOINT: { ! wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); ! debuggee->RemoveBreakPoint(fileName, lineNumber); } ! break; ! ! case wxLUASOCKET_DEBUG_CMD_DISABLE_BREAKPOINT: { ! wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); ! debuggee->DisableBreakPoint(fileName, lineNumber); } ! break; ! ! ! case wxLUASOCKET_DEBUG_CMD_ENABLE_BREAKPOINT: { ! wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); ! debuggee->EnableBreakPoint(fileName, lineNumber); } ! break; ! ! case wxLUASOCKET_DEBUG_CMD_CLEAR_ALL_BREAKPOINTS: ! debuggee->ClearAllBreakPoints(); ! break; ! ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEP: ! debuggee->Step(); ! break; ! ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOVER: ! debuggee->StepOver(); ! break; ! ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOUT: ! debuggee->StepOut(); ! break; ! ! case wxLUASOCKET_DEBUG_CMD_DEBUG_CONTINUE: ! debuggee->Continue(); ! break; ! ! case wxLUASOCKET_DEBUG_CMD_DEBUG_BREAK: ! debuggee->Break(); ! break; ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK: ! debuggee->EnumerateStack(); ! break; ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK_ENTRY: ! { ! int stackRef = debugSocket->ReadInt32(); ! debuggee->EnumerateStackEntry(stackRef); } ! break; ! ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_TABLE_REF: { ! int tableRef = debugSocket->ReadInt32(); ! int index = debugSocket->ReadInt32(); ! long itemNode = debugSocket->ReadLong(); ! debuggee->EnumerateTable(tableRef, index, itemNode); ! } ! break; ! ! case wxLUASOCKET_DEBUG_CMD_RESET: ! debuggee->Reset(); ! break; ! case wxLUASOCKET_DEBUG_CMD_EVALUATE_EXPR: ! { ! int exprRef = debugSocket->ReadInt32(); ! wxString buffer = debugSocket->ReadString(); ! debuggee->EvaluateExpr(exprRef, buffer); } ! break; ! case wxLUASOCKET_DEBUG_CMD_CLEAR_DEBUG_REFERENCES: { debuggee->ClearReferences(); } ! break; ! case wxLUASOCKET_DEBUG_CMD_RUN_BUFFER: break; // FIXME - not impemented } } --- 226,355 ---- if (debugSocket && debuggee) { ! unsigned char debugCommand = 0; // wxLuaSocketDebuggerCommands_Type ! if (!debugSocket->ReadByte(debugCommand)) ! break; ! ! switch((int)debugCommand) { ! case wxLUASOCKET_DEBUGGER_CMD_NONE : { break; } ! case wxLUASOCKET_DEBUGGER_CMD_ADD_BREAKPOINT: { ! wxString fileName; ! wxInt32 lineNumber = 0; ! if (debugSocket->ReadString(fileName) && ! debugSocket->ReadInt32(lineNumber)) ! { ! debuggee->AddBreakPoint(fileName, lineNumber); ! } ! break; } ! case wxLUASOCKET_DEBUGGER_CMD_REMOVE_BREAKPOINT: { ! wxString fileName; ! wxInt32 lineNumber = 0; ! if (debugSocket->ReadString(fileName) && ! debugSocket->ReadInt32(lineNumber)) ! { ! debuggee->RemoveBreakPoint(fileName, lineNumber); ! } ! break; } ! case wxLUASOCKET_DEBUGGER_CMD_DISABLE_BREAKPOINT: { ! wxString fileName; ! wxInt32 lineNumber = 0; ! if (debugSocket->ReadString(fileName) && ! debugSocket->ReadInt32(lineNumber)) ! { ! debuggee->DisableBreakPoint(fileName, lineNumber); ! } ! break; } ! case wxLUASOCKET_DEBUGGER_CMD_ENABLE_BREAKPOINT: { ! wxString fileName; ! wxInt32 lineNumber = 0; ! if (debugSocket->ReadString(fileName) && ! debugSocket->ReadInt32(lineNumber)) ! { ! debuggee->EnableBreakPoint(fileName, lineNumber); ! } ! break; } ! case wxLUASOCKET_DEBUGGER_CMD_CLEAR_ALL_BREAKPOINTS: ! debuggee->ClearAllBreakPoints(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEP: ! debuggee->Step(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEPOVER: ! debuggee->StepOver(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEPOUT: ! debuggee->StepOut(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_DEBUG_CONTINUE: ! debuggee->Continue(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_DEBUG_BREAK: ! debuggee->Break(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_ENUMERATE_STACK: ! debuggee->EnumerateStack(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_ENUMERATE_STACK_ENTRY: ! { ! int stackRef = 0; ! if (debugSocket->ReadInt32(stackRef)) ! debuggee->EnumerateStackEntry(stackRef); ! break; } ! case wxLUASOCKET_DEBUGGER_CMD_ENUMERATE_TABLE_REF: { ! wxInt32 tableRef = 0; ! wxInt32 index = 0; ! long itemNode = 0; ! if (debugSocket->ReadInt32(tableRef) && ! debugSocket->ReadInt32(index) && ! debugSocket->ReadLong(itemNode)) ! { ! debuggee->EnumerateTable(tableRef, index, itemNode); ! } ! break; } ! case wxLUASOCKET_DEBUGGER_CMD_RESET: ! debuggee->Reset(); ! break; ! case wxLUASOCKET_DEBUGGER_CMD_EVALUATE_EXPR: ! { ! wxInt32 exprRef = 0; ! wxString buffer; ! if (debugSocket->ReadInt32(exprRef) && ! debugSocket->ReadString(buffer)) ! { ! debuggee->EvaluateExpr(exprRef, buffer); ! } ! break; ! } ! case wxLUASOCKET_DEBUGGER_CMD_CLEAR_DEBUG_REFERENCES: { debuggee->ClearReferences(); + break; } ! case wxLUASOCKET_DEBUGGER_CMD_RUN_BUFFER: ! break; // FIXME - not impemented ! default : ! wxFAIL_MSG(wxT("Invalid wxLuaSocketDebuggerCommands_Type in wxLuaDebugService::OnSocketEvent")); } } *************** *** 373,377 **** debuggee->Continue(); ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STOPDEBUGGER); wxLuaHandler::GetHandler().ProcessEvent(debugEvent); } --- 393,397 ---- debuggee->Continue(); ! wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_STOPDEBUGGER); wxLuaHandler::GetHandler().ProcessEvent(debugEvent); } *************** *** 435,439 **** if (!IsDebugger()) { ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STARTDEBUGGER); // started debug process --- 455,459 ---- if (!IsDebugger()) { ! wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_STARTDEBUGGER); // started debug process *************** *** 454,458 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_BREAK); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(fileName.GetFullPath()); --- 474,478 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_BREAK); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(fileName.GetFullPath()); *************** *** 480,484 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_ERROR); dSocket->WriteString(errorMsg); --- 500,504 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_ERROR); dSocket->WriteString(errorMsg); *************** *** 501,505 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_ERROR); dSocket->WriteString(errorMsg); --- 521,525 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_ERROR); dSocket->WriteString(errorMsg); *************** *** 522,526 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_EXIT); if (!dSocket->Error()) --- 542,546 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_EXIT); if (!dSocket->Error()) *************** *** 542,546 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_STACK_ENUM); dSocket->WriteDebugData(debugData); --- 562,566 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_STACK_ENUM); dSocket->WriteDebugData(debugData); *************** *** 563,567 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_STACK_ENTRY_ENUM); dSocket->WriteInt32(entryRef); dSocket->WriteDebugData(debugData); --- 583,587 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_STACK_ENTRY_ENUM); dSocket->WriteInt32(entryRef); dSocket->WriteDebugData(debugData); *************** *** 585,589 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_TABLE_ENUM); dSocket->WriteLong(itemNode); dSocket->WriteDebugData(debugData); --- 605,609 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_TABLE_ENUM); dSocket->WriteLong(itemNode); dSocket->WriteDebugData(debugData); *************** *** 607,611 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_EVALUATE_EXPR); dSocket->WriteInt32(exprRef); dSocket->WriteString(strResult); --- 627,631 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_EVALUATE_EXPR); dSocket->WriteInt32(exprRef); dSocket->WriteString(strResult); *************** *** 631,635 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_ADDED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); --- 651,655 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_BREAKPOINT_ADDED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); *************** *** 661,665 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_REMOVED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); --- 681,685 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUGGEE_EVENT_BREAKPOINT_REMOVED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); *************** *** 769,774 **** // Events from Debug Service ! int debuggeeEvent = m_debuggerSocket->ReadByte(); ! HandleDebugEvent((wxLuaScoketDebugEvents_Type) debuggeeEvent); // Enable input events again. --- 789,795 ---- // Events from Debug Service ! unsigned char debuggeeEvent = 0; // wxLuaSocketDebuggeeEvents_Type ! if (m_debuggerSocket->ReadByte(debuggeeEvent)) ! HandleDebugEvent((wxLuaSocketDebuggeeEvents_Type) debuggeeEvent); // Enable input events again. *************** *** 1004,1010 **** // Notify Debuggee #if wxCHECK_VERSION(2,3,0) ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED, lineNumber, fileName.GetFullPath()); #else ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED, lineNumber, fileName); #endif --- 1025,1031 ---- // Notify Debuggee #if wxCHECK_VERSION(2,3,0) ! wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_BREAKPOINT_ADDED, lineNumber, fileName.GetFullPath()); #else ! wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_BREAKPOINT_ADDED, lineNumber, fileName); #endif *************** *** 1030,1036 **** // Notify Debuggee #if wxCHECK_VERSION(2,3,0) ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED, lineNumber, fileName.GetFullPath()); #else ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED, lineNumber, fileName); #endif wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); --- 1051,1057 ---- // Notify Debuggee #if wxCHECK_VERSION(2,3,0) ! wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_BREAKPOINT_REMOVED, lineNumber, fileName.GetFullPath()); #else ! wxLuaDebuggerEvent debugEvent(wxEVT_WXLUA_DEBUGGER_BREAKPOINT_REMOVED, lineNumber, fileName); #endif wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); Index: wxluasocket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxluasocket.cpp 7 Sep 2006 22:42:19 -0000 1.4 --- wxluasocket.cpp 15 Sep 2006 00:10:56 -0000 1.5 *************** *** 21,50 **** // ------------------------------------------------------------------------------------------------- ! // Bind class wxLuaDebugServer // ------------------------------------------------------------------------------------------------- ! // Lua MetaTable Tag for Class 'wxLuaDebugServer' ! int s_wxluatag_wxLuaDebugServer = -1; ! // wxLuaDebugServer(int portNumber) ! static int LUACALL wxLua_wxLuaDebugServer_constructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebugServer *returns; // int portNumber int portNumber = (int)wxlState.GetNumberType(1); // call constructor ! returns = new wxLuaDebugServer(portNumber); // add to tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxLuaDebugServer *)returns); // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxLuaDebugServer, returns); return 1; } ! // %override wxLua_wxLuaDebugServerCompile_constructor ! // %constructor wxLuaDebugServerCompile(const wxString &buffer, const wxString &fileName) ! static int LUACALL wxLua_wxLuaDebugServerCompile_constructor(lua_State *L) { wxLuaState wxlState(L); --- 21,50 ---- // ------------------------------------------------------------------------------------------------- ! // Bind class wxLuaDebuggerServer // ------------------------------------------------------------------------------------------------- ! // Lua MetaTable Tag for Class 'wxLuaDebuggerServer' ! int s_wxluatag_wxLuaDebuggerServer = -1; ! // wxLuaDebuggerServer(int portNumber) ! static int LUACALL wxLua_wxLuaDebuggerServer_constructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebuggerServer *returns; // int portNumber int portNumber = (int)wxlState.GetNumberType(1); // call constructor ! returns = new wxLuaDebuggerServer(portNumber); // add to tracked memory list ! wxLua_AddToTrackedMemoryList(wxlState, (wxLuaDebuggerServer *)returns); // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxLuaDebuggerServer, returns); return 1; } ! // %override wxLua_wxLuaDebuggerServerCompile_constructor ! // %constructor wxLua_wxLuaDebuggerServerCompile_constructor(const wxString &buffer, const wxString &fileName) ! static int LUACALL wxLua_wxLuaDebuggerServerCompile_constructor(lua_State *L) { wxLuaState wxlState(L); *************** *** 63,72 **** // bool StartClient() ! static int LUACALL wxLua_wxLuaDebugServer_StartClient(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StartClient returns = self->StartClient(); --- 63,72 ---- // bool StartClient() ! static int LUACALL wxLua_wxLuaDebuggerServer_StartClient(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call StartClient returns = self->StartClient(); *************** *** 78,87 **** // bool StartServerThread() ! static int LUACALL wxLua_wxLuaDebugServer_StartServerThread(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StartServerThread returns = self->StartServerThread(); --- 78,87 ---- // bool StartServerThread() ! static int LUACALL wxLua_wxLuaDebuggerServer_StartServerThread(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call StartServerThread returns = self->StartServerThread(); *************** *** 93,97 **** // bool AddBreakPoint(const wxString &fileName, int lineNumber) ! static int LUACALL wxLua_wxLuaDebugServer_AddBreakPoint(lua_State *L) { wxLuaState wxlState(L); --- 93,97 ---- // bool AddBreakPoint(const wxString &fileName, int lineNumber) ! static int LUACALL wxLua_wxLuaDebuggerServer_AddBreakPoint(lua_State *L) { wxLuaState wxlState(L); *************** *** 102,106 **** const wxString fileName = lua2wx(wxlState.GetStringType(2)); // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call AddBreakPoint returns = self->AddBreakPoint(fileName, lineNumber); --- 102,106 ---- const wxString fileName = lua2wx(wxlState.GetStringType(2)); // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call AddBreakPoint returns = self->AddBreakPoint(fileName, lineNumber); *************** *** 112,116 **** // bool RemoveBreakPoint(const wxString &fileName, int lineNumber) ! static int LUACALL wxLua_wxLuaDebugServer_RemoveBreakPoint(lua_State *L) { wxLuaState wxlState(L); --- 112,116 ---- // bool RemoveBreakPoint(const wxString &fileName, int lineNumber) ! static int LUACALL wxLua_wxLuaDebuggerServer_RemoveBreakPoint(lua_State *L) { wxLuaState wxlState(L); *************** *** 121,125 **** const wxString fileName = lua2wx(wxlState.GetStringType(2)); // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call RemoveBreakPoint returns = self->RemoveBreakPoint(fileName, lineNumber); --- 121,125 ---- const wxString fileName = lua2wx(wxlState.GetStringType(2)); // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call RemoveBreakPoint returns = self->RemoveBreakPoint(fileName, lineNumber); *************** *** 131,140 **** // bool ClearAllBreakPoints() ! static int LUACALL wxLua_wxLuaDebugServer_ClearAllBreakPoints(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call ClearAllBreakPoints returns = self->ClearAllBreakPoints(); --- 131,140 ---- // bool ClearAllBreakPoints() ! static int LUACALL wxLua_wxLuaDebuggerServer_ClearAllBreakPoints(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call ClearAllBreakPoints returns = self->ClearAllBreakPoints(); *************** *** 146,150 **** // bool Run(const wxString &file, const wxString &fileName) ! static int LUACALL wxLua_wxLuaDebugServer_Run(lua_State *L) { wxLuaState wxlState(L); --- 146,150 ---- // bool Run(const wxString &file, const wxString &fileName) ! static int LUACALL wxLua_wxLuaDebuggerServer_Run(lua_State *L) { wxLuaState wxlState(L); *************** *** 155,159 **** const wxString file = lua2wx(wxlState.GetStringType(2)); // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Run returns = self->Run(file, fileName); --- 155,159 ---- const wxString file = lua2wx(wxlState.GetStringType(2)); // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call Run returns = self->Run(file, fileName); *************** *** 165,174 **** // bool Step() ! static int LUACALL wxLua_wxLuaDebugServer_Step(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Step returns = self->Step(); --- 165,174 ---- // bool Step() ! static int LUACALL wxLua_wxLuaDebuggerServer_Step(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call Step returns = self->Step(); *************** *** 180,189 **** // bool StepOver() ! static int LUACALL wxLua_wxLuaDebugServer_StepOver(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StepOver returns = self->StepOver(); --- 180,189 ---- // bool StepOver() ! static int LUACALL wxLua_wxLuaDebuggerServer_StepOver(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call StepOver returns = self->StepOver(); *************** *** 195,204 **** // bool StepOut() ! static int LUACALL wxLua_wxLuaDebugServer_StepOut(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call StepOut returns = self->StepOut(); --- 195,204 ---- // bool StepOut() ! static int LUACALL wxLua_wxLuaDebuggerServer_StepOut(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call StepOut returns = self->StepOut(); *************** *** 210,219 **** // bool Continue() ! static int LUACALL wxLua_wxLuaDebugServer_Continue(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Continue returns = self->Continue(); --- 210,219 ---- // bool Continue() ! static int LUACALL wxLua_wxLuaDebuggerServer_Continue(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call Continue returns = self->Continue(); *************** *** 225,234 **** // bool Break() ! static int LUACALL wxLua_wxLuaDebugServer_Break(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Break returns = self->Break(); --- 225,234 ---- // bool Break() ! static int LUACALL wxLua_wxLuaDebuggerServer_Break(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call Break returns = self->Break(); *************** *** 240,249 **** // bool Reset() ! static int LUACALL wxLua_wxLuaDebugServer_Reset(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call Reset returns = self->Reset(); --- 240,249 ---- // bool Reset() ! static int LUACALL wxLua_wxLuaDebuggerServer_Reset(lua_State *L) { wxLuaState wxlState(L); bool returns; // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call Reset returns = self->Reset(); *************** *** 255,259 **** // void DisplayStackDialog(wxWindow *pParent) ! static int LUACALL wxLua_wxLuaDebugServer_DisplayStackDialog(lua_State *L) { wxLuaState wxlState(L); --- 255,259 ---- // void DisplayStackDialog(wxWindow *pParent) ! static int LUACALL wxLua_wxLuaDebuggerServer_DisplayStackDialog(lua_State *L) { wxLuaState wxlState(L); *************** *** 261,265 **** wxWindow * pParent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call DisplayStackDialog self->DisplayStackDialog(pParent); --- 261,265 ---- wxWindow * pParent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call DisplayStackDialog self->DisplayStackDialog(pParent); *************** *** 269,273 **** // bool EvaluateExpr(int exprRef, const wxString &expr) ! static int LUACALL wxLua_wxLuaDebugServer_EvaluateExpr(lua_State *L) { wxLuaState wxlState(L); --- 269,273 ---- // bool EvaluateExpr(int exprRef, const wxString &expr) ! static int LUACALL wxLua_wxLuaDebuggerServer_EvaluateExpr(lua_State *L) { wxLuaState wxlState(L); *************** *** 278,282 **** int exprRef = (int)wxlState.GetNumberType(2); // get this ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // call EvaluateExpr returns = self->EvaluateExpr(exprRef, expr); --- 278,282 ---- int exprRef = (int)wxlState.GetNumberType(2); // get this ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // call EvaluateExpr returns = self->EvaluateExpr(exprRef, expr); *************** *** 287,294 **** } ! static int LUACALL wxLua_wxLuaDebugServer_destructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // remove from tracked memory list --- 287,294 ---- } ! static int LUACALL wxLua_wxLuaDebuggerServer_destructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // remove from tracked memory list *************** *** 298,305 **** } ! static int LUACALL wxLua_wxLuaDebugServer_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebugServer * self = (wxLuaDebugServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugServer); // remove from tracked memory list if (self != 0) --- 298,305 ---- } ! static int LUACALL wxLua_wxLuaDebuggerServer_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); // remove from tracked memory list if (self != 0) *************** *** 317,359 **** // Map Lua Class Methods to C Binding Functions ! static WXLUAMETHOD s_wxLuaDebugServer_methods[] = { ! { LuaConstructor, "wxLuaDebugServer", wxLua_wxLuaDebugServer_constructor, 1, 1, { &s_wxluaarg_Number, 0 } }, ! { LuaConstructor, "wxLuaDebugServerCompile", wxLua_wxLuaDebugServerCompile_constructor, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, ! { LuaMethod, "StartClient", wxLua_wxLuaDebugServer_StartClient, 0, 0, { 0 } }, ! { LuaMethod, "StartServerThread", wxLua_wxLuaDebugServer_StartServerThread, 0, 0, { 0 } }, ! { LuaMethod, "AddBreakPoint", wxLua_wxLuaDebugServer_AddBreakPoint, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, ! { LuaMethod, "RemoveBreakPoint", wxLua_wxLuaDebugServer_RemoveBreakPoint, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, ! { LuaMethod, "ClearAllBreakPoints", wxLua_wxLuaDebugServer_ClearAllBreakPoints, 0, 0, { 0 } }, ! { LuaMethod, "Run", wxLua_wxLuaDebugServer_Run, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, ! { LuaMethod, "Step", wxLua_wxLuaDebugServer_Step, 0, 0, { 0 } }, ! { LuaMethod, "StepOver", wxLua_wxLuaDebugServer_StepOver, 0, 0, { 0 } }, ! { LuaMethod, "StepOut", wxLua_wxLuaDebugServer_StepOut, 0, 0, { 0 } }, ! { LuaMethod, "Continue", wxLua_wxLuaDebugServer_Continue, 0, 0, { 0 } }, ! { LuaMethod, "Break", wxLua_wxLuaDebugServer_Break, 0, 0, { 0 } }, ! { LuaMethod, "Reset", wxLua_wxLuaDebugServer_Reset, 0, 0, { 0 } }, ! { LuaMethod, "DisplayStackDialog", wxLua_wxLuaDebugServer_DisplayStackDialog, 1, 1, { &s_wxluatag_wxWindow, 0 } }, ! { LuaMethod, "EvaluateExpr", wxLua_wxLuaDebugServer_EvaluateExpr, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, ! { LuaDelete, "wxLuaDebugServer", wxLua_wxLuaDebugServer_destructor, 0, 0, {0} }, ! { LuaMethod, "Delete", wxLua_wxLuaDebugServer_Delete, 0, 0, {0} }, }; // Extern accessor to class method map ! WXLUAMETHOD* wxLuaDebugServer_methods = s_wxLuaDebugServer_methods; ! int wxLuaDebugServer_methodCount = sizeof(s_wxLuaDebugServer_methods)/sizeof(s_wxLuaDebugServer_methods[0]); // ------------------------------------------------------------------------------------------------- ! // Bind class wxLuaDebugEvent // ------------------------------------------------------------------------------------------------- ! // Lua MetaTable Tag for Class 'wxLuaDebugEvent' ! int s_wxluatag_wxLuaDebugEvent = -1; // int GetLineNumber() const ! static int LUACALL wxLua_wxLuaDebugEvent_GetLineNumber(lua_State *L) { wxLuaState wxlState(L); int returns; // get this ! wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetLineNumber returns = self->GetLineNumber(); --- 317,359 ---- // Map Lua Class Methods to C Binding Functions ! static WXLUAMETHOD s_wxLuaDebuggerServer_methods[] = { ! { LuaConstructor, "wxLuaDebuggerServer", wxLua_wxLuaDebuggerServer_constructor, 1, 1, { &s_wxluaarg_Number, 0 } }, ! { LuaConstructor, "wxLuaDebuggerServerCompile", wxLua_wxLuaDebuggerServerCompile_constructor, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, ! { LuaMethod, "StartClient", wxLua_wxLuaDebuggerServer_StartClient, 0, 0, { 0 } }, ! { LuaMethod, "StartServerThread", wxLua_wxLuaDebuggerServer_StartServerThread, 0, 0, { 0 } }, ! { LuaMethod, "AddBreakPoint", wxLua_wxLuaDebuggerServer_AddBreakPoint, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, ! { LuaMethod, "RemoveBreakPoint", wxLua_wxLuaDebuggerServer_RemoveBreakPoint, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, ! { LuaMethod, "ClearAllBreakPoints", wxLua_wxLuaDebuggerServer_ClearAllBreakPoints, 0, 0, { 0 } }, ! { LuaMethod, "Run", wxLua_wxLuaDebuggerServer_Run, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, ! { LuaMethod, "Step", wxLua_wxLuaDebuggerServer_Step, 0, 0, { 0 } }, ! { LuaMethod, "StepOver", wxLua_wxLuaDebuggerServer_StepOver, 0, 0, { 0 } }, ! { LuaMethod, "StepOut", wxLua_wxLuaDebuggerServer_StepOut, 0, 0, { 0 } }, ! { LuaMethod, "Continue", wxLua_wxLuaDebuggerServer_Continue, 0, 0, { 0 } }, ! { LuaMethod, "Break", wxLua_wxLuaDebuggerServer_Break, 0, 0, { 0 } }, ! { LuaMethod, "Reset", wxLua_wxLuaDebuggerServer_Reset, 0, 0, { 0 } }, ! { LuaMethod, "DisplayStackDialog", wxLua_wxLuaDebuggerServer_DisplayStackDialog, 1, 1, { &s_wxluatag_wxWindow, 0 } }, ! { LuaMethod, "EvaluateExpr", wxLua_wxLuaDebuggerServer_EvaluateExpr, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, ! { LuaDelete, "wxLuaDebuggerServer", wxLua_wxLuaDebuggerServer_destructor, 0, 0, {0} }, ! { LuaMethod, "Delete", wxLua_wxLuaDebuggerServer_Delete, 0, 0, {0} }, }; // Extern accessor to class method map ! WXLUAMETHOD* wxLuaDebuggerServer_methods = s_wxLuaDebuggerServer_methods; ! int wxLuaDebuggerServer_methodCount = sizeof(s_wxLuaDebuggerServer_methods)/sizeof(s_wxLuaDebuggerServer_methods[0]); // ------------------------------------------------------------------------------------------------- ! // Bind class wxLuaDebuggerEvent // ------------------------------------------------------------------------------------------------- ! // Lua MetaTable Tag for Class 'wxLuaDebuggerEvent' ! int s_wxluatag_wxLuaDebuggerEvent = -1; // int GetLineNumber() const ! static int LUACALL wxLua_wxLuaDebuggerEvent_GetLineNumber(lua_State *L) { wxLuaState wxlState(L); int returns; // get this ! wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); // call GetLineNumber returns = self->GetLineNumber(); *************** *** 365,374 **** // int GetReference() const ! static int LUACALL wxLua_wxLuaDebugEvent_GetReference(lua_State *L) { wxLuaState wxlState(L); int returns; // get this ! wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetReference returns = self->GetReference(); --- 365,374 ---- // int GetReference() const ! static int LUACALL wxLua_wxLuaDebuggerEvent_GetReference(lua_State *L) { wxLuaState wxlState(L); int returns; // get this ! wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); // call GetReference returns = self->GetReference(); *************** *** 380,389 **** // wxString GetFileName() const ! static int LUACALL wxLua_wxLuaDebugEvent_GetFileName(lua_State *L) { wxLuaState wxlState(L); wxString returns; // get this ! wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetFileName returns = self->GetFileName(); --- 380,389 ---- // wxString GetFileName() const ! static int LUACALL wxLua_wxLuaDebuggerEvent_GetFileName(lua_State *L) { wxLuaState wxlState(L); wxString returns; // get this ! wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); // call GetFileName returns = self->GetFileName(); *************** *** 395,404 **** // wxString GetMessage() const ! static int LUACALL wxLua_wxLuaDebugEvent_GetMessage(lua_State *L) { wxLuaState wxlState(L); wxString returns; // get this ! wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // call GetMessage returns = self->GetMessage(); --- 395,404 ---- // wxString GetMessage() const ! static int LUACALL wxLua_wxLuaDebuggerEvent_GetMessage(lua_State *L) { wxLuaState wxlState(L); wxString returns; // get this ! wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); // call GetMessage returns = self->GetMessage(); *************** *** 409,416 **** } ! static int LUACALL wxLua_wxLuaDebugEvent_destructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // remove from tracked memory list --- 409,416 ---- } ! static int LUACALL wxLua_wxLuaDebuggerEvent_destructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); // remove from tracked memory list *************** *** 420,427 **** } ! static int LUACALL wxLua_wxLuaDebugEvent_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); // remove from tracked memory list if (self != 0) --- 420,427 ---- } ! static int LUACALL wxLua_wxLuaDebuggerEvent_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); // remove from tracked memory list if (self != 0) *************** *** 439,453 **** // Map Lua Class Methods to C Binding Functions ! static WXLUAMETHOD s_wxLuaDebugEvent_methods[] = { ! { LuaMethod, "GetLineNumber", wxLua_wxLuaDebugEvent_GetLineNumber, 0, 0, { 0 } }, ! { LuaMethod, "GetReference", wxLua_wxLuaDebugEvent_GetReference, 0, 0, { 0 } }, ! { LuaMethod, "GetFileName", wxLua_wxLuaDebugEvent_GetFileName, 0, 0, { 0 } }, ! { LuaMethod, "GetMessage", wxLua_wxLuaDebugEvent_GetMessage, 0, 0, { 0 } }, ! { LuaDelete, "wxLuaDebugEvent", wxLua_wxLuaDebugEvent_destructor, 0, 0, {0} }, ! { LuaMethod, "Delete", wxLua_wxLuaDebugEvent_Delete, 0, 0, {0} }, }; // Extern accessor to class method map ! WXLUAMETHOD* wxLuaDebugEvent_methods = s_wxLuaDebugEvent_methods; ! int wxLuaDebugEvent_methodCount = sizeof(s_wxLuaDebugEvent_methods)/sizeof(s_wxLuaDebugEvent_methods[0]); --- 439,453 ---- // Map Lua Class Methods to C Binding Functions ! static WXLUAMETHOD s_wxLuaDebuggerEvent_methods[] = { ! { LuaMethod, "GetLineNumber", wxLua_wxLuaDebuggerEvent_GetLineNumber, 0, 0, { 0 } }, ! { LuaMethod, "GetReference", wxLua_wxLuaDebuggerEvent_GetReference, 0, 0, { 0 } }, ! { LuaMethod, "GetFileName", wxLua_wxLuaDebuggerEvent_GetFileName, 0, 0, { 0 } }, ! { LuaMethod, "GetMessage", wxLua_wxLuaDebuggerEvent_GetMessage, 0, 0, { 0 } }, ! { LuaDelete, "wxLuaDebuggerEvent", wxLua_wxLuaDebuggerEvent_destructor, 0, 0, {0} }, ! { LuaMethod, "Delete", wxLua_wxLuaDebuggerEvent_Delete, 0, 0, {0} }, }; // Extern accessor to class method map ! WXLUAMETHOD* wxLuaDebuggerEvent_methods = s_wxLuaDebuggerEvent_methods; ! int wxLuaDebuggerEvent_methodCount = sizeof(s_wxLuaDebuggerEvent_methods)/sizeof(s_wxLuaDebuggerEvent_methods[0]); Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxluasocket_bind.cpp 7 Sep 2006 22:42:19 -0000 1.4 --- wxluasocket_bind.cpp 15 Sep 2006 00:10:56 -0000 1.5 *************** *** 28,40 **** static WXLUAEVENT eventList[] = { ! { &wxEVT_WXLUA_DEBUG_BREAK, "wxEVT_WXLUA_DEBUG_BREAK", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_CLIENT_CONNECTED, "wxEVT_WXLUA_DEBUG_CLIENT_CONNECTED", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_ERROR, "wxEVT_WXLUA_DEBUG_ERROR", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_EVALUATE_EXPR, "wxEVT_WXLUA_DEBUG_EVALUATE_EXPR", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_EXIT, "wxEVT_WXLUA_DEBUG_EXIT", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_PRINT, "wxEVT_WXLUA_DEBUG_PRINT", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM, "wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_STACK_ENUM, "wxEVT_WXLUA_DEBUG_STACK_ENUM", &s_wxluatag_wxLuaDebugEvent }, ! { &wxEVT_WXLUA_DEBUG_TABLE_ENUM, "wxEVT_WXLUA_DEBUG_TABLE_ENUM", &s_wxluatag_wxLuaDebugEvent }, { 0, 0, 0 }, --- 28,40 ---- static WXLUAEVENT eventList[] = { ! { &wxEVT_WXLUA_DEBUGGER_BREAK, "wxEVT_WXLUA_DEBUGGER_BREAK", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_CLIENT_CONNECTED, "wxEVT_WXLUA_DEBUGGER_CLIENT_CONNECTED", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_ERROR, "wxEVT_WXLUA_DEBUGGER_ERROR", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_EVALUATE_EXPR, "wxEVT_WXLUA_DEBUGGER_EVALUATE_EXPR", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_EXIT, "wxEVT_WXLUA_DEBUGGER_EXIT", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_PRINT, "wxEVT_WXLUA_DEBUGGER_PRINT", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM, "wxEVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_STACK_ENUM, "wxEVT_WXLUA_DEBUGGER_STACK_ENUM", &s_wxluatag_wxLuaDebuggerEvent }, ! { &wxEVT_WXLUA_DEBUGGER_TABLE_ENUM, "wxEVT_WXLUA_DEBUGGER_TABLE_ENUM", &s_wxluatag_wxLuaDebuggerEvent }, { 0, 0, 0 }, *************** *** 127,132 **** static WXLUACLASS classList[] = { ! { "wxLuaDebugEvent", wxLuaDebugEvent_methods, wxLuaDebugEvent_methodCount, -1, CLASSINFO(wxLuaDebugEvent), &s_wxluatag_wxLuaDebugEvent, "wxEvent" }, ! { "wxLuaDebugServer", wxLuaDebugServer_methods, wxLuaDebugServer_methodCount, -1, NULL, &s_wxluatag_wxLuaDebugServer, NULL }, { 0, 0, 0, 0, 0, 0, 0 }, }; --- 127,132 ---- static WXLUACLASS classList[] = { ! { "wxLuaDebuggerEvent", wxLuaDebuggerEvent_methods, wxLuaDebuggerEvent_methodCount, -1, CLASSINFO(wxLuaDebuggerEvent), &s_wxluatag_wxLuaDebuggerEvent, "wxEvent" }, ! { "wxLuaDebuggerServer", wxLuaDebuggerServer_methods, wxLuaDebuggerServer_methodCount, -1, NULL, &s_wxluatag_wxLuaDebuggerServer, NULL }, { 0, 0, 0, 0, 0, 0, 0 }, }; Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxldserv.cpp 13 Sep 2006 04:13:48 -0000 1.19 --- wxldserv.cpp 15 Sep 2006 00:10:56 -0000 1.20 *************** *** 1,4 **** ///////////////////////////////////////////////////////////////////////////// ! // Name: wxLuaDebugServer.cpp // Purpose: Provide remote debugging support for wxLua. // Author: J. Winwood --- 1,4 ---- ///////////////////////////////////////////////////////////////////////////// ! // Name: wxLuaDebuggerServer.cpp // Purpose: Provide remote debugging support for wxLua. // Author: J. Winwood *************** *** 32,84 **** // ---------------------------------------------------------------------------- ! // wxLuaDebugEvent // ---------------------------------------------------------------------------- ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_CLIENT_CONNECTED) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_BREAK) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_PRINT) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_ERROR) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_EXIT) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_STACK_ENUM) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_TABLE_ENUM) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_EVALUATE_EXPR) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_STARTDEBUGGER) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_STOPDEBUGGER) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED) ! IMPLEMENT_DYNAMIC_CLASS(wxLuaDebugEvent, wxEvent) ! wxLuaDebugEvent::wxLuaDebugEvent(const wxLuaDebugEvent& event) ! :wxEvent(event) { - m_lineNumber = event.m_lineNumber; - m_fileName = event.m_fileName; - m_strMessage = event.m_strMessage; - m_fHasMessage = event.m_fHasMessage; - m_nReference = event.m_nReference; - m_fEnabledFlag = event.m_fEnabledFlag; - SetDebugData(event.GetReference(), event.GetDebugData().Copy()); } ! wxLuaDebugEvent::wxLuaDebugEvent(int eventType, int lineNumber, const wxString &file, bool enabledFlag) { - SetEventType(eventType); - - m_lineNumber = lineNumber; - m_fileName = file; - m_fHasMessage = false; - m_nReference = -1; - m_fEnabledFlag = enabledFlag; } ! wxLuaDebugEvent::~wxLuaDebugEvent() { } ! void wxLuaDebugEvent::SetMessage(const wxString &pMessage) { m_strMessage = pMessage; --- 32,82 ---- // ---------------------------------------------------------------------------- ! // wxLuaDebuggerEvent // ---------------------------------------------------------------------------- ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_CLIENT_CONNECTED) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_BREAK) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_PRINT) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_ERROR) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_EXIT) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_STACK_ENUM) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_TABLE_ENUM) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_EVALUATE_EXPR) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_STARTDEBUGGER) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_STOPDEBUGGER) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_BREAKPOINT_ADDED) ! DEFINE_EVENT_TYPE(wxEVT_WXLUA_DEBUGGER_BREAKPOINT_REMOVED) ! IMPLEMENT_DYNAMIC_CLASS(wxLuaDebuggerEvent, wxEvent) ! wxLuaDebuggerEvent::wxLuaDebuggerEvent(const wxLuaDebuggerEvent& event) ! :wxEvent(event), ! m_lineNumber(event.m_lineNumber), ! m_fileName(event.m_fileName), ! m_strMessage(event.m_strMessage), ! m_fHasMessage(event.m_fHasMessage), ! m_nReference(event.m_nReference), ! m_fEnabledFlag(event.m_fEnabledFlag) { SetDebugData(event.GetReference(), event.GetDebugData().Copy()); } ! wxLuaDebuggerEvent::wxLuaDebuggerEvent(wxEventType eventType, int lineNumber, const wxString &file, bool enabledFlag) + :wxEvent(0, eventType), + m_lineNumber(lineNumber), + m_fileName(file), + m_fHasMessage(false), + m_nReference(-1), + m_fEnabledFlag(enabledFlag) { } ! wxLuaDebuggerEvent::~wxLuaDebuggerEvent() { } ! void wxLuaDebuggerEvent::SetMessage(const wxString &pMessage) { m_strMessage = pMessage; *************** *** 86,90 **** } ! void wxLuaDebugEvent::SetDebugData(long nReference, const wxLuaDebugData& debugData) { m_nReference = nReference; --- 84,88 ---- } ! void wxLuaDebuggerEvent::SetDebugData(long nReference, const wxLuaDebugData& debugData) { m_nReference = nReference; *************** *** 93,100 **** // ---------------------------------------------------------------------------- ! // wxLuaDebugServerInterface // ---------------------------------------------------------------------------- ! wxLuaDebugServerInterface::wxLuaDebugServerInterface(wxLuaDebugServer* server) :wxLuaInterface(wxNullLuaState) { --- 91,98 ---- // ---------------------------------------------------------------------------- ! // wxLuaDebuggerServerInterface // ---------------------------------------------------------------------------- ! wxLuaDebuggerServerInterface::wxLuaDebuggerServerInterface(wxLuaDebuggerServer* server) :wxLuaInterface(wxNullLuaState) { *************** *** 102,106 **** } ! wxLuaDebugServerInterface::~wxLuaDebugServerInterface() { if (m_pServer != NULL) --- 100,104 ---- } ! wxLuaDebuggerServerInterface::~wxLuaDebuggerServerInterface() { if (m_pServer != NULL) *************** *** 111,115 **** } ! wxLuaDebugData wxLuaDebugServerInterface::EnumerateStack() { m_pServer->EnumerateStack(); --- 109,113 ---- } ! wxLuaDebugData wxLuaDebuggerServerInterface::EnumerateStack() { m_pServer->EnumerateStack(); *************** *** 117,121 **** } ! wxLuaDebugData wxLuaDebugServerInterface::EnumerateStackEntry(int nEntry) { m_pServer->EnumerateStackEntry(nEntry); --- 115,119 ---- } ! wxLuaDebugData wxLuaDebuggerServerInterface::EnumerateStackEntry(int nEntry) { m_pServer->EnumerateStackEntry(nEntry); *************** *** 123,127 **** } ! wxLuaDebugData wxLuaDebugServerInterface::EnumerateTable(int nRef, int nEntry, long data) { m_pServer->EnumerateTable(nRef, nEntry, data); --- 121,125 ---- } ! wxLuaDebugData wxLuaDebuggerServerInterface::EnumerateTable(int nRef, int nEntry, long data) { m_pServer->EnumerateTable(nRef, nEntry, data); *************** *** 129,133 **** } ! wxLuaDebugData wxLuaDebugServerInterface::GetGlobalData() { return wxLuaDebugData(); --- 127,131 ---- } ! wxLuaDebugData wxLuaDebuggerServerInterface::GetGlobalData() { return wxLuaDebugData(); *************** *** 147,151 **** { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_ADD_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) --- 145,149 ---- { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_ADD_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) *************** *** 168,172 **** { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_REMOVE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) --- 166,170 ---- { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_REMOVE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) *************** *** 188,192 **** try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DISABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) --- 186,190 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_DISABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) *************** *** 208,212 **** try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_ENABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) --- 206,210 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_ENABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteInt32(lineNumber)) *************** *** 229,233 **** { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_CLEAR_ALL_BREAKPOINTS)) { return true; --- 227,231 ---- { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_CLEAR_ALL_BREAKPOINTS)) { return true; *************** *** 247,251 **** try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_RUN_BUFFER) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteString(buffer)) --- 245,249 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_RUN_BUFFER) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteString(buffer)) *************** *** 267,271 **** try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_STEP); } catch(wxLuaSocketException &) --- 265,269 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEP); } catch(wxLuaSocketException &) *************** *** 282,286 **** try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOVER); } catch(wxLuaSocketException &) --- 280,284 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEPOVER); } catch(wxLuaSocketException &) *************** *** 297,301 **** try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOUT); } catch(wxLuaSocketException &) --- 295,299 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_DEBUG_STEPOUT); } catch(wxLuaSocketException &) *************** *** 312,316 **** try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_CONTINUE); } catch(wxLuaSocketException &) --- 310,314 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_DEBUG_CONTINUE); } catch(wxLuaSocketException &) *************** *** 327,331 **** try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_BREAK); } catch(wxLuaSocketException &) --- 325,329 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_DEBUG_BREAK); } catch(wxLuaSocketException &) *************** *** 342,346 **** try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_RESET); } catch(wxLuaSocketException &) --- 340,344 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUGGER_CMD_RESET); } catch(wxLuaSocketException &) *************** *** 357,361 **** try { ! return GetSocketBas... [truncated message content] |
From: Francesco M. <fr...@us...> - 2006-09-14 16:31:26
|
Update of /cvsroot/wxlua/wxLua/build/autopackage In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2190/build/autopackage Modified Files: default.apspec.in Log Message: fixed AP to work with wxGTK autopackage Index: default.apspec.in =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autopackage/default.apspec.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** default.apspec.in 12 Mar 2006 13:28:11 -0000 1.11 --- default.apspec.in 14 Sep 2006 16:31:17 -0000 1.12 *************** *** 11,15 **** License: wxWindows license SoftwareVersion: @PACKAGE_VERSION@ ! AutopackageTarget: 1.0 [Description] --- 11,19 ---- License: wxWindows license SoftwareVersion: @PACKAGE_VERSION@ ! Revision: 1 ! PackageVersion: 1 ! AutopackageTarget: 1.2 ! PackageFileName: $SHORTNAME-$SOFTWAREVERSION-$PACKAGEVERSION.x86.package ! Compression: bzip2 [Description] *************** *** 22,26 **** export APBUILD_RESOLVE_LIBPATH=".*lua.*" export APBUILD_STATIC="tiff expat" ! prepareBuild --disable-shared --disable-debug --disable-customwxbind-install [BuildUnprepare] --- 26,30 ---- export APBUILD_RESOLVE_LIBPATH=".*lua.*" export APBUILD_STATIC="tiff expat" ! prepareBuild --disable-shared --disable-debug --disable-customwxbind-install --with-wxdir=/home/frm/work/wxGTK-2.6.3 [BuildUnprepare] *************** *** 33,37 **** [Prepare] # only GTK required: lua, wxWidgets and wxStEdit are statically built in ! require @gtk.org/gtk 2.0 [Install] --- 37,42 ---- [Prepare] # only GTK required: lua, wxWidgets and wxStEdit are statically built in ! ##require @gtk.org/gtk 2.0 # this is checked by GTK ! require @wxwidgets.org/wxgtk 26.0 [Install] |
From: John L. <jr...@us...> - 2006-09-13 04:13:52
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32141/wxLua/modules/wxluasocket/include Modified Files: dservice.h wxldserv.h wxldtarg.h wxlsock.h Log Message: Use GetCount not Count for wxArrays have wxLuaDebugData return the array as a pointer since it may not exist and add checks for it Rename wxLua socket enums so they start with wxLUASOCKET_XXX Removed wxLuaBuffer and just use wxArrayString instead Use wxInt32 wxUint32 for wxLuaSocket code not int, short, etc for 64 bit processors rework all wxLuaSocketBase::Read/Write code Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxldserv.h 7 Sep 2006 22:42:19 -0000 1.12 --- wxldserv.h 13 Sep 2006 04:13:47 -0000 1.13 *************** *** 24,67 **** // ---------------------------------------------------------------------------- ! // wxLuaDebugEvents_Type // ---------------------------------------------------------------------------- ! enum wxLuaDebugEvents_Type { ! wxLUA_EVENT_DEBUG_BREAK, ! wxLUA_EVENT_DEBUG_PRINT, ! wxLUA_EVENT_DEBUG_ERROR, ! wxLUA_EVENT_DEBUG_EXIT, ! wxLUA_EVENT_DEBUG_STACK_ENUM, ! wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM, ! wxLUA_EVENT_DEBUG_TABLE_ENUM, ! wxLUA_EVENT_DEBUG_EVALUATE_EXPR, ! wxLUA_EVENT_DEBUG_BREAKPOINT_ADDED, ! wxLUA_EVENT_DEBUG_BREAKPOINT_REMOVED }; // ---------------------------------------------------------------------------- ! // wxLuaDebugCommands_Type // ---------------------------------------------------------------------------- ! enum wxLuaDebugCommands_Type { ! wxLUA_CMD_ADD_BREAKPOINT, ! wxLUA_CMD_REMOVE_BREAKPOINT, ! wxLUA_CMD_CLEAR_ALL_BREAKPOINTS, ! wxLUA_CMD_RUN_BUFFER, ! wxLUA_CMD_DEBUG_STEP, ! wxLUA_CMD_DEBUG_STEPOVER, ! wxLUA_CMD_DEBUG_STEPOUT, ! wxLUA_CMD_DEBUG_CONTINUE, ! wxLUA_CMD_DEBUG_BREAK, ! wxLUA_CMD_ENUMERATE_STACK, ! wxLUA_CMD_ENUMERATE_STACK_ENTRY, ! wxLUA_CMD_ENUMERATE_TABLE_REF, ! wxLUA_CMD_EVALUATE_EXPR, ! wxLUA_CMD_RESET, ! wxLUA_CMD_CLEAR_DEBUG_REFERENCES, ! wxLUA_CMD_DISABLE_BREAKPOINT, ! wxLUA_CMD_ENABLE_BREAKPOINT }; --- 24,71 ---- // ---------------------------------------------------------------------------- ! // wxLuaScoketDebugEvents_Type // ---------------------------------------------------------------------------- ! enum wxLuaScoketDebugEvents_Type { ! wxLUASOCKET_DEBUG_EVENT_NONE = 0, ! ! wxLUASOCKET_DEBUG_EVENT_BREAK, ! wxLUASOCKET_DEBUG_EVENT_PRINT, ! wxLUASOCKET_DEBUG_EVENT_ERROR, ! wxLUASOCKET_DEBUG_EVENT_EXIT, ! wxLUASOCKET_DEBUG_EVENT_STACK_ENUM, ! wxLUASOCKET_DEBUG_EVENT_STACK_ENTRY_ENUM, ! wxLUASOCKET_DEBUG_EVENT_TABLE_ENUM, ! wxLUASOCKET_DEBUG_EVENT_EVALUATE_EXPR, ! wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_ADDED, ! wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_REMOVED }; // ---------------------------------------------------------------------------- ! // wxLuaSocketDebugCommands_Type // ---------------------------------------------------------------------------- ! enum wxLuaSocketDebugCommands_Type { ! wxLUASOCKET_DEBUG_CMD_NONE = 0, ! ! wxLUASOCKET_DEBUG_CMD_ADD_BREAKPOINT = 100, ! wxLUASOCKET_DEBUG_CMD_REMOVE_BREAKPOINT, ! wxLUASOCKET_DEBUG_CMD_CLEAR_ALL_BREAKPOINTS, ! wxLUASOCKET_DEBUG_CMD_RUN_BUFFER, ! wxLUASOCKET_DEBUG_CMD_DEBUG_STEP, ! wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOVER, ! wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOUT, ! wxLUASOCKET_DEBUG_CMD_DEBUG_CONTINUE, ! wxLUASOCKET_DEBUG_CMD_DEBUG_BREAK, ! wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK, ! wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK_ENTRY, ! wxLUASOCKET_DEBUG_CMD_ENUMERATE_TABLE_REF, ! wxLUASOCKET_DEBUG_CMD_EVALUATE_EXPR, ! wxLUASOCKET_DEBUG_CMD_RESET, ! wxLUASOCKET_DEBUG_CMD_CLEAR_DEBUG_REFERENCES, ! wxLUASOCKET_DEBUG_CMD_DISABLE_BREAKPOINT, ! wxLUASOCKET_DEBUG_CMD_ENABLE_BREAKPOINT }; *************** *** 102,106 **** virtual bool EnableBreakPoint(const wxString &fileName, int lineNumber); virtual bool ClearAllBreakPoints(); ! virtual bool Run(const wxString &fileName, const wxString &buffer); virtual bool Step(); virtual bool StepOver(); --- 106,110 ---- virtual bool EnableBreakPoint(const wxString &fileName, int lineNumber); virtual bool ClearAllBreakPoints(); ! virtual bool Run(const wxString &fileName, const wxString &buffer); virtual bool Step(); virtual bool StepOver(); *************** *** 119,123 **** virtual void NotifyError(const wxString &msg); ! virtual int HandleDebugEvent(wxLuaDebugEvents_Type event_type); virtual wxLuaSocketBase* GetSocketBase() { return NULL; } --- 123,127 ---- virtual void NotifyError(const wxString &msg); ! virtual int HandleDebugEvent(wxLuaScoketDebugEvents_Type event_type); virtual wxLuaSocketBase* GetSocketBase() { return NULL; } *************** *** 133,137 **** class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer : public wxLuaDebuggerBase ! { protected: // ---------------------------------------------------------------------------- --- 137,141 ---- class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer : public wxLuaDebuggerBase ! { protected: // ---------------------------------------------------------------------------- *************** *** 142,148 **** public: LuaThread(wxLuaDebugServer *pServer) : wxThread(wxTHREAD_JOINABLE), ! m_pServer(pServer) {} ! protected: ! virtual void *Entry(); // thread execution starts here virtual void OnExit() {} // called when the thread exits --- 146,152 ---- public: LuaThread(wxLuaDebugServer *pServer) : wxThread(wxTHREAD_JOINABLE), ! m_pServer(pServer) {} ! protected: ! virtual void *Entry(); // thread execution starts here virtual void OnExit() {} // called when the thread exits *************** *** 178,182 **** int m_portNumber; wxProcess *m_pProcess; ! LuaThread *m_pThread; wxLuaStackDialog *m_pStackDialog; bool m_fShutdown; --- 182,186 ---- int m_portNumber; wxProcess *m_pProcess; ! wxLuaDebugServer::LuaThread *m_pThread; wxLuaStackDialog *m_pStackDialog; bool m_fShutdown; Index: wxlsock.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlsock.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxlsock.h 7 Sep 2006 22:42:19 -0000 1.10 --- wxlsock.h 13 Sep 2006 04:13:47 -0000 1.11 *************** *** 56,84 **** virtual bool IsConnected() = 0; ! // Read the whole buffer of size length into buffer buffer from the socket ! virtual int Read(char *buffer, int length) = 0; ! // Write the whole buffer of size length to the socket ! virtual int Write(const char *buffer, int length) = 0; // Read data from the socket, calls virtual int Read(...) unsigned char ReadByte(); ! short ReadWord(); ! unsigned short ReadUWord(); ! int ReadInt(); ! unsigned int ReadUInt(); long ReadLong(); - unsigned long ReadULong(); wxString ReadString(); wxLuaDebugData ReadDebugData(); // Write data to the socket, calls virtual void Write(...) ! bool WriteCharData(const char* data, int length); ! bool WriteByte(unsigned char value); ! bool WriteWord(short value); ! bool WriteUWord(unsigned short value); ! bool WriteInt(int value); ! bool WriteUInt(unsigned int value); bool WriteLong(long value); - bool WriteULong(unsigned long value); bool WriteString(const wxString &value); bool WriteDebugData(const wxLuaDebugData& debugData); --- 56,77 ---- virtual bool IsConnected() = 0; ! // Read the number of bytes length into buffer buffer from the socket ! virtual int Read(char *buffer, wxUint32 length) = 0; ! // Write the whole buffer of number of bytes length to the socket ! virtual int Write(const char *buffer, wxUint32 length) = 0; // Read data from the socket, calls virtual int Read(...) unsigned char ReadByte(); ! wxInt32 ReadInt32(); ! wxUint32 ReadUInt32(); long ReadLong(); wxString ReadString(); wxLuaDebugData ReadDebugData(); // Write data to the socket, calls virtual void Write(...) ! bool WriteByte(char value); ! bool WriteInt32(wxInt32 value); ! bool WriteUInt32(wxUint32 value); bool WriteLong(long value); bool WriteString(const wxString &value); bool WriteDebugData(const wxLuaDebugData& debugData); *************** *** 166,172 **** int GetPort() const; // Read the whole buffer of size length into buffer buffer from the socket ! virtual int Read(char *buffer, int length); // Write the whole buffer of size length to the socket ! virtual int Write(const char *buffer, int length); // Shutdown the socket in an orderly fashion void Shutdown(int how); --- 159,165 ---- int GetPort() const; // Read the whole buffer of size length into buffer buffer from the socket ! virtual int Read(char *buffer, wxUint32 length); // Write the whole buffer of size length to the socket ! virtual int Write(const char *buffer, wxUint32 length); // Shutdown the socket in an orderly fashion void Shutdown(int how); Index: wxldtarg.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldtarg.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxldtarg.h 7 Sep 2006 22:42:19 -0000 1.14 --- wxldtarg.h 13 Sep 2006 04:13:47 -0000 1.15 *************** *** 15,19 **** #endif - #include "wx/dynarray.h" #include "wxluasocket/include/wxluasocketdefs.h" #include "wxlua/include/wxlua.h" --- 15,18 ---- *************** *** 22,52 **** // ---------------------------------------------------------------------------- - // wxLuaBuffer - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUASOCKET wxLuaBuffer : public wxObject - { - public: - wxLuaBuffer(const wxString &fileName, const wxString &buffer) - : m_fileName(fileName), m_buffer(buffer) {} - - wxString GetBuffer() const { return m_buffer; } - wxString GetFileName() const { return m_fileName; } - int GetBufferLength() const { return m_buffer.Length(); } - - private: - wxString m_fileName; - wxString m_buffer; - DECLARE_ABSTRACT_CLASS(wxLuaBuffer) - }; - - - #if wxCHECK_VERSION(2, 5, 0) - WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxLuaBuffer *, wxLuaBufferArray, class WXDLLIMPEXP_WXLUASOCKET); - #else - WX_DEFINE_ARRAY(wxLuaBuffer *, wxLuaBufferArray); - #endif // !wxCHECK_VERSION(2, 5, 0) - - // ---------------------------------------------------------------------------- // wxLuaDebugTarget - a C++ socket target that the wxLuaDebugServer run in lua // communicates with. Handles the Debugger/Debuggee IO --- 21,24 ---- *************** *** 64,68 **** LuaThread(wxLuaDebugTarget *pTarget) : wxThread(wxTHREAD_JOINABLE), m_pTarget(pTarget) {} ! protected: virtual void *Entry(); // thread execution starts here virtual void OnExit() {} // called when the thread exits --- 36,40 ---- LuaThread(wxLuaDebugTarget *pTarget) : wxThread(wxTHREAD_JOINABLE), m_pTarget(pTarget) {} ! protected: virtual void *Entry(); // thread execution starts here virtual void OnExit() {} // called when the thread exits *************** *** 105,113 **** bool m_fRunning; bool m_fStopped; bool m_fErrorsSeen; int m_nFramesUntilBreak; wxMutex m_runMutex; wxCondition m_runCondition; ! wxLuaBufferArray m_bufferList; LuaThread *m_pThread; wxArrayInt m_references; --- 77,86 ---- bool m_fRunning; bool m_fStopped; + bool m_fExiting; bool m_fErrorsSeen; int m_nFramesUntilBreak; wxMutex m_runMutex; wxCondition m_runCondition; ! wxArrayString m_bufferArray; LuaThread *m_pThread; wxArrayInt m_references; *************** *** 116,119 **** --- 89,93 ---- mutable wxCriticalSection m_breakPointListCriticalSection; + wxString CreateBreakPoint(const wxString &fileName, int lineNumber) const; bool AddBreakPoint(const wxString &fileName, int lineNumber); Index: dservice.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/dservice.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** dservice.h 7 Sep 2006 22:42:19 -0000 1.15 --- dservice.h 13 Sep 2006 04:13:47 -0000 1.16 *************** *** 78,84 **** // Read the whole buffer of size length into buffer buffer from the socket ! virtual int Read(char *buffer, int length); // Write the whole buffer of size length to the socket ! virtual int Write(const char *buffer, int length); // operators --- 78,84 ---- // Read the whole buffer of size length into buffer buffer from the socket ! virtual int Read(char *buffer, wxUint32 length); // Write the whole buffer of size length to the socket ! virtual int Write(const char *buffer, wxUint32 length); // operators |
From: John L. <jr...@us...> - 2006-09-13 04:13:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32141/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: Use GetCount not Count for wxArrays have wxLuaDebugData return the array as a pointer since it may not exist and add checks for it Rename wxLua socket enums so they start with wxLUASOCKET_XXX Removed wxLuaBuffer and just use wxArrayString instead Use wxInt32 wxUint32 for wxLuaSocket code not int, short, etc for 64 bit processors rework all wxLuaSocketBase::Read/Write code Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxldebug.cpp 8 Sep 2006 22:43:47 -0000 1.18 --- wxldebug.cpp 13 Sep 2006 04:13:47 -0000 1.19 *************** *** 45,57 **** } ! wxLuaDebugDataItem::wxLuaDebugDataItem(const wxLuaDebugDataItem &treeItem) { ! m_itemName = treeItem.m_itemName; ! m_itemType = treeItem.m_itemType; ! m_itemValue = treeItem.m_itemValue; ! m_itemSource = treeItem.m_itemSource; ! m_nReference = treeItem.m_nReference; ! m_nIndex = treeItem.m_nIndex; ! m_fExpanded = treeItem.m_fExpanded; } --- 45,57 ---- } ! wxLuaDebugDataItem::wxLuaDebugDataItem(const wxLuaDebugDataItem &dataItem) { ! m_itemName = dataItem.m_itemName; ! m_itemType = dataItem.m_itemType; ! m_itemValue = dataItem.m_itemValue; ! m_itemSource = dataItem.m_itemSource; ! m_nReference = dataItem.m_nReference; ! m_nIndex = dataItem.m_nIndex; ! m_fExpanded = dataItem.m_fExpanded; } *************** *** 66,70 **** ~wxLuaDebugDataRefData() { ! size_t idx, count = m_dataArray.Count(); for (idx = 0; idx < count; ++idx) { --- 66,70 ---- ~wxLuaDebugDataRefData() { ! size_t idx, count = m_dataArray.GetCount(); for (idx = 0; idx < count; ++idx) { *************** *** 84,94 **** } ! wxLuaDebugDataItemArray& wxLuaDebugData::GetArray() { ! return ((wxLuaDebugDataRefData*)m_refData)->m_dataArray; } ! const wxLuaDebugDataItemArray& wxLuaDebugData::GetArray() const { ! return M_DEBUGREFDATA->m_dataArray; } --- 84,96 ---- } ! wxLuaDebugDataItemArray* wxLuaDebugData::GetArray() { ! wxCHECK_MSG(M_DEBUGREFDATA != NULL, NULL, wxT("Invalid ref data")); ! return &(M_DEBUGREFDATA->m_dataArray); } ! const wxLuaDebugDataItemArray* wxLuaDebugData::GetArray() const { ! wxCHECK_MSG(M_DEBUGREFDATA != NULL, NULL, wxT("Invalid ref data")); ! return &(M_DEBUGREFDATA->m_dataArray); } *************** *** 100,104 **** wxLuaDebugDataItem* wxLuaDebugData::Item(size_t index) const { ! wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); return M_DEBUGREFDATA->m_dataArray.Item(index); } --- 102,106 ---- wxLuaDebugDataItem* wxLuaDebugData::Item(size_t index) const { ! wxCHECK_MSG(M_DEBUGREFDATA != NULL, NULL, wxT("Invalid ref data")); return M_DEBUGREFDATA->m_dataArray.Item(index); } *************** *** 113,116 **** --- 115,119 ---- { wxLuaDebugData copyData; + wxCHECK_MSG(M_DEBUGREFDATA != NULL, copyData, wxT("Invalid ref data")); size_t idx, count = GetCount(); *************** *** 133,136 **** --- 136,140 ---- { wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); + wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); wxLuaState wxlState(wxlState_); // unconst the state *************** *** 182,185 **** --- 186,190 ---- { wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); + wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); wxLuaState wxlState(wxlState_); // unconst the state *************** *** 228,231 **** --- 233,238 ---- { wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); + wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); + wxLuaState wxlState(wxlState_); // unconst the state lua_State* L = wxlState.GetLuaState(); |
From: John L. <jr...@us...> - 2006-09-13 04:13:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32141/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Use GetCount not Count for wxArrays have wxLuaDebugData return the array as a pointer since it may not exist and add checks for it Rename wxLua socket enums so they start with wxLUASOCKET_XXX Removed wxLuaBuffer and just use wxArrayString instead Use wxInt32 wxUint32 for wxLuaSocket code not int, short, etc for 64 bit processors rework all wxLuaSocketBase::Read/Write code Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** wxlstate.cpp 4 Sep 2006 17:54:01 -0000 1.75 --- wxlstate.cpp 13 Sep 2006 04:13:46 -0000 1.76 *************** *** 845,849 **** lua_newtable(L); ! size_t idx, count = strArray.Count(); for (idx = 0; idx < count; ++idx) { --- 845,849 ---- lua_newtable(L); ! size_t idx, count = strArray.GetCount(); for (idx = 0; idx < count; ++idx) { *************** *** 858,862 **** lua_newtable(L); ! size_t idx, count = intArray.Count(); for (idx = 0; idx < count; ++idx) { --- 858,862 ---- lua_newtable(L); ! size_t idx, count = intArray.GetCount(); for (idx = 0; idx < count; ++idx) { Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wxlbind.cpp 28 Aug 2006 05:26:20 -0000 1.38 --- wxlbind.cpp 13 Sep 2006 04:13:46 -0000 1.39 *************** *** 129,133 **** lua_newtable(L); ! size_t idx, count = m_arrayInt.Count(); for (idx = 0; idx < count; ++idx) { --- 129,133 ---- lua_newtable(L); ! size_t idx, count = m_arrayInt.GetCount(); for (idx = 0; idx < count; ++idx) { |
From: John L. <jr...@us...> - 2006-09-13 04:13:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32141/wxLua/modules/wxluadebug/include Modified Files: wxldebug.h Log Message: Use GetCount not Count for wxArrays have wxLuaDebugData return the array as a pointer since it may not exist and add checks for it Rename wxLua socket enums so they start with wxLUASOCKET_XXX Removed wxLuaBuffer and just use wxArrayString instead Use wxInt32 wxUint32 for wxLuaSocket code not int, short, etc for 64 bit processors rework all wxLuaSocketBase::Read/Write code Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxldebug.h 8 Sep 2006 22:43:46 -0000 1.22 --- wxldebug.h 13 Sep 2006 04:13:47 -0000 1.23 *************** *** 84,90 **** wxLuaDebugData(const wxLuaDebugData &debugData) { Ref(debugData); } // Get the data array ! wxLuaDebugDataItemArray& GetArray(); ! const wxLuaDebugDataItemArray& GetArray() const; // wxArray functions mapped to the internal array w/ error checking --- 84,92 ---- wxLuaDebugData(const wxLuaDebugData &debugData) { Ref(debugData); } + virtual ~wxLuaDebugData() {} + // Get the data array ! wxLuaDebugDataItemArray* GetArray(); ! const wxLuaDebugDataItemArray* GetArray() const; // wxArray functions mapped to the internal array w/ error checking |
From: John L. <jr...@us...> - 2006-09-13 04:13:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32141/wxLua/modules/wxluasocket/src Modified Files: dservice.cpp wxldserv.cpp wxldtarg.cpp wxlsock.cpp Log Message: Use GetCount not Count for wxArrays have wxLuaDebugData return the array as a pointer since it may not exist and add checks for it Rename wxLua socket enums so they start with wxLUASOCKET_XXX Removed wxLuaBuffer and just use wxArrayString instead Use wxInt32 wxUint32 for wxLuaSocket code not int, short, etc for 64 bit processors rework all wxLuaSocketBase::Read/Write code Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxldtarg.cpp 7 Sep 2006 22:42:19 -0000 1.19 --- wxldtarg.cpp 13 Sep 2006 04:13:48 -0000 1.20 *************** *** 34,44 **** // ---------------------------------------------------------------------------- ! // wxLuaBuffer ! // ---------------------------------------------------------------------------- ! ! IMPLEMENT_ABSTRACT_CLASS(wxLuaBuffer, wxObject) ! ! // ---------------------------------------------------------------------------- ! // wxLuaDebugTarget::LuaThread // ---------------------------------------------------------------------------- --- 34,38 ---- // ---------------------------------------------------------------------------- ! // wxLuaDebugTarget::LuaThread // ---------------------------------------------------------------------------- *************** *** 65,68 **** --- 59,63 ---- m_fRunning(false), m_fStopped(false), + m_fExiting(false), m_fErrorsSeen(false), m_nFramesUntilBreak(0), *************** *** 109,112 **** --- 104,109 ---- bool wxLuaDebugTarget::Run() { + wxCHECK_MSG(m_pThread == NULL, false, wxT("wxLuaDebugTarget::Run already called")); + // Assume something is going to go wrong m_fErrorsSeen = true; *************** *** 131,146 **** m_fErrorsSeen = false; ! size_t idx, count = m_bufferList.Count(); for (idx = 0; idx < count; ++idx) { int rc = LUA_ERRERR; ! const wxLuaBuffer *item = m_bufferList.Item(idx); ! ! rc = m_wxlState.LuaDoBuffer(wx2lua(item->GetBuffer()), ! item->GetBufferLength(), ! wx2lua(item->GetFileName())); ! delete item; wxString errorMsg; --- 128,142 ---- m_fErrorsSeen = false; ! size_t idx, count = m_bufferArray.GetCount(); for (idx = 0; idx < count; ++idx) { int rc = LUA_ERRERR; ! wxString luaBuffer = m_bufferArray.Item(idx); ! wxString bufFilename = luaBuffer.BeforeFirst(wxT('\0')); ! wxString buf = luaBuffer.AfterFirst(wxT('\0')); ! rc = m_wxlState.LuaDoBuffer(wx2lua(buf), buf.Length(), ! wx2lua(bufFilename)); wxString errorMsg; *************** *** 149,155 **** --- 145,154 ---- { NotifyError(errorMsg); + m_bufferArray.Clear(); break; } } + + m_bufferArray.Clear(); } } *************** *** 176,214 **** m_clientSocket.Connect(m_serverName, m_portNumber); ! m_fConnected = true; fThreadRunning = true; } ! catch(...) { } ! while (fThreadRunning && !m_pThread->TestDestroy()) { try { ! wxLuaDebugCommands_Type debugCommand = (wxLuaDebugCommands_Type)m_clientSocket.ReadByte(); switch (debugCommand) { ! case wxLUA_CMD_ADD_BREAKPOINT: { wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); AddBreakPoint(fileName, lineNumber); break; } ! case wxLUA_CMD_REMOVE_BREAKPOINT: { wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); RemoveBreakPoint(fileName, lineNumber); break; } ! case wxLUA_CMD_CLEAR_ALL_BREAKPOINTS: ClearAllBreakPoints(); break; ! ! case wxLUA_CMD_RUN_BUFFER: { wxString fileName = m_clientSocket.ReadString(); --- 175,219 ---- m_clientSocket.Connect(m_serverName, m_portNumber); ! m_fConnected = true; fThreadRunning = true; } ! catch(wxLuaSocketException &) { } ! while (fThreadRunning && !m_pThread->TestDestroy() && !m_resetRequested && !m_fExiting) { try { ! wxLuaSocketDebugCommands_Type debugCommand = (wxLuaSocketDebugCommands_Type)m_clientSocket.ReadByte(); switch (debugCommand) { ! case wxLUASOCKET_DEBUG_CMD_NONE : ! { ! // This is an error, but maybe we can continue? ! break; ! } ! case wxLUASOCKET_DEBUG_CMD_ADD_BREAKPOINT: { wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt32(); AddBreakPoint(fileName, lineNumber); break; } ! case wxLUASOCKET_DEBUG_CMD_REMOVE_BREAKPOINT: { wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt32(); RemoveBreakPoint(fileName, lineNumber); break; } ! case wxLUASOCKET_DEBUG_CMD_CLEAR_ALL_BREAKPOINTS: ! { ClearAllBreakPoints(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_RUN_BUFFER: { wxString fileName = m_clientSocket.ReadString(); *************** *** 218,271 **** break; } ! case wxLUA_CMD_DEBUG_STEP: Step(); break; ! ! case wxLUA_CMD_DEBUG_STEPOVER: StepOver(); break; ! ! case wxLUA_CMD_DEBUG_STEPOUT: StepOut(); break; ! ! case wxLUA_CMD_DEBUG_CONTINUE: Continue(); break; ! ! case wxLUA_CMD_DEBUG_BREAK: Break(); break; ! ! case wxLUA_CMD_ENUMERATE_STACK: EnumerateStack(); break; ! ! case wxLUA_CMD_ENUMERATE_STACK_ENTRY: { ! int stackRef = m_clientSocket.ReadInt(); EnumerateStackEntry(stackRef); break; } ! case wxLUA_CMD_ENUMERATE_TABLE_REF: { ! int tableRef = m_clientSocket.ReadInt(); ! int index = m_clientSocket.ReadInt(); long itemNode = m_clientSocket.ReadLong(); EnumerateTable(tableRef, index, itemNode); break; } ! case wxLUA_CMD_RESET: Reset(); break; ! ! case wxLUA_CMD_EVALUATE_EXPR: { ! int exprRef = m_clientSocket.ReadInt(); wxString buffer = m_clientSocket.ReadString(); EvaluateExpr(exprRef, buffer); break; } ! case wxLUA_CMD_CLEAR_DEBUG_REFERENCES: { size_t idx, idxMax = m_references.GetCount(); --- 223,283 ---- break; } ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEP: ! { Step(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOVER: ! { StepOver(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOUT: ! { StepOut(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_DEBUG_CONTINUE: ! { Continue(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_DEBUG_BREAK: ! { Break(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK: ! { EnumerateStack(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK_ENTRY: { ! int stackRef = m_clientSocket.ReadInt32(); EnumerateStackEntry(stackRef); break; } ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_TABLE_REF: { ! int tableRef = m_clientSocket.ReadInt32(); ! int index = m_clientSocket.ReadInt32(); long itemNode = m_clientSocket.ReadLong(); EnumerateTable(tableRef, index, itemNode); break; } ! case wxLUASOCKET_DEBUG_CMD_RESET: ! { Reset(); break; ! } ! case wxLUASOCKET_DEBUG_CMD_EVALUATE_EXPR: { ! int exprRef = m_clientSocket.ReadInt32(); wxString buffer = m_clientSocket.ReadString(); EvaluateExpr(exprRef, buffer); break; } ! case wxLUASOCKET_DEBUG_CMD_CLEAR_DEBUG_REFERENCES: { size_t idx, idxMax = m_references.GetCount(); *************** *** 275,283 **** m_wxlState.tremove(iItem); } break; } ! case wxLUA_CMD_DISABLE_BREAKPOINT: break; ! case wxLUA_CMD_ENABLE_BREAKPOINT: break; } --- 287,296 ---- m_wxlState.tremove(iItem); } + // FIXME - should we also remove the array items break; } ! case wxLUASOCKET_DEBUG_CMD_DISABLE_BREAKPOINT: break; ! case wxLUASOCKET_DEBUG_CMD_ENABLE_BREAKPOINT: break; } *************** *** 290,297 **** } bool wxLuaDebugTarget::AddBreakPoint(const wxString &fileName, int lineNumber) { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! m_breakPointList.Add(wxString::Format(wxT("%u:"), lineNumber) + fileName); return false; } --- 303,315 ---- } + wxString wxLuaDebugTarget::CreateBreakPoint(const wxString &fileName, int lineNumber) const + { + return wxString::Format(wxT("%u:"), lineNumber) + fileName; + } + bool wxLuaDebugTarget::AddBreakPoint(const wxString &fileName, int lineNumber) { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! m_breakPointList.Add(CreateBreakPoint(fileName, lineNumber)); return false; } *************** *** 300,304 **** { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! m_breakPointList.Remove(wxString::Format(wxT("%u:"), lineNumber) + fileName); return true; } --- 318,322 ---- { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! m_breakPointList.Remove(CreateBreakPoint(fileName, lineNumber)); return true; } *************** *** 313,324 **** bool wxLuaDebugTarget::Run(const wxString &fileName, const wxString &buffer) { ! wxLuaBuffer *pBuffer = new wxLuaBuffer(fileName, buffer); ! ! if (pBuffer != NULL) ! { ! m_bufferList.Add(pBuffer); ! return true; ! } ! return false; } --- 331,336 ---- bool wxLuaDebugTarget::Run(const wxString &fileName, const wxString &buffer) { ! m_bufferArray.Add(fileName + wxT('\0') + buffer); ! return true; } *************** *** 567,575 **** bool wxLuaDebugTarget::NotifyBreak(const wxString &fileName, int lineNumber) { ! if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_BREAK); m_clientSocket.WriteString(fileName); ! m_clientSocket.WriteInt(lineNumber); return true; } --- 579,587 ---- bool wxLuaDebugTarget::NotifyBreak(const wxString &fileName, int lineNumber) { ! if (WaitForConnect() && !m_resetRequested) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_BREAK); m_clientSocket.WriteString(fileName); ! m_clientSocket.WriteInt32(lineNumber); return true; } *************** *** 581,585 **** if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_PRINT); m_clientSocket.WriteString(errorMsg); return true; --- 593,597 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_PRINT); m_clientSocket.WriteString(errorMsg); return true; *************** *** 592,596 **** if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_ERROR); m_clientSocket.WriteString(errorMsg); return true; --- 604,608 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_ERROR); m_clientSocket.WriteString(errorMsg); return true; *************** *** 607,611 **** if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_EXIT); return true; } --- 619,623 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_EXIT); return true; } *************** *** 617,621 **** if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); m_clientSocket.WriteDebugData(debugData); return true; --- 629,633 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_STACK_ENUM); m_clientSocket.WriteDebugData(debugData); return true; *************** *** 630,635 **** if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); ! m_clientSocket.WriteInt(entryRef); m_clientSocket.WriteDebugData(debugData); return true; --- 642,647 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_STACK_ENTRY_ENUM); ! m_clientSocket.WriteInt32(entryRef); m_clientSocket.WriteDebugData(debugData); return true; *************** *** 644,648 **** if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); m_clientSocket.WriteLong(itemNode); m_clientSocket.WriteDebugData(debugData); --- 656,660 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_TABLE_ENUM); m_clientSocket.WriteLong(itemNode); m_clientSocket.WriteDebugData(debugData); *************** *** 658,663 **** if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_EVALUATE_EXPR); ! m_clientSocket.WriteInt(exprRef); m_clientSocket.WriteString(strResult); return true; --- 670,675 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUASOCKET_DEBUG_EVENT_EVALUATE_EXPR); ! m_clientSocket.WriteInt32(exprRef); m_clientSocket.WriteString(strResult); return true; *************** *** 679,695 **** bool fWait = false; m_fStopped = true; if (m_forceBreak) { if (m_resetRequested) { NotifyExit(); wxExit(); } ! int lineNumber = 0; ! wxString fileName = GetDebugInfo(lineNumber); ! if (NotifyBreak(fileName, lineNumber)) ! fWait = true; } else --- 691,713 ---- bool fWait = false; m_fStopped = true; + if (m_forceBreak) { if (m_resetRequested) { + fWait = true; + m_fExiting = true; NotifyExit(); wxExit(); } ! if (!m_fExiting) ! { ! int lineNumber = 0; ! wxString fileName = GetDebugInfo(lineNumber); ! if (NotifyBreak(fileName, lineNumber)) ! fWait = true; ! } } else *************** *** 770,782 **** } ! bool wxLuaDebugTarget::AtBreakPoint(const wxString &fileName, ! int lineNumber) const { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! ! wxString breakPoint; ! breakPoint = breakPoint.Format(wxT("%u:"), lineNumber) + fileName; ! ! return (m_breakPointList.Index(breakPoint) != wxNOT_FOUND); } --- 788,795 ---- } ! bool wxLuaDebugTarget::AtBreakPoint(const wxString &fileName, int lineNumber) const { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! return (m_breakPointList.Index(CreateBreakPoint(fileName, lineNumber)) != wxNOT_FOUND); } Index: dservice.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/dservice.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** dservice.cpp 7 Sep 2006 22:42:19 -0000 1.20 --- dservice.cpp 13 Sep 2006 04:13:48 -0000 1.21 *************** *** 68,82 **** // ---------------------------------------------------------------------------- ! int wxLuaDebugSocket::Read(char *buffer, int length) { wxCHECK_MSG(m_socket, 0, wxT("Invalid wxSocketBase")); ! m_socket->Read(buffer, (wxUint32)length); return m_socket->LastCount(); } ! int wxLuaDebugSocket::Write(const char *buffer, int length) { wxCHECK_MSG(m_socket, 0, wxT("Invalid wxSocketBase")); ! m_socket->Write(buffer, (wxUint32)length); return m_socket->LastCount(); } --- 68,82 ---- // ---------------------------------------------------------------------------- ! int wxLuaDebugSocket::Read(char *buffer, wxUint32 length) { wxCHECK_MSG(m_socket, 0, wxT("Invalid wxSocketBase")); ! m_socket->Read(buffer, length); return m_socket->LastCount(); } ! int wxLuaDebugSocket::Write(const char *buffer, wxUint32 length) { wxCHECK_MSG(m_socket, 0, wxT("Invalid wxSocketBase")); ! m_socket->Write(buffer, length); return m_socket->LastCount(); } *************** *** 226,236 **** if (debugSocket && debuggee) { ! wxLuaDebugCommands_Type debugCommand = (wxLuaDebugCommands_Type)debugSocket->ReadByte(); switch(debugCommand) { ! case wxLUA_CMD_ADD_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt(); debuggee->AddBreakPoint(fileName, lineNumber); --- 226,240 ---- if (debugSocket && debuggee) { ! wxLuaSocketDebugCommands_Type debugCommand = (wxLuaSocketDebugCommands_Type)debugSocket->ReadByte(); switch(debugCommand) { ! case wxLUASOCKET_DEBUG_CMD_NONE : ! { ! break; ! } ! case wxLUASOCKET_DEBUG_CMD_ADD_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); debuggee->AddBreakPoint(fileName, lineNumber); *************** *** 238,245 **** break; ! case wxLUA_CMD_REMOVE_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt(); debuggee->RemoveBreakPoint(fileName, lineNumber); --- 242,249 ---- break; ! case wxLUASOCKET_DEBUG_CMD_REMOVE_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); debuggee->RemoveBreakPoint(fileName, lineNumber); *************** *** 247,254 **** break; ! case wxLUA_CMD_DISABLE_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt(); debuggee->DisableBreakPoint(fileName, lineNumber); --- 251,258 ---- break; ! case wxLUASOCKET_DEBUG_CMD_DISABLE_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); debuggee->DisableBreakPoint(fileName, lineNumber); *************** *** 257,264 **** ! case wxLUA_CMD_ENABLE_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt(); debuggee->EnableBreakPoint(fileName, lineNumber); --- 261,268 ---- ! case wxLUASOCKET_DEBUG_CMD_ENABLE_BREAKPOINT: { wxString fileName = debugSocket->ReadString(); ! int lineNumber = debugSocket->ReadInt32(); debuggee->EnableBreakPoint(fileName, lineNumber); *************** *** 266,308 **** break; ! case wxLUA_CMD_CLEAR_ALL_BREAKPOINTS: debuggee->ClearAllBreakPoints(); break; ! case wxLUA_CMD_DEBUG_STEP: debuggee->Step(); break; ! case wxLUA_CMD_DEBUG_STEPOVER: debuggee->StepOver(); break; ! case wxLUA_CMD_DEBUG_STEPOUT: debuggee->StepOut(); break; ! case wxLUA_CMD_DEBUG_CONTINUE: debuggee->Continue(); break; ! case wxLUA_CMD_DEBUG_BREAK: debuggee->Break(); break; ! case wxLUA_CMD_ENUMERATE_STACK: debuggee->EnumerateStack(); break; ! case wxLUA_CMD_ENUMERATE_STACK_ENTRY: { ! int stackRef = debugSocket->ReadInt(); debuggee->EnumerateStackEntry(stackRef); } break; ! case wxLUA_CMD_ENUMERATE_TABLE_REF: { ! int tableRef = debugSocket->ReadInt(); ! int index = debugSocket->ReadInt(); long itemNode = debugSocket->ReadLong(); debuggee->EnumerateTable(tableRef, index, itemNode); --- 270,312 ---- break; ! case wxLUASOCKET_DEBUG_CMD_CLEAR_ALL_BREAKPOINTS: debuggee->ClearAllBreakPoints(); break; ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEP: debuggee->Step(); break; ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOVER: debuggee->StepOver(); break; ! case wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOUT: debuggee->StepOut(); break; ! case wxLUASOCKET_DEBUG_CMD_DEBUG_CONTINUE: debuggee->Continue(); break; ! case wxLUASOCKET_DEBUG_CMD_DEBUG_BREAK: debuggee->Break(); break; ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK: debuggee->EnumerateStack(); break; ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK_ENTRY: { ! int stackRef = debugSocket->ReadInt32(); debuggee->EnumerateStackEntry(stackRef); } break; ! case wxLUASOCKET_DEBUG_CMD_ENUMERATE_TABLE_REF: { ! int tableRef = debugSocket->ReadInt32(); ! int index = debugSocket->ReadInt32(); long itemNode = debugSocket->ReadLong(); debuggee->EnumerateTable(tableRef, index, itemNode); *************** *** 310,320 **** break; ! case wxLUA_CMD_RESET: debuggee->Reset(); break; ! case wxLUA_CMD_EVALUATE_EXPR: { ! int exprRef = debugSocket->ReadInt(); wxString buffer = debugSocket->ReadString(); debuggee->EvaluateExpr(exprRef, buffer); --- 314,324 ---- break; ! case wxLUASOCKET_DEBUG_CMD_RESET: debuggee->Reset(); break; ! case wxLUASOCKET_DEBUG_CMD_EVALUATE_EXPR: { ! int exprRef = debugSocket->ReadInt32(); wxString buffer = debugSocket->ReadString(); debuggee->EvaluateExpr(exprRef, buffer); *************** *** 322,331 **** break; ! case wxLUA_CMD_CLEAR_DEBUG_REFERENCES: { debuggee->ClearReferences(); } break; ! case wxLUA_CMD_RUN_BUFFER: break; // FIXME - not impemented } } --- 326,335 ---- break; ! case wxLUASOCKET_DEBUG_CMD_CLEAR_DEBUG_REFERENCES: { debuggee->ClearReferences(); } break; ! case wxLUASOCKET_DEBUG_CMD_RUN_BUFFER: break; // FIXME - not impemented } } *************** *** 450,454 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_BREAK); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(fileName.GetFullPath()); --- 454,458 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_BREAK); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(fileName.GetFullPath()); *************** *** 456,460 **** dSocket->WriteString(fileName); #endif ! dSocket->WriteInt(lineNumber); if (!dSocket->Error()) --- 460,464 ---- dSocket->WriteString(fileName); #endif ! dSocket->WriteInt32(lineNumber); if (!dSocket->Error()) *************** *** 476,480 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_ERROR); dSocket->WriteString(errorMsg); --- 480,484 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_ERROR); dSocket->WriteString(errorMsg); *************** *** 497,501 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_ERROR); dSocket->WriteString(errorMsg); --- 501,505 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_ERROR); dSocket->WriteString(errorMsg); *************** *** 518,522 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_EXIT); if (!dSocket->Error()) --- 522,526 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_EXIT); if (!dSocket->Error()) *************** *** 538,542 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); dSocket->WriteDebugData(debugData); --- 542,546 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_STACK_ENUM); dSocket->WriteDebugData(debugData); *************** *** 559,564 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); ! dSocket->WriteInt(entryRef); dSocket->WriteDebugData(debugData); --- 563,568 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_STACK_ENTRY_ENUM); ! dSocket->WriteInt32(entryRef); dSocket->WriteDebugData(debugData); *************** *** 581,585 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); dSocket->WriteLong(itemNode); dSocket->WriteDebugData(debugData); --- 585,589 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_TABLE_ENUM); dSocket->WriteLong(itemNode); dSocket->WriteDebugData(debugData); *************** *** 603,608 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_EVALUATE_EXPR); ! dSocket->WriteInt(exprRef); dSocket->WriteString(strResult); --- 607,612 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_EVALUATE_EXPR); ! dSocket->WriteInt32(exprRef); dSocket->WriteString(strResult); *************** *** 627,631 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_BREAKPOINT_ADDED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); --- 631,635 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_ADDED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); *************** *** 633,638 **** dSocket->WriteString(breakPoint.GetFileName()); #endif ! dSocket->WriteInt(breakPoint.GetLine()); ! dSocket->WriteInt((int)breakPoint.GetEnabled()); if (!dSocket->Error()) --- 637,642 ---- dSocket->WriteString(breakPoint.GetFileName()); #endif ! dSocket->WriteInt32(breakPoint.GetLine()); ! dSocket->WriteInt32((int)breakPoint.GetEnabled()); if (!dSocket->Error()) *************** *** 657,661 **** { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_BREAKPOINT_REMOVED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); --- 661,665 ---- { wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_REMOVED); #if wxCHECK_VERSION(2,3,0) dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); *************** *** 663,668 **** dSocket->WriteString(breakPoint.GetFileName()); #endif ! dSocket->WriteInt(breakPoint.GetLine()); ! dSocket->WriteInt((int)breakPoint.GetEnabled()); if (!dSocket->Error()) --- 667,672 ---- dSocket->WriteString(breakPoint.GetFileName()); #endif ! dSocket->WriteInt32(breakPoint.GetLine()); ! dSocket->WriteInt32((int)breakPoint.GetEnabled()); if (!dSocket->Error()) *************** *** 766,770 **** // Events from Debug Service int debuggeeEvent = m_debuggerSocket->ReadByte(); ! HandleDebugEvent((wxLuaDebugEvents_Type) debuggeeEvent); // Enable input events again. --- 770,774 ---- // Events from Debug Service int debuggeeEvent = m_debuggerSocket->ReadByte(); ! HandleDebugEvent((wxLuaScoketDebugEvents_Type) debuggeeEvent); // Enable input events again. Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxldserv.cpp 7 Sep 2006 22:42:19 -0000 1.18 --- wxldserv.cpp 13 Sep 2006 04:13:48 -0000 1.19 *************** *** 25,32 **** #include "wxluasocket/include/wxldserv.h" #include "wxluasocket/include/wxlhandl.h" ! ! #if wxCHECK_VERSION(2, 3, 0) ! #include "wxluadebug/include/staktree.h" ! #endif // wxCHECK_VERSION(2, 3, 0) #if !wxCHECK_VERSION(2, 6, 0) --- 25,29 ---- #include "wxluasocket/include/wxldserv.h" #include "wxluasocket/include/wxlhandl.h" ! #include "wxluadebug/include/staktree.h" #if !wxCHECK_VERSION(2, 6, 0) *************** *** 150,161 **** { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUA_CMD_ADD_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt(lineNumber)) { return true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 147,158 ---- { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_ADD_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt32(lineNumber)) { return true; } } ! catch(wxLuaSocketException &) { } *************** *** 171,182 **** { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUA_CMD_REMOVE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt(lineNumber)) { return true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 168,179 ---- { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_REMOVE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt32(lineNumber)) { return true; } } ! catch(wxLuaSocketException &) { } *************** *** 191,202 **** try { ! if (GetSocketBase()->WriteByte(wxLUA_CMD_DISABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt(lineNumber)) { return true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 188,199 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DISABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt32(lineNumber)) { return true; } } ! catch(wxLuaSocketException &) { } *************** *** 211,222 **** try { ! if (GetSocketBase()->WriteByte(wxLUA_CMD_ENABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt(lineNumber)) { return true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 208,219 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_ENABLE_BREAKPOINT) && GetSocketBase()->WriteString(fileName) && ! GetSocketBase()->WriteInt32(lineNumber)) { return true; } } ! catch(wxLuaSocketException &) { } *************** *** 232,241 **** { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUA_CMD_CLEAR_ALL_BREAKPOINTS)) { return true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 229,238 ---- { if (GetSocketBase()->IsConnected() && ! GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_CLEAR_ALL_BREAKPOINTS)) { return true; } } ! catch(wxLuaSocketException &) { } *************** *** 250,254 **** try { ! if (GetSocketBase()->WriteByte(wxLUA_CMD_RUN_BUFFER) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteString(buffer)) --- 247,251 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_RUN_BUFFER) && GetSocketBase()->WriteString(fileName) && GetSocketBase()->WriteString(buffer)) *************** *** 257,261 **** } } ! catch(wxLuaSocketException & /*e*/) { } --- 254,258 ---- } } ! catch(wxLuaSocketException &) { } *************** *** 270,276 **** try { ! return GetSocketBase()->WriteByte(wxLUA_CMD_DEBUG_STEP); } ! catch(wxLuaSocketException & /*e*/) { } --- 267,273 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_STEP); } ! catch(wxLuaSocketException &) { } *************** *** 285,291 **** try { ! return GetSocketBase()->WriteByte(wxLUA_CMD_DEBUG_STEPOVER); } ! catch(wxLuaSocketException & /*e*/) { } --- 282,288 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOVER); } ! catch(wxLuaSocketException &) { } *************** *** 300,306 **** try { ! return GetSocketBase()->WriteByte(wxLUA_CMD_DEBUG_STEPOUT); } ! catch(wxLuaSocketException & /*e*/) { } --- 297,303 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_STEPOUT); } ! catch(wxLuaSocketException &) { } *************** *** 315,321 **** try { ! return GetSocketBase()->WriteByte(wxLUA_CMD_DEBUG_CONTINUE); } ! catch(wxLuaSocketException & /*e*/) { } --- 312,318 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_CONTINUE); } ! catch(wxLuaSocketException &) { } *************** *** 330,336 **** try { ! return GetSocketBase()->WriteByte(wxLUA_CMD_DEBUG_BREAK); } ! catch(wxLuaSocketException & /*e*/) { } --- 327,333 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_DEBUG_BREAK); } ! catch(wxLuaSocketException &) { } *************** *** 345,351 **** try { ! return GetSocketBase()->WriteByte(wxLUA_CMD_RESET); } ! catch(wxLuaSocketException & /*e*/) { } --- 342,348 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_RESET); } ! catch(wxLuaSocketException &) { } *************** *** 360,366 **** try { ! return GetSocketBase()->WriteByte(wxLUA_CMD_ENUMERATE_STACK); } ! catch(wxLuaSocketException & /*e*/) { } --- 357,363 ---- try { ! return GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK); } ! catch(wxLuaSocketException &) { } *************** *** 375,385 **** try { ! if (GetSocketBase()->WriteByte(wxLUA_CMD_ENUMERATE_STACK_ENTRY) && ! GetSocketBase()->WriteInt(stackEntry)) { return true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 372,382 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_ENUMERATE_STACK_ENTRY) && ! GetSocketBase()->WriteInt32(stackEntry)) { return true; } } ! catch(wxLuaSocketException &) { } *************** *** 394,400 **** try { ! if (GetSocketBase()->WriteByte(wxLUA_CMD_ENUMERATE_TABLE_REF) && ! GetSocketBase()->WriteInt(tableRef) && ! GetSocketBase()->WriteInt(nIndex) && GetSocketBase()->WriteLong(nItemNode)) { --- 391,397 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_ENUMERATE_TABLE_REF) && ! GetSocketBase()->WriteInt32(tableRef) && ! GetSocketBase()->WriteInt32(nIndex) && GetSocketBase()->WriteLong(nItemNode)) { *************** *** 402,406 **** } } ! catch(wxLuaSocketException & /*e*/) { } --- 399,403 ---- } } ! catch(wxLuaSocketException &) { } *************** *** 415,424 **** try { ! if (GetSocketBase()->WriteByte(wxLUA_CMD_CLEAR_DEBUG_REFERENCES)) { return true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 412,421 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_CLEAR_DEBUG_REFERENCES)) { return true; } } ! catch(wxLuaSocketException &) { } *************** *** 433,438 **** try { ! if (GetSocketBase()->WriteByte(wxLUA_CMD_EVALUATE_EXPR) && ! GetSocketBase()->WriteInt(exprRef) && GetSocketBase()->WriteString(strExpression)) { --- 430,435 ---- try { ! if (GetSocketBase()->WriteByte(wxLUASOCKET_DEBUG_CMD_EVALUATE_EXPR) && ! GetSocketBase()->WriteInt32(exprRef) && GetSocketBase()->WriteString(strExpression)) { *************** *** 440,444 **** } } ! catch(wxLuaSocketException & /*e*/) { } --- 437,441 ---- } } ! catch(wxLuaSocketException &) { } *************** *** 508,512 **** } ! int wxLuaDebuggerBase::HandleDebugEvent(wxLuaDebugEvents_Type event_type) { wxCHECK_MSG(GetSocketBase(), event_type, wxT("Invalid socket")); --- 505,509 ---- } ! int wxLuaDebuggerBase::HandleDebugEvent(wxLuaScoketDebugEvents_Type event_type) { wxCHECK_MSG(GetSocketBase(), event_type, wxT("Invalid socket")); *************** *** 514,521 **** switch (event_type) { ! case wxLUA_EVENT_DEBUG_BREAK: { wxString fileName = GetSocketBase()->ReadString(); ! int lineNumber = GetSocketBase()->ReadInt(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAK, lineNumber, fileName); --- 511,518 ---- switch (event_type) { ! case wxLUASOCKET_DEBUG_EVENT_BREAK: { wxString fileName = GetSocketBase()->ReadString(); ! int lineNumber = GetSocketBase()->ReadInt32(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAK, lineNumber, fileName); *************** *** 523,527 **** break; } ! case wxLUA_EVENT_DEBUG_PRINT: { wxString strMessage = GetSocketBase()->ReadString(); --- 520,524 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_PRINT: { wxString strMessage = GetSocketBase()->ReadString(); *************** *** 532,536 **** break; } ! case wxLUA_EVENT_DEBUG_ERROR: { wxString strMessage = GetSocketBase()->ReadString(); --- 529,533 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_ERROR: { wxString strMessage = GetSocketBase()->ReadString(); *************** *** 541,545 **** break; } ! case wxLUA_EVENT_DEBUG_EXIT: { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EXIT); --- 538,542 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_EXIT: { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EXIT); *************** *** 547,551 **** break; } ! case wxLUA_EVENT_DEBUG_STACK_ENUM: { wxLuaDebugData debugData = GetSocketBase()->ReadDebugData(); --- 544,548 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_STACK_ENUM: { wxLuaDebugData debugData = GetSocketBase()->ReadDebugData(); *************** *** 556,562 **** break; } ! case wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM: { ! int stackRef = GetSocketBase()->ReadInt(); wxLuaDebugData debugData = GetSocketBase()->ReadDebugData(); --- 553,559 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_STACK_ENTRY_ENUM: { ! int stackRef = GetSocketBase()->ReadInt32(); wxLuaDebugData debugData = GetSocketBase()->ReadDebugData(); *************** *** 566,570 **** break; } ! case wxLUA_EVENT_DEBUG_TABLE_ENUM: { long itemNode = GetSocketBase()->ReadLong(); --- 563,567 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_TABLE_ENUM: { long itemNode = GetSocketBase()->ReadLong(); *************** *** 576,582 **** break; } ! case wxLUA_EVENT_DEBUG_EVALUATE_EXPR: { ! int exprRef = GetSocketBase()->ReadInt(); wxString strResult = GetSocketBase()->ReadString(); --- 573,579 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_EVALUATE_EXPR: { ! int exprRef = GetSocketBase()->ReadInt32(); wxString strResult = GetSocketBase()->ReadString(); *************** *** 587,595 **** break; } ! case wxLUA_EVENT_DEBUG_BREAKPOINT_ADDED: { wxString fileName = GetSocketBase()->ReadString(); ! int line = GetSocketBase()->ReadInt(); ! bool enabled = GetSocketBase()->ReadInt() ? true : false; wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED, line, fileName, enabled); --- 584,592 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_ADDED: { wxString fileName = GetSocketBase()->ReadString(); ! int line = GetSocketBase()->ReadInt32(); ! bool enabled = GetSocketBase()->ReadInt32() ? true : false; wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED, line, fileName, enabled); *************** *** 597,604 **** break; } ! case wxLUA_EVENT_DEBUG_BREAKPOINT_REMOVED: { wxString fileName = GetSocketBase()->ReadString(); ! int line = GetSocketBase()->ReadInt(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED, line, fileName); --- 594,601 ---- break; } ! case wxLUASOCKET_DEBUG_EVENT_BREAKPOINT_REMOVED: { wxString fileName = GetSocketBase()->ReadString(); ! int line = GetSocketBase()->ReadInt32(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED, line, fileName); *************** *** 795,805 **** { int debugEvent = m_acceptedSocket->ReadByte(); ! HandleDebugEvent((wxLuaDebugEvents_Type) debugEvent); ! if (debugEvent == wxLUA_EVENT_DEBUG_EXIT) m_fShutdown = true; } } ! catch(wxLuaSocketException & /*e*/) { } --- 792,802 ---- { int debugEvent = m_acceptedSocket->ReadByte(); ! HandleDebugEvent((wxLuaScoketDebugEvents_Type) debugEvent); ! if (debugEvent == wxLUASOCKET_DEBUG_EVENT_EXIT) m_fShutdown = true; } } ! catch(wxLuaSocketException &) { } *************** *** 815,819 **** } } ! catch(wxLuaSocketException & /*e*/) { } --- 812,816 ---- } } ! catch(wxLuaSocketException &) { } Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxlsock.cpp 8 Sep 2006 22:43:47 -0000 1.11 --- wxlsock.cpp 13 Sep 2006 04:13:48 -0000 1.12 *************** *** 30,69 **** #endif // ---------------------------------------------------------------------------- // wxLuaSocketBase // ---------------------------------------------------------------------------- ! unsigned char wxLuaSocketBase::ReadByte() { unsigned char value = 0; ! Read((char *) &value, sizeof(value)); ! return value; ! } ! ! short wxLuaSocketBase::ReadWord() ! { ! short value = 0; ! Read((char *)&value, sizeof(value)); ! return value; ! } ! ! unsigned short wxLuaSocketBase::ReadUWord() ! { ! unsigned short value = 0; ! Read((char *)&value, sizeof(value)); return value; } ! int wxLuaSocketBase::ReadInt() { ! int value = 0; ! Read((char *) &value, sizeof(value)); return value; } ! unsigned int wxLuaSocketBase::ReadUInt() { ! unsigned int value = 0; ! Read((char *) &value, sizeof(value)); return value; } --- 30,70 ---- #endif + // A simple way to debug the sockets to see if things are right + //#define DEBUG_WXLUASOCKET + + #ifdef DEBUG_WXLUASOCKET + void wxLuaSocketDebugMsg(const wxString& title, const wxString& msg) + { + wxSafeShowMessage(title, wxString::Format(wxT("PID %d TIME %s "), getpid(), wxT(__TIME__)) + msg); + } + #else + #define wxLuaSocketDebugMsg(title, msg) + #endif //DEBUG_WXLUASOCKET + // ---------------------------------------------------------------------------- // wxLuaSocketBase // ---------------------------------------------------------------------------- ! unsigned char wxLuaSocketBase::ReadByte() { unsigned char value = 0; ! Read((char *) &value, sizeof(unsigned char)); ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::ReadByte"), wxString::Format(wxT("val %d"), (int)value)); return value; } ! wxInt32 wxLuaSocketBase::ReadInt32() { ! wxInt32 value = 0; ! Read((char *) &value, sizeof(wxInt32)); ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::ReadInt32"), wxString::Format(wxT("val %d"), value)); return value; } ! wxUint32 wxLuaSocketBase::ReadUInt32() { ! wxUint32 value = 0; ! Read((char *) &value, sizeof(wxUint32)); ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::ReadUInt32"), wxString::Format(wxT("val %u"), value)); return value; } *************** *** 72,83 **** { long value = 0; ! Read((char *) &value, sizeof(value)); ! return value; ! } ! ! unsigned long wxLuaSocketBase::ReadULong() ! { ! unsigned long value = 0; ! Read((char *) &value, sizeof(value)); return value; } --- 73,81 ---- { long value = 0; ! // make sure that long really works for 32 and 64 bit platforms, use a string ! char buf[65] = { 0 }; memset(buf, 0, 65); ! Read((char *) &value, 64); ! lua2wx(buf).ToLong(&value); ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::ReadLong"), wxString::Format(wxT("val %ld"), value)); return value; } *************** *** 86,90 **** { wxString value; ! unsigned int length = ReadInt(); if (length > 0) { --- 84,90 ---- { wxString value; ! wxUint32 length = 0; ! Read((char *) &length, sizeof(wxUint32)); ! if (length > 0) { *************** *** 96,99 **** --- 96,102 ---- delete[] buffer; } + + wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::ReadString"), wxString::Format(wxT("len %u val '%s'"), length, value.c_str())); + return value; } *************** *** 105,115 **** try { ! int idx, idxMax = 0; ! Read((char *) &idxMax, sizeof(int)); for (idx = 0; idx < idxMax; ++idx) { ! int bufferLength; ! Read((char *) &bufferLength, sizeof(bufferLength)); if (bufferLength > 0) { --- 108,116 ---- try { ! wxInt32 idx, idxMax = ReadInt32(); for (idx = 0; idx < idxMax; ++idx) { ! int bufferLength = ReadInt32(); if (bufferLength > 0) { *************** *** 118,129 **** Read(pMemory, bufferLength); ! int nReference = *(int *) pMemory; ! pMemory += sizeof(int); ! int nIndex = *(int *) pMemory; ! pMemory += sizeof(int); ! bool fExpanded = (0 != (*(int *) pMemory)); ! pMemory += sizeof(int); const char *pNamePtr = pMemory; --- 119,130 ---- Read(pMemory, bufferLength); ! wxInt32 nReference = *(wxInt32 *) pMemory; ! pMemory += sizeof(wxInt32); ! wxInt32 nIndex = *(wxInt32 *) pMemory; ! pMemory += sizeof(wxInt32); ! bool fExpanded = (0 != (*(wxInt32 *) pMemory)); ! pMemory += sizeof(wxInt32); const char *pNamePtr = pMemory; *************** *** 146,150 **** } } ! catch(wxLuaSocketException & /*e*/) { } --- 147,151 ---- } } ! catch(wxLuaSocketException &) { } *************** *** 153,213 **** } ! bool wxLuaSocketBase::WriteCharData(const char* value, int length) ! { ! try ! { ! Write(value, length); ! return true; ! } ! catch(wxLuaSocketException & /*e*/) ! { ! } ! return false; ! } ! bool wxLuaSocketBase::WriteByte(unsigned char value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteWord(short value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteUWord(unsigned short value) { ! return WriteCharData((const char *)&value, sizeof(value)); } ! bool wxLuaSocketBase::WriteInt(int value) { ! return WriteCharData((const char *)&value, sizeof(value)); } ! bool wxLuaSocketBase::WriteUInt(unsigned int value) { ! return WriteCharData((const char *)&value, sizeof(value)); } bool wxLuaSocketBase::WriteLong(long value) { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteULong(unsigned long value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); } bool wxLuaSocketBase::WriteString(const wxString &value) { try { ! wxLuaCharBuffer buf(value); ! int buflen = buf.Length(); ! Write((const char *)&buflen, sizeof(buflen)); if (buflen > 0) { Write(buf.GetData(), buflen); } return true; } ! catch(wxLuaSocketException & /*e*/) { } return false; } --- 154,202 ---- } ! bool wxLuaSocketBase::WriteByte(char value) { ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::WriteByte"), wxString::Format(wxT("val %d"), (int)value)); ! return Write((const char*)&value, sizeof(char)); } ! bool wxLuaSocketBase::WriteInt32(wxInt32 value) { ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::WriteInt32"), wxString::Format(wxT("val %d"), value)); ! return Write((const char*)&value, sizeof(wxInt32)); } ! bool wxLuaSocketBase::WriteUInt32(wxUint32 value) { ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::WriteUInt32"), wxString::Format(wxT("val %u"), value)); ! return Write((const char*)&value, sizeof(wxUint32)); } bool wxLuaSocketBase::WriteLong(long value) { ! wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::WriteLong"), wxString::Format(wxT("val %ld"), value)); ! // make sure that long really works for 32 and 64 bit platforms, use a string ! char buf[65] = { 0 }; memset(buf, 0, 65); ! sprintf(buf, "%ld", value); ! return Write((const char*)&value, 64); } bool wxLuaSocketBase::WriteString(const wxString &value) { + wxLuaCharBuffer buf(value); + wxUint32 buflen = (wxUint32)buf.Length(); + + wxLuaSocketDebugMsg(wxT("wxLuaSocketBase::WriteString"), wxString::Format(wxT("len %u val '%s'"), buflen, value.c_str())); + try { ! Write((const char*)&buflen, sizeof(wxUint32)); if (buflen > ... [truncated message content] |
From: John L. <jr...@us...> - 2006-09-08 22:43:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26661/wxLua/modules/wxluasocket/src Modified Files: wxlsock.cpp Log Message: add a few wxArray functions to wxLuaDebugData to make it easier to use use enum instead of define for wxwindow ids Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxlsock.cpp 7 Sep 2006 22:42:19 -0000 1.10 --- wxlsock.cpp 8 Sep 2006 22:43:47 -0000 1.11 *************** *** 140,144 **** nIndex, fExpanded); ! debugData.GetDataArray().Add(pItem); delete[] pBuffer; --- 140,144 ---- nIndex, fExpanded); ! debugData.Add(pItem); delete[] pBuffer; *************** *** 216,220 **** { bool result = false; ! int idx, idxMax = debugData.GetDataArray().Count(); Write((const char *) &idxMax, sizeof(int)); --- 216,220 ---- { bool result = false; ! int idx, idxMax = debugData.GetCount(); Write((const char *) &idxMax, sizeof(int)); *************** *** 224,228 **** try { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(idx); int nameLength = item->GetName().Length() + 1; --- 224,228 ---- try { ! const wxLuaDebugDataItem *item = debugData.Item(idx); int nameLength = item->GetName().Length() + 1; |
From: John L. <jr...@us...> - 2006-09-08 22:43:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26661/wxLua/modules/wxluadebug/src Modified Files: staktree.cpp wxldebug.cpp Log Message: add a few wxArray functions to wxLuaDebugData to make it easier to use use enum instead of define for wxwindow ids Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxldebug.cpp 7 Sep 2006 22:42:19 -0000 1.17 --- wxldebug.cpp 8 Sep 2006 22:43:47 -0000 1.18 *************** *** 77,80 **** --- 77,82 ---- }; + #define M_DEBUGREFDATA ((wxLuaDebugDataRefData*)m_refData) + wxLuaDebugData::wxLuaDebugData() : wxObject() { *************** *** 82,92 **** } ! wxLuaDebugDataItemArray& wxLuaDebugData::GetDataArray() { return ((wxLuaDebugDataRefData*)m_refData)->m_dataArray; } ! const wxLuaDebugDataItemArray& wxLuaDebugData::GetDataArray() const { ! return ((wxLuaDebugDataRefData*)m_refData)->m_dataArray; } --- 84,111 ---- } ! wxLuaDebugDataItemArray& wxLuaDebugData::GetArray() { return ((wxLuaDebugDataRefData*)m_refData)->m_dataArray; } ! const wxLuaDebugDataItemArray& wxLuaDebugData::GetArray() const { ! return M_DEBUGREFDATA->m_dataArray; ! } ! ! size_t wxLuaDebugData::GetCount() const ! { ! wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); ! return M_DEBUGREFDATA->m_dataArray.GetCount(); ! } ! wxLuaDebugDataItem* wxLuaDebugData::Item(size_t index) const ! { ! wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); ! return M_DEBUGREFDATA->m_dataArray.Item(index); ! } ! void wxLuaDebugData::Add(wxLuaDebugDataItem* item) ! { ! wxCHECK_RET(M_DEBUGREFDATA != NULL, wxT("Invalid ref data")); ! wxCHECK_RET(item != NULL, wxT("Invalid wxLuaDebugDataItem")); ! M_DEBUGREFDATA->m_dataArray.Add(item); } *************** *** 95,104 **** wxLuaDebugData copyData; ! size_t idx, count = GetDataArray().Count(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *pOldData = GetDataArray().Item(idx); if (pOldData != NULL) ! copyData.GetDataArray().Add(new wxLuaDebugDataItem(*pOldData)); } --- 114,123 ---- wxLuaDebugData copyData; ! size_t idx, count = GetCount(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *pOldData = Item(idx); if (pOldData != NULL) ! copyData.Add(new wxLuaDebugDataItem(*pOldData)); } *************** *** 146,150 **** if (item != NULL) { ! GetDataArray().Add(item); count++; } --- 165,169 ---- if (item != NULL) { ! Add(item); count++; } *************** *** 195,199 **** if (item != NULL) { ! GetDataArray().Add(item); count++; } --- 214,218 ---- if (item != NULL) { ! Add(item); count++; } *************** *** 217,221 **** lua_pushvalue(L, LUA_GLOBALSINDEX); int nRef = wxlState.tinsert(-1); ! GetDataArray().Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); references.Add(nRef); } --- 236,240 ---- lua_pushvalue(L, LUA_GLOBALSINDEX); int nRef = wxlState.tinsert(-1); ! Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); references.Add(nRef); } *************** *** 252,256 **** if (item != NULL) { ! GetDataArray().Add(item); count++; } --- 271,275 ---- if (item != NULL) { ! Add(item); count++; } *************** *** 445,449 **** m_wxlState.GetGlobals(); int nRef = Ref(); ! debugData.GetDataArray().Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); return debugData; } --- 464,468 ---- m_wxlState.GetGlobals(); int nRef = Ref(); ! debugData.Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); return debugData; } Index: staktree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/staktree.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** staktree.cpp 7 Sep 2006 22:42:19 -0000 1.27 --- staktree.cpp 8 Sep 2006 22:43:47 -0000 1.28 *************** *** 33,41 **** #endif - // Note the wxTR_ROW_LINES style: draws horizontal lines between items - #if !wxCHECK_VERSION(2, 3, 0) - #define wxTR_ROW_LINES 0 - #endif // !wxCHECK_VERSION(2, 3, 0) - // ---------------------------------------------------------------------------- // wxLuaStackDialog --- 33,36 ---- *************** *** 87,96 **** m_dismissButton = new wxButton(this, ID_WXLUA_STACKDIALOG_DISMISS_BUTTON, _("Cancel"), ! wxDefaultPosition, wxDefaultSize ! #if wxCHECK_VERSION(2, 3, 0) ! ,wxBU_EXACTFIT); ! #else ! ); ! #endif m_dismissButton->SetDefault(); --- 82,87 ---- m_dismissButton = new wxButton(this, ID_WXLUA_STACKDIALOG_DISMISS_BUTTON, _("Cancel"), ! wxDefaultPosition, wxDefaultSize, ! wxBU_EXACTFIT); m_dismissButton->SetDefault(); *************** *** 138,144 **** // set the frame icon - #if wxCHECK_VERSION(2, 3, 0) SetIcon(wxICON(LUA)); - #endif int nWidth, nHeight; --- 129,133 ---- *************** *** 166,173 **** m_stackComboBox->Clear(); ! size_t idx, count = debugData.GetDataArray().Count(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(idx); #if defined(__WXMAC__) // FIXME Mac is dying on the two parameter version...don't know how to fix. --- 155,162 ---- m_stackComboBox->Clear(); ! size_t idx, count = debugData.GetCount(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = debugData.Item(idx); #if defined(__WXMAC__) // FIXME Mac is dying on the two parameter version...don't know how to fix. *************** *** 178,182 **** } ! if (debugData.GetDataArray().Count() > 0) { m_stackComboBox->SetSelection(0); --- 167,171 ---- } ! if (debugData.GetCount() > 0) { m_stackComboBox->SetSelection(0); *************** *** 237,244 **** m_treeControl->AdjustRemoteScrollbars(); ! size_t idx, count = debugData.GetDataArray().Count(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(idx); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; --- 226,233 ---- m_treeControl->AdjustRemoteScrollbars(); ! size_t idx, count = debugData.GetCount(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = debugData.Item(idx); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; *************** *** 261,265 **** { wxLuaDebugData globalDebugData = m_luaInterface->GetGlobalData(); ! const wxLuaDebugDataItem *item = globalDebugData.GetDataArray().Item(0); wxTreeItemId treeNode = m_treeControl->AppendItem( rootItem, --- 250,254 ---- { wxLuaDebugData globalDebugData = m_luaInterface->GetGlobalData(); ! const wxLuaDebugDataItem *item = globalDebugData.Item(0); wxTreeItemId treeNode = m_treeControl->AppendItem( rootItem, *************** *** 421,425 **** { wxLuaDebugDataItem *item = new wxLuaDebugDataItem(names[n], wxT("wxLuaData"), wxString::Format(wxT("%d"), counts[n]), wxT(""), LUA_NOREF, pDebugDataItem->GetIndex() + 1); ! dataArr.GetDataArray().Add(item); } --- 410,414 ---- { wxLuaDebugDataItem *item = new wxLuaDebugDataItem(names[n], wxT("wxLuaData"), wxString::Format(wxT("%d"), counts[n]), wxT(""), LUA_NOREF, pDebugDataItem->GetIndex() + 1); ! dataArr.Add(item); } *************** *** 432,443 **** void wxLuaStackDialog::FillTableEntry(wxTreeItemId itemNode, const wxLuaDebugData& debugData) { ! if (debugData.GetDataArray().Count() == 0) m_treeControl->SetItemHasChildren(itemNode, false); else { ! size_t n, count = debugData.GetDataArray().Count(); for (n = 0; n < count; ++n) { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(n); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; --- 421,432 ---- void wxLuaStackDialog::FillTableEntry(wxTreeItemId itemNode, const wxLuaDebugData& debugData) { ! if (debugData.GetCount() == 0) m_treeControl->SetItemHasChildren(itemNode, false); else { ! size_t n, count = debugData.GetCount(); for (n = 0; n < count; ++n) { ! const wxLuaDebugDataItem *item = debugData.Item(n); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; |
From: John L. <jr...@us...> - 2006-09-08 22:43:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26661/wxLua/modules/wxluadebug/include Modified Files: staktree.h wxldebug.h Log Message: add a few wxArray functions to wxLuaDebugData to make it easier to use use enum instead of define for wxwindow ids Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** staktree.h 7 Sep 2006 22:42:19 -0000 1.11 --- staktree.h 8 Sep 2006 22:43:46 -0000 1.12 *************** *** 26,38 **** // ---------------------------------------------------------------------------- ! #define ID_WXLUA_STACKDIALOG 2000 ! #define ID_WXLUA_STACKDIALOG_COMBO 2001 ! #define ID_WXLUA_STACKDIALOG_SCRWIN 2002 ! #define ID_WXLUA_STACKDIALOG_SPLITWIN 2003 ! #define ID_WXLUA_STACKDIALOG_STACKTREE 2004 ! #define ID_WXLUA_STACKDIALOG_VALUE_SPLITWIN 2005 ! #define ID_WXLUA_STACKDIALOG_VALUE_WIN1 2006 ! #define ID_WXLUA_STACKDIALOG_VALUE_WIN2 2007 ! #define ID_WXLUA_STACKDIALOG_DISMISS_BUTTON 2008 // ---------------------------------------------------------------------------- --- 26,41 ---- // ---------------------------------------------------------------------------- ! enum ! { ! ID_WXLUA_STACKDIALOG = 2000, ! ID_WXLUA_STACKDIALOG_COMBO, ! ID_WXLUA_STACKDIALOG_SCRWIN, ! ID_WXLUA_STACKDIALOG_SPLITWIN, ! ID_WXLUA_STACKDIALOG_STACKTREE, ! ID_WXLUA_STACKDIALOG_VALUE_SPLITWIN, ! ID_WXLUA_STACKDIALOG_VALUE_WIN1, ! ID_WXLUA_STACKDIALOG_VALUE_WIN2, ! ID_WXLUA_STACKDIALOG_DISMISS_BUTTON ! }; // ---------------------------------------------------------------------------- Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxldebug.h 7 Sep 2006 22:42:19 -0000 1.21 --- wxldebug.h 8 Sep 2006 22:43:46 -0000 1.22 *************** *** 76,81 **** // wxLuaDebugData - a wxObject ref counted container for a wxLuaDebugDataItemArray // The Ref data is always expected to exist and the destructor deletes the array items - // This is supposed to be a minimal class so all array operations are though the - // member functions GetDataArray(). // ---------------------------------------------------------------------------- --- 76,79 ---- *************** *** 87,92 **** // Get the data array ! wxLuaDebugDataItemArray& GetDataArray(); ! const wxLuaDebugDataItemArray& GetDataArray() const; // fill this with the stack entries for the wxLuaState --- 85,95 ---- // Get the data array ! wxLuaDebugDataItemArray& GetArray(); ! const wxLuaDebugDataItemArray& GetArray() const; ! ! // wxArray functions mapped to the internal array w/ error checking ! size_t GetCount() const; ! wxLuaDebugDataItem* Item(size_t index) const; ! void Add(wxLuaDebugDataItem* item); // fill this with the stack entries for the wxLuaState |
From: John L. <jr...@us...> - 2006-09-07 22:42:26
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4262/wxLua/modules/wxluadebug/src Modified Files: staktree.cpp wxldebug.cpp Log Message: make wxLuaDebugData derived from wxObject and ref counted so we don't have to remember to delete it or check NULL make the wxTread in wxLuaDebugServer part of the class as wxLuaDebugTarget does Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxldebug.cpp 28 Aug 2006 05:26:20 -0000 1.16 --- wxldebug.cpp 7 Sep 2006 22:42:19 -0000 1.17 *************** *** 60,91 **** // ---------------------------------------------------------------------------- ! wxLuaDebugData::wxLuaDebugData() : wxLuaDebugDataItemArray(wxLuaDebugData::SortFunction) { } ! wxLuaDebugData::~wxLuaDebugData() { ! size_t idx, count = Count(); ! for (idx = 0; idx < count; ++idx) ! { ! const wxLuaDebugDataItem *pData = Item(idx); ! delete pData; ! } } ! wxLuaDebugData *wxLuaDebugData::Clone() const { ! wxLuaDebugData *pCloneData = new wxLuaDebugData; ! if (pCloneData != NULL) { ! size_t idx, count = Count(); ! for (idx = 0; idx < count; ++idx) ! { ! const wxLuaDebugDataItem *pOldData = Item(idx); ! if (pOldData != NULL) ! pCloneData->Add(new wxLuaDebugDataItem(*pOldData)); ! } } ! return pCloneData; } --- 60,107 ---- // ---------------------------------------------------------------------------- ! class wxLuaDebugDataRefData : public wxObjectRefData { + public: + wxLuaDebugDataRefData() : m_dataArray(wxLuaDebugData::SortFunction) {} + ~wxLuaDebugDataRefData() + { + size_t idx, count = m_dataArray.Count(); + for (idx = 0; idx < count; ++idx) + { + const wxLuaDebugDataItem *pData = m_dataArray.Item(idx); + delete pData; + } + } + + wxLuaDebugDataItemArray m_dataArray; + }; + + wxLuaDebugData::wxLuaDebugData() : wxObject() + { + m_refData = new wxLuaDebugDataRefData; } ! wxLuaDebugDataItemArray& wxLuaDebugData::GetDataArray() { ! return ((wxLuaDebugDataRefData*)m_refData)->m_dataArray; ! } ! const wxLuaDebugDataItemArray& wxLuaDebugData::GetDataArray() const ! { ! return ((wxLuaDebugDataRefData*)m_refData)->m_dataArray; } ! wxLuaDebugData wxLuaDebugData::Copy() const { ! wxLuaDebugData copyData; ! ! size_t idx, count = GetDataArray().Count(); ! for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *pOldData = GetDataArray().Item(idx); ! if (pOldData != NULL) ! copyData.GetDataArray().Add(new wxLuaDebugDataItem(*pOldData)); } ! ! return copyData; } *************** *** 130,134 **** if (item != NULL) { ! Add(item); count++; } --- 146,150 ---- if (item != NULL) { ! GetDataArray().Add(item); count++; } *************** *** 179,183 **** if (item != NULL) { ! Add(item); count++; } --- 195,199 ---- if (item != NULL) { ! GetDataArray().Add(item); count++; } *************** *** 201,205 **** lua_pushvalue(L, LUA_GLOBALSINDEX); int nRef = wxlState.tinsert(-1); ! Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); references.Add(nRef); } --- 217,221 ---- lua_pushvalue(L, LUA_GLOBALSINDEX); int nRef = wxlState.tinsert(-1); ! GetDataArray().Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); references.Add(nRef); } *************** *** 236,240 **** if (item != NULL) { ! Add(item); count++; } --- 252,256 ---- if (item != NULL) { ! GetDataArray().Add(item); count++; } *************** *** 403,443 **** } ! wxLuaDebugData *wxLuaInterface::EnumerateStack() { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList != NULL) ! pSortedList->EnumerateStack(m_wxlState); ! ! return pSortedList; } ! wxLuaDebugData *wxLuaInterface::EnumerateStackEntry(int nEntry) { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList != NULL) ! pSortedList->EnumerateStackEntry(m_wxlState, nEntry, m_references); ! ! return pSortedList; } ! wxLuaDebugData *wxLuaInterface::EnumerateTable(int nRef, int nIndex, long WXUNUSED(data)) { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList != NULL) ! pSortedList->EnumerateTable(m_wxlState, nRef, nIndex, m_references); ! ! return pSortedList; } ! wxLuaDebugData *wxLuaInterface::GetGlobalData() { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList != NULL) ! { ! m_wxlState.GetGlobals(); ! int nRef = Ref(); ! pSortedList->Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); ! } ! return pSortedList; } --- 419,450 ---- } ! wxLuaDebugData wxLuaInterface::EnumerateStack() { ! wxLuaDebugData debugData; ! debugData.EnumerateStack(m_wxlState); ! return debugData; } ! wxLuaDebugData wxLuaInterface::EnumerateStackEntry(int nEntry) { ! wxLuaDebugData debugData; ! debugData.EnumerateStackEntry(m_wxlState, nEntry, m_references); ! return debugData; } ! wxLuaDebugData wxLuaInterface::EnumerateTable(int nRef, int nIndex, long WXUNUSED(data)) { ! wxLuaDebugData debugData; ! debugData.EnumerateTable(m_wxlState, nRef, nIndex, m_references); ! return debugData; } ! wxLuaDebugData wxLuaInterface::GetGlobalData() { ! wxLuaDebugData debugData; ! m_wxlState.GetGlobals(); ! int nRef = Ref(); ! debugData.GetDataArray().Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); ! return debugData; } Index: staktree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/staktree.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** staktree.cpp 28 Aug 2006 05:26:20 -0000 1.26 --- staktree.cpp 7 Sep 2006 22:42:19 -0000 1.27 *************** *** 150,159 **** else { ! wxLuaDebugData *pSortedList = m_luaInterface->EnumerateStack(); ! if (pSortedList != NULL) ! { ! FillStackCombobox(pSortedList); ! delete pSortedList; ! } } --- 150,155 ---- else { ! wxLuaDebugData debugData = m_luaInterface->EnumerateStack(); ! FillStackCombobox(debugData); } *************** *** 166,177 **** } ! void wxLuaStackDialog::FillStackCombobox(const wxLuaDebugData *pSortedList) { m_stackComboBox->Clear(); ! size_t idx, count = pSortedList->Count(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = pSortedList->Item(idx); #if defined(__WXMAC__) // FIXME Mac is dying on the two parameter version...don't know how to fix. --- 162,173 ---- } ! void wxLuaStackDialog::FillStackCombobox(const wxLuaDebugData& debugData) { m_stackComboBox->Clear(); ! size_t idx, count = debugData.GetDataArray().Count(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(idx); #if defined(__WXMAC__) // FIXME Mac is dying on the two parameter version...don't know how to fix. *************** *** 182,186 **** } ! if (pSortedList->Count() > 0) { m_stackComboBox->SetSelection(0); --- 178,182 ---- } ! if (debugData.GetDataArray().Count() > 0) { m_stackComboBox->SetSelection(0); *************** *** 230,243 **** else { ! wxLuaDebugData *pSortedList = m_luaInterface->EnumerateStackEntry(nEntry); ! if (pSortedList != NULL) ! { ! FillStackEntry(nEntry, pSortedList); ! delete pSortedList; ! } } } ! void wxLuaStackDialog::FillStackEntry(int WXUNUSED(nEntry), const wxLuaDebugData *pSortedList) { m_treeControl->DeleteAllItems(); --- 226,235 ---- else { ! wxLuaDebugData debugData = m_luaInterface->EnumerateStackEntry(nEntry); ! FillStackEntry(nEntry, debugData); } } ! void wxLuaStackDialog::FillStackEntry(int WXUNUSED(nEntry), const wxLuaDebugData& debugData) { m_treeControl->DeleteAllItems(); *************** *** 245,252 **** m_treeControl->AdjustRemoteScrollbars(); ! size_t idx, count = pSortedList->Count(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = pSortedList->Item(idx); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; --- 237,244 ---- m_treeControl->AdjustRemoteScrollbars(); ! size_t idx, count = debugData.GetDataArray().Count(); for (idx = 0; idx < count; ++idx) { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(idx); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; *************** *** 268,273 **** else { ! wxLuaDebugData *pSortedList = m_luaInterface->GetGlobalData(); ! const wxLuaDebugDataItem *item = pSortedList->Item(0); wxTreeItemId treeNode = m_treeControl->AppendItem( rootItem, --- 260,265 ---- else { ! wxLuaDebugData globalDebugData = m_luaInterface->GetGlobalData(); ! const wxLuaDebugDataItem *item = globalDebugData.GetDataArray().Item(0); wxTreeItemId treeNode = m_treeControl->AppendItem( rootItem, *************** *** 281,286 **** GetDerivedAndTrackedItems(m_treeControl, rootItem); - - delete pSortedList; } } --- 273,276 ---- *************** *** 328,340 **** if (itemNode) { ! wxLuaDebugDataItem *pDebugData = (wxLuaDebugDataItem *)m_treeControl->GetItemData(itemNode); ! if ((pDebugData != NULL) && !pDebugData->IsExpanded()) { ! pDebugData->SetExpanded(true); ! int nRef = pDebugData->GetReference(); if (nRef != LUA_NOREF) { ! int nIndex = pDebugData->GetIndex() + 1; if (m_luaInterface->IsDebugServer()) --- 318,330 ---- if (itemNode) { ! wxLuaDebugDataItem *pDebugDataItem = (wxLuaDebugDataItem *)m_treeControl->GetItemData(itemNode); ! if ((pDebugDataItem != NULL) && !pDebugDataItem->IsExpanded()) { ! pDebugDataItem->SetExpanded(true); ! int nRef = pDebugDataItem->GetReference(); if (nRef != LUA_NOREF) { ! int nIndex = pDebugDataItem->GetIndex() + 1; if (m_luaInterface->IsDebugServer()) *************** *** 345,361 **** { // insert items ! wxLuaDebugData *pSortedList = m_luaInterface->EnumerateTable(nRef, nIndex); ! if (pSortedList != NULL) ! { ! FillTableEntry(itemNode, pSortedList); ! delete pSortedList; ! } } } else if (!m_luaInterface->IsDebugServer() && m_luaInterface->GetwxLuaState().Ok() && ! ((pDebugData->GetName() == _("Tracked List")) || ! (pDebugData->GetName() == _("Event Handler List")) || ! (pDebugData->GetName() == _("wxWindow List")))) { wxLuaState wxlState(m_luaInterface->GetwxLuaState()); --- 335,347 ---- { // insert items ! wxLuaDebugData debugData = m_luaInterface->EnumerateTable(nRef, nIndex); ! FillTableEntry(itemNode, debugData); } } else if (!m_luaInterface->IsDebugServer() && m_luaInterface->GetwxLuaState().Ok() && ! ((pDebugDataItem->GetName() == _("Tracked List")) || ! (pDebugDataItem->GetName() == _("Event Handler List")) || ! (pDebugDataItem->GetName() == _("wxWindow List")))) { wxLuaState wxlState(m_luaInterface->GetwxLuaState()); *************** *** 364,368 **** wxArrayInt counts; ! if (pDebugData->GetName() == _("Tracked List")) { wxLongToLongHashMap::iterator it; --- 350,354 ---- wxArrayInt counts; ! if (pDebugDataItem->GetName() == _("Tracked List")) { wxLongToLongHashMap::iterator it; *************** *** 386,390 **** } } ! else if (pDebugData->GetName() == _("Event Handler List")) { wxNode* node = wxlState.GetTrackedEventHandlerList()->GetFirst(); --- 372,376 ---- } } ! else if (pDebugDataItem->GetName() == _("Event Handler List")) { wxNode* node = wxlState.GetTrackedEventHandlerList()->GetFirst(); *************** *** 430,443 **** } ! wxLuaDebugData* dataArr = new wxLuaDebugData; size_t n, count = names.GetCount(); for (n = 0; n < count; n++) { ! wxLuaDebugDataItem *item = new wxLuaDebugDataItem(names[n], wxT("wxLuaData"), wxString::Format(wxT("%d"), counts[n]), wxT(""), LUA_NOREF, pDebugData->GetIndex() + 1); ! dataArr->Add(item); } FillTableEntry(itemNode, dataArr); - delete dataArr; } } --- 416,428 ---- } ! wxLuaDebugData dataArr; size_t n, count = names.GetCount(); for (n = 0; n < count; n++) { ! wxLuaDebugDataItem *item = new wxLuaDebugDataItem(names[n], wxT("wxLuaData"), wxString::Format(wxT("%d"), counts[n]), wxT(""), LUA_NOREF, pDebugDataItem->GetIndex() + 1); ! dataArr.GetDataArray().Add(item); } FillTableEntry(itemNode, dataArr); } } *************** *** 445,458 **** } ! void wxLuaStackDialog::FillTableEntry(wxTreeItemId itemNode, const wxLuaDebugData *pSortedList) { ! if (pSortedList->Count() == 0) m_treeControl->SetItemHasChildren(itemNode, false); else { ! size_t n, count = pSortedList->Count(); for (n = 0; n < count; ++n) { ! const wxLuaDebugDataItem *item = pSortedList->Item(n); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; --- 430,443 ---- } ! void wxLuaStackDialog::FillTableEntry(wxTreeItemId itemNode, const wxLuaDebugData& debugData) { ! if (debugData.GetDataArray().Count() == 0) m_treeControl->SetItemHasChildren(itemNode, false); else { ! size_t n, count = debugData.GetDataArray().Count(); for (n = 0; n < count; ++n) { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(n); int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; |
From: John L. <jr...@us...> - 2006-09-07 22:42:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4262/wxLua/modules/wxluasocket/src Modified Files: dservice.cpp wxldserv.cpp wxldtarg.cpp wxlsock.cpp wxluasocket.cpp wxluasocket_bind.cpp Log Message: make wxLuaDebugData derived from wxObject and ref counted so we don't have to remember to delete it or check NULL make the wxTread in wxLuaDebugServer part of the class as wxLuaDebugTarget does Index: dservice.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/dservice.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dservice.cpp 6 Sep 2006 22:23:20 -0000 1.19 --- dservice.cpp 7 Sep 2006 22:42:19 -0000 1.20 *************** *** 528,532 **** // Debugger Notification ! bool wxLuaDebugService::NotifyStackEnumeration(wxLuaDebugData *pDebugData) { bool result = false; --- 528,532 ---- // Debugger Notification ! bool wxLuaDebugService::NotifyStackEnumeration(const wxLuaDebugData& debugData) { bool result = false; *************** *** 539,543 **** wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); ! dSocket->WriteDebugData(pDebugData); if (!dSocket->Error()) --- 539,543 ---- wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); ! dSocket->WriteDebugData(debugData); if (!dSocket->Error()) *************** *** 545,555 **** } - delete pDebugData; - return result; } // Debugger Notification ! bool wxLuaDebugService::NotifyStackEntryEnumeration(int entryRef, wxLuaDebugData *pDebugData) { bool result = false; --- 545,553 ---- } return result; } // Debugger Notification ! bool wxLuaDebugService::NotifyStackEntryEnumeration(int entryRef, const wxLuaDebugData& debugData) { bool result = false; *************** *** 563,567 **** dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); dSocket->WriteInt(entryRef); ! dSocket->WriteDebugData(pDebugData); if (!dSocket->Error()) --- 561,565 ---- dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); dSocket->WriteInt(entryRef); ! dSocket->WriteDebugData(debugData); if (!dSocket->Error()) *************** *** 569,579 **** } - delete pDebugData; - return result; } // Debugger Notification ! bool wxLuaDebugService::NotifyTableEnumeration(long itemNode, wxLuaDebugData *pDebugData) { bool result = false; --- 567,575 ---- } return result; } // Debugger Notification ! bool wxLuaDebugService::NotifyTableEnumeration(long itemNode, const wxLuaDebugData& debugData) { bool result = false; *************** *** 587,591 **** dSocket->WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); dSocket->WriteLong(itemNode); ! dSocket->WriteDebugData(pDebugData); if (!dSocket->Error()) --- 583,587 ---- dSocket->WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); dSocket->WriteLong(itemNode); ! dSocket->WriteDebugData(debugData); if (!dSocket->Error()) *************** *** 593,598 **** } - delete pDebugData; - return result; } --- 589,592 ---- *************** *** 1120,1158 **** bool wxLuaDebuggee::EnumerateStack() { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList == NULL) ! return false; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! pSortedList->EnumerateStack(m_wxlState); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return m_debugService->NotifyStackEnumeration(pSortedList); } bool wxLuaDebuggee::EnumerateStackEntry(int stackRef) { ! wxLuaDebugData *pSortedList = new wxLuaDebugData; ! if (pSortedList == NULL) ! return false; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! pSortedList->EnumerateStackEntry(m_wxlState, stackRef, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return m_debugService->NotifyStackEntryEnumeration(stackRef, pSortedList); } bool wxLuaDebuggee::EnumerateTable(int tableRef, int nIndex, long nItemNode) { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList == NULL) ! return false; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! pSortedList->EnumerateTable(m_wxlState, tableRef, nIndex, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return m_debugService->NotifyTableEnumeration(nItemNode, pSortedList); } --- 1114,1146 ---- bool wxLuaDebuggee::EnumerateStack() { ! wxLuaDebugData debugData; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! debugData.EnumerateStack(m_wxlState); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return m_debugService->NotifyStackEnumeration(debugData); } bool wxLuaDebuggee::EnumerateStackEntry(int stackRef) { ! wxLuaDebugData debugData; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! debugData.EnumerateStackEntry(m_wxlState, stackRef, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return m_debugService->NotifyStackEntryEnumeration(stackRef, debugData); } bool wxLuaDebuggee::EnumerateTable(int tableRef, int nIndex, long nItemNode) { ! wxLuaDebugData debugData; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! debugData.EnumerateTable(m_wxlState, tableRef, nIndex, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return m_debugService->NotifyTableEnumeration(nItemNode, debugData); } Index: wxluasocket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxluasocket.cpp 6 Sep 2006 22:23:20 -0000 1.3 --- wxluasocket.cpp 7 Sep 2006 22:42:19 -0000 1.4 *************** *** 343,371 **** // ------------------------------------------------------------------------------------------------- - // Bind class wxLuaDebugData - // ------------------------------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxLuaDebugData' - int s_wxluatag_wxLuaDebugData = -1; - - static int LUACALL wxLua_wxLuaDebugData_destructor(lua_State *) - { - return 0; - } - - - - - - // Map Lua Class Methods to C Binding Functions - static WXLUAMETHOD s_wxLuaDebugData_methods[] = { - { LuaDelete, "wxLuaDebugData", wxLua_wxLuaDebugData_destructor, 0, 0, {0} }, - }; - - // Extern accessor to class method map - WXLUAMETHOD* wxLuaDebugData_methods = s_wxLuaDebugData_methods; - int wxLuaDebugData_methodCount = sizeof(s_wxLuaDebugData_methods)/sizeof(s_wxLuaDebugData_methods[0]); - - // ------------------------------------------------------------------------------------------------- // Bind class wxLuaDebugEvent // ------------------------------------------------------------------------------------------------- --- 343,346 ---- *************** *** 434,452 **** } - // const wxLuaDebugData *GetDebugData() const - static int LUACALL wxLua_wxLuaDebugEvent_GetDebugData(lua_State *L) - { - wxLuaState wxlState(L); - const wxLuaDebugData *returns; - // get this - wxLuaDebugEvent * self = (wxLuaDebugEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebugEvent); - // call GetDebugData - returns = self->GetDebugData(); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxLuaDebugData, returns); - - return 1; - } - static int LUACALL wxLua_wxLuaDebugEvent_destructor(lua_State *L) { --- 409,412 ---- *************** *** 484,488 **** { LuaMethod, "GetFileName", wxLua_wxLuaDebugEvent_GetFileName, 0, 0, { 0 } }, { LuaMethod, "GetMessage", wxLua_wxLuaDebugEvent_GetMessage, 0, 0, { 0 } }, - { LuaMethod, "GetDebugData", wxLua_wxLuaDebugEvent_GetDebugData, 0, 0, { 0 } }, { LuaDelete, "wxLuaDebugEvent", wxLua_wxLuaDebugEvent_destructor, 0, 0, {0} }, { LuaMethod, "Delete", wxLua_wxLuaDebugEvent_Delete, 0, 0, {0} }, --- 444,447 ---- Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxluasocket_bind.cpp 9 Jun 2006 22:51:34 -0000 1.3 --- wxluasocket_bind.cpp 7 Sep 2006 22:42:19 -0000 1.4 *************** *** 127,131 **** static WXLUACLASS classList[] = { - { "wxLuaDebugData", wxLuaDebugData_methods, wxLuaDebugData_methodCount, -1, NULL, &s_wxluatag_wxLuaDebugData, NULL }, { "wxLuaDebugEvent", wxLuaDebugEvent_methods, wxLuaDebugEvent_methodCount, -1, CLASSINFO(wxLuaDebugEvent), &s_wxluatag_wxLuaDebugEvent, "wxEvent" }, { "wxLuaDebugServer", wxLuaDebugServer_methods, wxLuaDebugServer_methodCount, -1, NULL, &s_wxluatag_wxLuaDebugServer, NULL }, --- 127,130 ---- Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxldserv.cpp 7 Sep 2006 04:20:54 -0000 1.17 --- wxldserv.cpp 7 Sep 2006 22:42:19 -0000 1.18 *************** *** 63,70 **** m_nReference = event.m_nReference; m_fEnabledFlag = event.m_fEnabledFlag; - m_pDebugData = NULL; ! if (event.GetDebugData() != NULL) ! SetDebugData(event.GetReference(), event.GetDebugData()->Clone()); } --- 63,68 ---- m_nReference = event.m_nReference; m_fEnabledFlag = event.m_fEnabledFlag; ! SetDebugData(event.GetReference(), event.GetDebugData().Copy()); } *************** *** 79,89 **** m_nReference = -1; m_fEnabledFlag = enabledFlag; - m_pDebugData = NULL; } wxLuaDebugEvent::~wxLuaDebugEvent() { - if (m_pDebugData != NULL) - delete m_pDebugData; } --- 77,84 ---- *************** *** 94,102 **** } ! void wxLuaDebugEvent::SetDebugData(long nReference, wxLuaDebugData *pData) { - wxCHECK_RET(m_pDebugData == NULL, wxT("Setting wxLuaDebugData twice")); m_nReference = nReference; ! m_pDebugData = pData; } --- 89,96 ---- } ! void wxLuaDebugEvent::SetDebugData(long nReference, const wxLuaDebugData& debugData) { m_nReference = nReference; ! m_debugData = debugData; } *************** *** 120,154 **** } ! wxLuaDebugData* wxLuaDebugServerInterface::EnumerateStack() { m_pServer->EnumerateStack(); ! return NULL; } ! wxLuaDebugData* wxLuaDebugServerInterface::EnumerateStackEntry(int nEntry) { m_pServer->EnumerateStackEntry(nEntry); ! return NULL; } ! wxLuaDebugData* wxLuaDebugServerInterface::EnumerateTable(int nRef, int nEntry, long data) { m_pServer->EnumerateTable(nRef, nEntry, data); ! return NULL; ! } ! ! wxLuaDebugData* wxLuaDebugServerInterface::GetGlobalData() ! { ! return NULL; } ! // ---------------------------------------------------------------------------- ! // wxLuaDebugServerThread ! // ---------------------------------------------------------------------------- ! ! void *wxLuaDebugServerThread::Entry() { ! m_pServer->ThreadFunction(); ! return 0; } --- 114,138 ---- } ! wxLuaDebugData wxLuaDebugServerInterface::EnumerateStack() { m_pServer->EnumerateStack(); ! return wxLuaDebugData(); } ! wxLuaDebugData wxLuaDebugServerInterface::EnumerateStackEntry(int nEntry) { m_pServer->EnumerateStackEntry(nEntry); ! return wxLuaDebugData(); } ! wxLuaDebugData wxLuaDebugServerInterface::EnumerateTable(int nRef, int nEntry, long data) { m_pServer->EnumerateTable(nRef, nEntry, data); ! return wxLuaDebugData(); } ! wxLuaDebugData wxLuaDebugServerInterface::GetGlobalData() { ! return wxLuaDebugData(); } *************** *** 565,573 **** case wxLUA_EVENT_DEBUG_STACK_ENUM: { ! wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENUM); ! if (pDebugData != NULL) ! debugEvent.SetDebugData(-1, pDebugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 549,556 ---- case wxLUA_EVENT_DEBUG_STACK_ENUM: { ! wxLuaDebugData debugData = GetSocketBase()->ReadDebugData(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENUM); ! debugEvent.SetDebugData(-1, debugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 575,584 **** case wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM: { ! int stackRef = GetSocketBase()->ReadInt(); ! wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM); ! if (pDebugData != NULL) ! debugEvent.SetDebugData(stackRef, pDebugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 558,566 ---- case wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM: { ! int stackRef = GetSocketBase()->ReadInt(); ! wxLuaDebugData debugData = GetSocketBase()->ReadDebugData(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM); ! debugEvent.SetDebugData(stackRef, debugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 586,595 **** case wxLUA_EVENT_DEBUG_TABLE_ENUM: { ! long itemNode = GetSocketBase()->ReadLong(); ! wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_TABLE_ENUM); ! if (pDebugData != NULL) ! debugEvent.SetDebugData(itemNode, pDebugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 568,576 ---- case wxLUA_EVENT_DEBUG_TABLE_ENUM: { ! long itemNode = GetSocketBase()->ReadLong(); ! wxLuaDebugData debugData = GetSocketBase()->ReadDebugData(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_TABLE_ENUM); ! debugEvent.SetDebugData(itemNode, debugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 632,635 **** --- 613,626 ---- // ---------------------------------------------------------------------------- + // wxLuaDebugServer::LuaThread + // ---------------------------------------------------------------------------- + + void *wxLuaDebugServer::LuaThread::Entry() + { + m_pServer->ThreadFunction(); + return 0; + } + + // ---------------------------------------------------------------------------- // wxLuaDebugServer // ---------------------------------------------------------------------------- *************** *** 695,699 **** if (!m_fShutdown) { ! m_pThread = new wxLuaDebugServerThread(this); return ((m_pThread != NULL) && --- 686,690 ---- if (!m_fShutdown) { ! m_pThread = new wxLuaDebugServer::LuaThread(this); return ((m_pThread != NULL) && Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxlsock.cpp 6 Sep 2006 22:23:20 -0000 1.9 --- wxlsock.cpp 7 Sep 2006 22:42:19 -0000 1.10 *************** *** 99,105 **** } ! wxLuaDebugData *wxLuaSocketBase::ReadDebugData() { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); try --- 99,105 ---- } ! wxLuaDebugData wxLuaSocketBase::ReadDebugData() { ! wxLuaDebugData debugData; try *************** *** 140,144 **** nIndex, fExpanded); ! pSortedList->Add(pItem); delete[] pBuffer; --- 140,144 ---- nIndex, fExpanded); ! debugData.GetDataArray().Add(pItem); delete[] pBuffer; *************** *** 148,156 **** catch(wxLuaSocketException & /*e*/) { - delete pSortedList; - pSortedList = NULL; } ! return pSortedList; } --- 148,154 ---- catch(wxLuaSocketException & /*e*/) { } ! return debugData; } *************** *** 215,222 **** } ! bool wxLuaSocketBase::WriteDebugData(const wxLuaDebugData *pSortedList) { bool result = false; ! int idx, idxMax = pSortedList->Count(); Write((const char *) &idxMax, sizeof(int)); --- 213,220 ---- } ! bool wxLuaSocketBase::WriteDebugData(const wxLuaDebugData& debugData) { bool result = false; ! int idx, idxMax = debugData.GetDataArray().Count(); Write((const char *) &idxMax, sizeof(int)); *************** *** 226,230 **** try { ! const wxLuaDebugDataItem *item = pSortedList->Item(idx); int nameLength = item->GetName().Length() + 1; --- 224,228 ---- try { ! const wxLuaDebugDataItem *item = debugData.GetDataArray().Item(idx); int nameLength = item->GetName().Length() + 1; Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxldtarg.cpp 6 Sep 2006 05:33:09 -0000 1.18 --- wxldtarg.cpp 7 Sep 2006 22:42:19 -0000 1.19 *************** *** 40,43 **** --- 40,53 ---- // ---------------------------------------------------------------------------- + // wxLuaDebugTarget::LuaThread + // ---------------------------------------------------------------------------- + + void *wxLuaDebugTarget::LuaThread::Entry() + { + m_pTarget->ThreadFunction(); + return 0; + } + + // ---------------------------------------------------------------------------- // wxLuaDebugTarget - Handles Debugger/Debuggee IO // ---------------------------------------------------------------------------- *************** *** 49,55 **** m_portNumber(portNumber), m_serverName(serverName), - #if wxCHECK_VERSION(2, 3, 3) m_debugCondition(m_debugMutex), - #endif m_forceBreak(false), m_resetRequested(false), --- 59,63 ---- *************** *** 59,65 **** m_fErrorsSeen(false), m_nFramesUntilBreak(0), - #if wxCHECK_VERSION(2, 3, 3) m_runCondition(m_runMutex), - #endif m_pThread(NULL) { --- 67,71 ---- *************** *** 163,181 **** } - void *wxLuaDebugTarget::LuaThread::Entry() - { - m_pTarget->ThreadFunction(); - return 0; - } - - void wxLuaDebugTarget::LuaThread::OnExit() - { - } - - bool wxLuaDebugTarget::LuaThread::TestDestroy() - { - return wxThread::TestDestroy(); - } - void wxLuaDebugTarget::ThreadFunction() { --- 169,172 ---- *************** *** 197,220 **** { wxLuaDebugCommands_Type debugCommand = (wxLuaDebugCommands_Type)m_clientSocket.ReadByte(); ! switch(debugCommand) { case wxLUA_CMD_ADD_BREAKPOINT: ! { ! wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); ! AddBreakPoint(fileName, lineNumber); ! } break; ! case wxLUA_CMD_REMOVE_BREAKPOINT: ! { ! wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); ! RemoveBreakPoint(fileName, lineNumber); ! } break; ! case wxLUA_CMD_CLEAR_ALL_BREAKPOINTS: ClearAllBreakPoints(); --- 188,209 ---- { wxLuaDebugCommands_Type debugCommand = (wxLuaDebugCommands_Type)m_clientSocket.ReadByte(); ! switch (debugCommand) { case wxLUA_CMD_ADD_BREAKPOINT: ! { ! wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); ! AddBreakPoint(fileName, lineNumber); break; ! } case wxLUA_CMD_REMOVE_BREAKPOINT: ! { ! wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); ! RemoveBreakPoint(fileName, lineNumber); break; ! } case wxLUA_CMD_CLEAR_ALL_BREAKPOINTS: ClearAllBreakPoints(); *************** *** 222,233 **** case wxLUA_CMD_RUN_BUFFER: ! { ! wxString fileName = m_clientSocket.ReadString(); ! wxString buffer = m_clientSocket.ReadString(); ! Run(fileName, buffer); ! } break; ! case wxLUA_CMD_DEBUG_STEP: Step(); --- 211,221 ---- case wxLUA_CMD_RUN_BUFFER: ! { ! wxString fileName = m_clientSocket.ReadString(); ! wxString buffer = m_clientSocket.ReadString(); ! Run(fileName, buffer); break; ! } case wxLUA_CMD_DEBUG_STEP: Step(); *************** *** 255,273 **** case wxLUA_CMD_ENUMERATE_STACK_ENTRY: ! { ! int stackRef = m_clientSocket.ReadInt(); ! EnumerateStackEntry(stackRef); ! } break; ! case wxLUA_CMD_ENUMERATE_TABLE_REF: ! { ! int tableRef = m_clientSocket.ReadInt(); ! int index = m_clientSocket.ReadInt(); ! long itemNode = m_clientSocket.ReadLong(); ! EnumerateTable(tableRef, index, itemNode); ! } break; ! case wxLUA_CMD_RESET: Reset(); --- 243,259 ---- case wxLUA_CMD_ENUMERATE_STACK_ENTRY: ! { ! int stackRef = m_clientSocket.ReadInt(); ! EnumerateStackEntry(stackRef); break; ! } case wxLUA_CMD_ENUMERATE_TABLE_REF: ! { ! int tableRef = m_clientSocket.ReadInt(); ! int index = m_clientSocket.ReadInt(); ! long itemNode = m_clientSocket.ReadLong(); ! EnumerateTable(tableRef, index, itemNode); break; ! } case wxLUA_CMD_RESET: Reset(); *************** *** 275,296 **** case wxLUA_CMD_EVALUATE_EXPR: ! { ! int exprRef = m_clientSocket.ReadInt(); ! wxString buffer = m_clientSocket.ReadString(); ! EvaluateExpr(exprRef, buffer); ! } break; ! case wxLUA_CMD_CLEAR_DEBUG_REFERENCES: { ! size_t idx, idxMax = m_references.GetCount(); ! for (idx = 0; idx < idxMax; ++idx) ! { ! int iItem = m_references.Item(idx); ! m_wxlState.tremove(iItem); ! } } break; ! case wxLUA_CMD_DISABLE_BREAKPOINT: break; --- 261,280 ---- case wxLUA_CMD_EVALUATE_EXPR: ! { ! int exprRef = m_clientSocket.ReadInt(); ! wxString buffer = m_clientSocket.ReadString(); ! EvaluateExpr(exprRef, buffer); break; ! } case wxLUA_CMD_CLEAR_DEBUG_REFERENCES: + { + size_t idx, idxMax = m_references.GetCount(); + for (idx = 0; idx < idxMax; ++idx) { ! int iItem = m_references.Item(idx); ! m_wxlState.tremove(iItem); } break; ! } case wxLUA_CMD_DISABLE_BREAKPOINT: break; *************** *** 309,318 **** { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! ! wxString breakPoint; ! breakPoint = breakPoint.Format(wxT("%u:"), lineNumber) + fileName; ! ! m_breakPointList.Add(breakPoint); ! return false; } --- 293,297 ---- { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! m_breakPointList.Add(wxString::Format(wxT("%u:"), lineNumber) + fileName); return false; } *************** *** 321,330 **** { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! ! wxString breakPoint; ! breakPoint = breakPoint.Format(wxT("%u:"), lineNumber) + fileName; ! ! m_breakPointList.Remove(breakPoint); ! return true; } --- 300,304 ---- { wxCriticalSectionLocker locker(m_breakPointListCriticalSection); ! m_breakPointList.Remove(wxString::Format(wxT("%u:"), lineNumber) + fileName); return true; } *************** *** 420,458 **** bool wxLuaDebugTarget::EnumerateStack() { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList == NULL) ! return false; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! pSortedList->EnumerateStack(m_wxlState); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return NotifyStackEnumeration(pSortedList); } bool wxLuaDebugTarget::EnumerateStackEntry(int stackRef) { ! wxLuaDebugData *pSortedList = new wxLuaDebugData; ! if (pSortedList == NULL) ! return false; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! pSortedList->EnumerateStackEntry(m_wxlState, stackRef, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return NotifyStackEntryEnumeration(stackRef, pSortedList); } bool wxLuaDebugTarget::EnumerateTable(int tableRef, int nIndex, long nItemNode) { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! if (pSortedList == NULL) ! return false; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! pSortedList->EnumerateTable(m_wxlState, tableRef, nIndex, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return NotifyTableEnumeration(nItemNode, pSortedList); } --- 394,426 ---- bool wxLuaDebugTarget::EnumerateStack() { ! wxLuaDebugData debugData; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! debugData.EnumerateStack(m_wxlState); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return NotifyStackEnumeration(debugData); } bool wxLuaDebugTarget::EnumerateStackEntry(int stackRef) { ! wxLuaDebugData debugData; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! debugData.EnumerateStackEntry(m_wxlState, stackRef, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return NotifyStackEntryEnumeration(stackRef, debugData); } bool wxLuaDebugTarget::EnumerateTable(int tableRef, int nIndex, long nItemNode) { ! wxLuaDebugData debugData; wxLuaHandler::GetHandler().EnterLuaCriticalSection(); ! debugData.EnumerateTable(m_wxlState, tableRef, nIndex, m_references); wxLuaHandler::GetHandler().LeaveLuaCriticalSection(); ! return NotifyTableEnumeration(nItemNode, debugData); } *************** *** 645,662 **** } ! bool wxLuaDebugTarget::NotifyStackEnumeration(wxLuaDebugData *pDebugData) { if (WaitForConnect()) { m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); ! m_clientSocket.WriteDebugData(pDebugData); return true; } ! delete pDebugData; return false; } ! bool wxLuaDebugTarget::NotifyStackEntryEnumeration(int entryRef, ! wxLuaDebugData *pDebugData) { if (WaitForConnect()) --- 613,630 ---- } ! bool wxLuaDebugTarget::NotifyStackEnumeration(const wxLuaDebugData& debugData) { if (WaitForConnect()) { m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); ! m_clientSocket.WriteDebugData(debugData); return true; } ! return false; } ! bool wxLuaDebugTarget::NotifyStackEntryEnumeration(int entryRef, ! const wxLuaDebugData& debugData) { if (WaitForConnect()) *************** *** 664,676 **** m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); m_clientSocket.WriteInt(entryRef); ! m_clientSocket.WriteDebugData(pDebugData); return true; } ! delete pDebugData; return false; } bool wxLuaDebugTarget::NotifyTableEnumeration(long itemNode, ! wxLuaDebugData *pDebugData) { if (WaitForConnect()) --- 632,644 ---- m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); m_clientSocket.WriteInt(entryRef); ! m_clientSocket.WriteDebugData(debugData); return true; } ! return false; } bool wxLuaDebugTarget::NotifyTableEnumeration(long itemNode, ! const wxLuaDebugData& debugData) { if (WaitForConnect()) *************** *** 678,685 **** m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); m_clientSocket.WriteLong(itemNode); ! m_clientSocket.WriteDebugData(pDebugData); return true; } ! delete pDebugData; return false; } --- 646,653 ---- m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); m_clientSocket.WriteLong(itemNode); ! m_clientSocket.WriteDebugData(debugData); return true; } ! return false; } *************** *** 741,754 **** { case DEBUG_STEP: ! { ! int lineNumber = 0; ! wxString fileName = GetDebugInfo(lineNumber); ! if (NotifyBreak(fileName, lineNumber)) ! fWait = true; ! } ! break; case DEBUG_STEPOVER: if (m_nFramesUntilBreak == 0) { --- 709,723 ---- { case DEBUG_STEP: ! { ! int lineNumber = 0; ! wxString fileName = GetDebugInfo(lineNumber); ! if (NotifyBreak(fileName, lineNumber)) ! fWait = true; + break; + } case DEBUG_STEPOVER: + { if (m_nFramesUntilBreak == 0) { *************** *** 760,775 **** } break; ! case DEBUG_GO: default: ! { ! int lineNumber = 0; ! wxString fileName = GetDebugInfo(lineNumber); - if (AtBreakPoint(fileName, lineNumber) && - NotifyBreak(fileName, lineNumber)) - fWait = true; - } break; } } --- 729,745 ---- } break; ! } case DEBUG_GO: default: ! { ! int lineNumber = 0; ! wxString fileName = GetDebugInfo(lineNumber); ! ! if (AtBreakPoint(fileName, lineNumber) && ! NotifyBreak(fileName, lineNumber)) ! fWait = true; break; + } } } |
From: John L. <jr...@us...> - 2006-09-07 22:42:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4262/wxLua/modules/wxluasocket/include Modified Files: dservice.h wxldserv.h wxldtarg.h wxlsock.h wxluasocket_bind.h Log Message: make wxLuaDebugData derived from wxObject and ref counted so we don't have to remember to delete it or check NULL make the wxTread in wxLuaDebugServer part of the class as wxLuaDebugTarget does Index: dservice.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/dservice.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dservice.h 6 Sep 2006 22:23:19 -0000 1.14 --- dservice.h 7 Sep 2006 22:42:19 -0000 1.15 *************** *** 239,245 **** bool NotifyError(const wxString &errorMsg); bool NotifyExit(); ! bool NotifyStackEnumeration(wxLuaDebugData *pDebugData); ! bool NotifyStackEntryEnumeration(int stackRef, wxLuaDebugData *pDebugData); ! bool NotifyTableEnumeration(long itemNode, wxLuaDebugData *pDebugData); bool NotifyEvaluateExpr(int exprRef, const wxString &strResult); bool NotifyBreakpointAdded(wxLuaBreakPoint& breakPoint, wxLuaDebugSocket* debugSocket = NULL); --- 239,245 ---- bool NotifyError(const wxString &errorMsg); bool NotifyExit(); ! bool NotifyStackEnumeration(const wxLuaDebugData& debugData); ! bool NotifyStackEntryEnumeration(int stackRef, const wxLuaDebugData& debugData); ! bool NotifyTableEnumeration(long itemNode, const wxLuaDebugData& debugData); bool NotifyEvaluateExpr(int exprRef, const wxString &strResult); bool NotifyBreakpointAdded(wxLuaBreakPoint& breakPoint, wxLuaDebugSocket* debugSocket = NULL); Index: wxlsock.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlsock.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxlsock.h 7 Sep 2006 04:20:54 -0000 1.9 --- wxlsock.h 7 Sep 2006 22:42:19 -0000 1.10 *************** *** 70,74 **** unsigned long ReadULong(); wxString ReadString(); ! wxLuaDebugData *ReadDebugData(); // Write data to the socket, calls virtual void Write(...) --- 70,74 ---- unsigned long ReadULong(); wxString ReadString(); ! wxLuaDebugData ReadDebugData(); // Write data to the socket, calls virtual void Write(...) *************** *** 82,86 **** bool WriteULong(unsigned long value); bool WriteString(const wxString &value); ! bool WriteDebugData(const wxLuaDebugData *pData); }; --- 82,86 ---- bool WriteULong(unsigned long value); bool WriteString(const wxString &value); ! bool WriteDebugData(const wxLuaDebugData& debugData); }; Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxluasocket_bind.h 28 Aug 2006 05:26:21 -0000 1.4 --- wxluasocket_bind.h 7 Sep 2006 22:42:19 -0000 1.5 *************** *** 57,61 **** // ---------------------------------------------------------------------------- - extern WXDLLIMPEXP_DATA_WXLUASOCKET(int) s_wxluatag_wxLuaDebugData; extern WXDLLIMPEXP_DATA_WXLUASOCKET(int) s_wxluatag_wxLuaDebugEvent; extern WXDLLIMPEXP_DATA_WXLUASOCKET(int) s_wxluatag_wxLuaDebugServer; --- 57,60 ---- *************** *** 67,72 **** // ---------------------------------------------------------------------------- - extern WXDLLIMPEXP_WXLUASOCKET WXLUAMETHOD* wxLuaDebugData_methods; - extern WXDLLIMPEXP_DATA_WXLUASOCKET(int) wxLuaDebugData_methodCount; extern WXDLLIMPEXP_WXLUASOCKET WXLUAMETHOD* wxLuaDebugEvent_methods; extern WXDLLIMPEXP_DATA_WXLUASOCKET(int) wxLuaDebugEvent_methodCount; --- 66,69 ---- Index: wxldtarg.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldtarg.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wxldtarg.h 6 Sep 2006 22:23:20 -0000 1.13 --- wxldtarg.h 7 Sep 2006 22:42:19 -0000 1.14 *************** *** 55,60 **** class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugTarget : public wxObject { ! private: ! class LuaThread : public wxThread { --- 55,62 ---- class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugTarget : public wxObject { ! protected: ! // ----------------------------------------------------------------------- ! // wxLuaDebugTarget::LuaThread - a wxThread for the wxLuaDebugTarget ! // ----------------------------------------------------------------------- class LuaThread : public wxThread { *************** *** 62,84 **** LuaThread(wxLuaDebugTarget *pTarget) : wxThread(wxTHREAD_JOINABLE), m_pTarget(pTarget) {} - bool TestDestroy(); - - protected: - // thread execution starts here - virtual void *Entry(); - // called when the thread exits - virtual void OnExit(); - - private: wxLuaDebugTarget *m_pTarget; }; public: ! ! wxLuaDebugTarget(const wxLuaState& wxlState, ! const wxString &serverName, ! int portNumber); ! virtual ~wxLuaDebugTarget(); --- 64,77 ---- LuaThread(wxLuaDebugTarget *pTarget) : wxThread(wxTHREAD_JOINABLE), m_pTarget(pTarget) {} + protected: + virtual void *Entry(); // thread execution starts here + virtual void OnExit() {} // called when the thread exits wxLuaDebugTarget *m_pTarget; }; public: ! wxLuaDebugTarget(const wxLuaState& wxlState, const wxString &serverName, ! int portNumber); virtual ~wxLuaDebugTarget(); *************** *** 103,109 **** wxString m_serverName; wxSortedArrayString m_breakPointList; - #if wxCHECK_VERSION(2, 3, 3) wxMutex m_debugMutex; - #endif wxCondition m_debugCondition; wxLuaSocket m_clientSocket; --- 96,100 ---- *************** *** 116,122 **** bool m_fErrorsSeen; int m_nFramesUntilBreak; - #if wxCHECK_VERSION(2, 3, 3) wxMutex m_runMutex; - #endif wxCondition m_runCondition; wxLuaBufferArray m_bufferList; --- 107,111 ---- *************** *** 147,153 **** bool NotifyError(const wxString &errorMsg); bool NotifyExit(); ! bool NotifyStackEnumeration(wxLuaDebugData *pDebugData); ! bool NotifyStackEntryEnumeration(int stackRef, wxLuaDebugData *pDebugData); ! bool NotifyTableEnumeration(long itemNode, wxLuaDebugData *pDebugData); bool NotifyEvaluateExpr(int exprRef, const wxString &strResult); --- 136,142 ---- bool NotifyError(const wxString &errorMsg); bool NotifyExit(); ! bool NotifyStackEnumeration(const wxLuaDebugData& debugData); ! bool NotifyStackEntryEnumeration(int stackRef, const wxLuaDebugData& debugData); ! bool NotifyTableEnumeration(long itemNode, const wxLuaDebugData& debugData); bool NotifyEvaluateExpr(int exprRef, const wxString &strResult); Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxldserv.h 6 Sep 2006 22:23:20 -0000 1.11 --- wxldserv.h 7 Sep 2006 22:42:19 -0000 1.12 *************** *** 76,83 **** virtual ~wxLuaDebugServerInterface(); ! virtual wxLuaDebugData *EnumerateStack(); ! virtual wxLuaDebugData *EnumerateStackEntry(int nEntry); ! virtual wxLuaDebugData *EnumerateTable(int nRef, int nEntry, long data = 0); ! virtual wxLuaDebugData *GetGlobalData(); virtual bool IsDebugServer() const { return true; } --- 76,83 ---- virtual ~wxLuaDebugServerInterface(); ! virtual wxLuaDebugData EnumerateStack(); ! virtual wxLuaDebugData EnumerateStackEntry(int nEntry); ! virtual wxLuaDebugData EnumerateTable(int nRef, int nEntry, long data = 0); ! virtual wxLuaDebugData GetGlobalData(); virtual bool IsDebugServer() const { return true; } *************** *** 88,113 **** // ---------------------------------------------------------------------------- - // wxLuaDebugServerThread - a wxThread for the wxLuaDebugServer - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServerThread : public wxThread - { - public: - wxLuaDebugServerThread(wxLuaDebugServer *pServer) : wxThread(wxTHREAD_JOINABLE) - { - m_pServer = pServer; - } - - protected: - // thread execution starts here - virtual void *Entry(); - // called when the thread exits - virtual void OnExit() {} - - private: - wxLuaDebugServer *m_pServer; - }; - - // ---------------------------------------------------------------------------- // wxLuaDebuggerBase - Debugger interface base class // ---------------------------------------------------------------------------- --- 88,91 ---- *************** *** 155,161 **** class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer : public wxLuaDebuggerBase ! { ! public: wxLuaDebugServer(int portNumber); virtual ~wxLuaDebugServer(); --- 133,154 ---- class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer : public wxLuaDebuggerBase ! { ! protected: ! // ---------------------------------------------------------------------------- ! // wxLuaDebugServer::LuaThread - a wxThread for the wxLuaDebugServer ! // ---------------------------------------------------------------------------- ! class LuaThread : public wxThread ! { ! public: ! LuaThread(wxLuaDebugServer *pServer) : wxThread(wxTHREAD_JOINABLE), ! m_pServer(pServer) {} ! protected: ! virtual void *Entry(); // thread execution starts here ! virtual void OnExit() {} // called when the thread exits + wxLuaDebugServer *m_pServer; + }; + + public: wxLuaDebugServer(int portNumber); virtual ~wxLuaDebugServer(); *************** *** 180,191 **** protected: ! wxLuaSocket *m_serverSocket; ! wxLuaSocket *m_acceptedSocket; ! int m_processID; ! int m_portNumber; ! wxProcess *m_pProcess; ! wxLuaDebugServerThread *m_pThread; ! wxLuaStackDialog *m_pStackDialog; ! bool m_fShutdown; static wxString sm_programName; --- 173,184 ---- protected: ! wxLuaSocket *m_serverSocket; ! wxLuaSocket *m_acceptedSocket; ! int m_processID; ! int m_portNumber; ! wxProcess *m_pProcess; ! LuaThread *m_pThread; ! wxLuaStackDialog *m_pStackDialog; ! bool m_fShutdown; static wxString sm_programName; *************** *** 212,216 **** void SetMessage(const wxString &message); ! void SetDebugData(long nReference, wxLuaDebugData *pDebugData = NULL); int GetLineNumber() const { return m_lineNumber;} --- 205,209 ---- void SetMessage(const wxString &message); ! void SetDebugData(long nReference, const wxLuaDebugData& pDebugData = wxLuaDebugData()); int GetLineNumber() const { return m_lineNumber;} *************** *** 219,223 **** int GetReference() const { return m_nReference; } bool GetEnabledFlag() const { return m_fEnabledFlag; } ! const wxLuaDebugData *GetDebugData() const { return m_pDebugData; } protected: --- 212,216 ---- int GetReference() const { return m_nReference; } bool GetEnabledFlag() const { return m_fEnabledFlag; } ! wxLuaDebugData GetDebugData() const { return m_debugData; } protected: *************** *** 230,234 **** long m_nReference; bool m_fEnabledFlag; ! wxLuaDebugData *m_pDebugData; private: --- 223,227 ---- long m_nReference; bool m_fEnabledFlag; ! wxLuaDebugData m_debugData; private: |
From: John L. <jr...@us...> - 2006-09-07 22:42:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4262/wxLua/modules/wxluadebug/include Modified Files: staktree.h wxldebug.h Log Message: make wxLuaDebugData derived from wxObject and ref counted so we don't have to remember to delete it or check NULL make the wxTread in wxLuaDebugServer part of the class as wxLuaDebugTarget does Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** staktree.h 5 Sep 2006 21:48:11 -0000 1.10 --- staktree.h 7 Sep 2006 22:42:19 -0000 1.11 *************** *** 69,75 **** void SizeWindow(int nWidth, int nHeight); ! void FillStackCombobox(const wxLuaDebugData *pDebugData); ! void FillStackEntry(int nEntry, const wxLuaDebugData *pSortedList); ! void FillTableEntry(wxTreeItemId itemNode, const wxLuaDebugData *pSortedList); void GetDerivedAndTrackedItems(wxRemotelyScrolledTreeCtrl *treeControl, wxTreeItemId rootItem); --- 69,75 ---- void SizeWindow(int nWidth, int nHeight); ! void FillStackCombobox(const wxLuaDebugData& debugData); ! void FillStackEntry(int nEntry, const wxLuaDebugData& debugData); ! void FillTableEntry(wxTreeItemId itemNode, const wxLuaDebugData& debugData); void GetDerivedAndTrackedItems(wxRemotelyScrolledTreeCtrl *treeControl, wxTreeItemId rootItem); Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxldebug.h 4 Sep 2006 18:07:55 -0000 1.20 --- wxldebug.h 7 Sep 2006 22:42:19 -0000 1.21 *************** *** 74,86 **** // ---------------------------------------------------------------------------- ! // wxLuaDebugData - a wxSortedArray of pointers to wxLuaDebugDataItem(s) ! // it has a destructor that deletes them. // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData : public wxLuaDebugDataItemArray { public: wxLuaDebugData(); ! virtual ~wxLuaDebugData(); // fill this with the stack entries for the wxLuaState --- 74,92 ---- // ---------------------------------------------------------------------------- ! // wxLuaDebugData - a wxObject ref counted container for a wxLuaDebugDataItemArray ! // The Ref data is always expected to exist and the destructor deletes the array items ! // This is supposed to be a minimal class so all array operations are though the ! // member functions GetDataArray(). // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData : public wxObject { public: wxLuaDebugData(); ! wxLuaDebugData(const wxLuaDebugData &debugData) { Ref(debugData); } ! ! // Get the data array ! wxLuaDebugDataItemArray& GetDataArray(); ! const wxLuaDebugDataItemArray& GetDataArray() const; // fill this with the stack entries for the wxLuaState *************** *** 103,108 **** static wxString GetUserDataInfo(const wxLuaState& wxlState, int index, bool full = true); ! wxLuaDebugData *Clone() const; static int SortFunction(wxLuaDebugDataItem *elem1, wxLuaDebugDataItem *elem2 ); }; --- 109,130 ---- static wxString GetUserDataInfo(const wxLuaState& wxlState, int index, bool full = true); ! // Make a full copy of the array and return it. ! wxLuaDebugData Copy() const; ! static int SortFunction(wxLuaDebugDataItem *elem1, wxLuaDebugDataItem *elem2 ); + + //------------------------------------------------------------------------- + // operators + bool operator == (const wxLuaDebugData& debugData) const + { return m_refData == debugData.m_refData; } + bool operator != (const wxLuaDebugData& debugData) const + { return m_refData != debugData.m_refData; } + + wxLuaDebugData& operator = (const wxLuaDebugData& debugData) + { + if ( (*this) != debugData ) + Ref(debugData); + return *this; + } }; *************** *** 117,124 **** virtual ~wxLuaInterface(); ! virtual wxLuaDebugData *EnumerateStack(); ! virtual wxLuaDebugData *EnumerateStackEntry(int nEntry); ! virtual wxLuaDebugData *EnumerateTable(int nRef, int nEntry, long data = 0); ! virtual wxLuaDebugData *GetGlobalData(); // allows for this to be subclassed for use with the wxLuaDebugServer --- 139,146 ---- virtual ~wxLuaInterface(); ! virtual wxLuaDebugData EnumerateStack(); ! virtual wxLuaDebugData EnumerateStackEntry(int nEntry); ! virtual wxLuaDebugData EnumerateTable(int nRef, int nEntry, long data = 0); ! virtual wxLuaDebugData GetGlobalData(); // allows for this to be subclassed for use with the wxLuaDebugServer |
From: John L. <jr...@us...> - 2006-09-07 22:42:22
|
Update of /cvsroot/wxlua/wxLua/bindings/wxluasocket In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4262/wxLua/bindings/wxluasocket Modified Files: wxluasocket.i Log Message: make wxLuaDebugData derived from wxObject and ref counted so we don't have to remember to delete it or check NULL make the wxTread in wxLuaDebugServer part of the class as wxLuaDebugTarget does Index: wxluasocket.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluasocket/wxluasocket.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxluasocket.i 9 Jun 2006 03:24:49 -0000 1.2 --- wxluasocket.i 7 Sep 2006 22:42:19 -0000 1.3 *************** *** 42,47 **** // wxLuaDebugData ! %class %noclassinfo wxLuaDebugData ! %endclass //----------------------------------------------------------------------------- --- 42,47 ---- // wxLuaDebugData ! //%class %noclassinfo wxLuaDebugData ! //%endclass //----------------------------------------------------------------------------- *************** *** 63,66 **** wxString GetFileName() const wxString GetMessage() const ! const wxLuaDebugData *GetDebugData() const %endclass --- 63,66 ---- wxString GetFileName() const wxString GetMessage() const ! //const wxLuaDebugData GetDebugData() const %endclass |
From: John L. <jr...@us...> - 2006-09-07 04:20:57
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22903/wxLua/samples Modified Files: editor.wx.lua Log Message: cleanup and formatting in the wxlua editor.wx.lua move SetStackDialog to the wxLuaHandler so it can be used by other programs more easily start work on using the socket code in the wxluaeditor formatting in wxldserv.cpp Index: editor.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/editor.wx.lua,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** editor.wx.lua 25 May 2006 03:55:23 -0000 1.18 --- editor.wx.lua 7 Sep 2006 04:20:54 -0000 1.19 *************** *** 115,138 **** statusBar = frame:CreateStatusBar( 4 ) toolBar = frame:CreateToolBar(wx.wxNO_BORDER + wx.wxTB_FLAT + wx.wxTB_DOCKABLE) -- note: Ususally the bmp size isn't necessary, but the HELP icon is not the right size in MSW local toolBmpSize = toolBar:GetToolBitmapSize() ! toolBar:AddToolSimple(ID_NEW, "New", wx.wxArtProvider_GetBitmap(wx.wxART_NORMAL_FILE, wx.wxART_MENU, toolBmpSize), "Creates an empty document") ! toolBar:AddToolSimple(ID_OPEN, "Open", wx.wxArtProvider_GetBitmap(wx.wxART_FILE_OPEN, wx.wxART_MENU, toolBmpSize), "Opens an existing document") ! toolBar:AddToolSimple(ID_SAVE, "Save", wx.wxArtProvider_GetBitmap(wx.wxART_FILE_SAVE, wx.wxART_MENU, toolBmpSize), "Saves the document") ! toolBar:AddToolSimple(ID_SAVEALL, "Save All", wx.wxArtProvider_GetBitmap(wx.wxART_NEW_DIR, wx.wxART_MENU, toolBmpSize), "Saves all documents") toolBar:AddSeparator() ! toolBar:AddToolSimple(ID_CUT, "Cut", wx.wxArtProvider_GetBitmap(wx.wxART_CUT, wx.wxART_MENU, toolBmpSize), "Cut the selection") ! toolBar:AddToolSimple(ID_COPY, "Copy", wx.wxArtProvider_GetBitmap(wx.wxART_COPY, wx.wxART_MENU, toolBmpSize), "Copy the selection") ! toolBar:AddToolSimple(ID_PASTE, "Paste", wx.wxArtProvider_GetBitmap(wx.wxART_PASTE, wx.wxART_MENU, toolBmpSize), "Paste the clipboard") toolBar:AddSeparator() toolBar:AddToolSimple(ID_UNDO, "Undo", wx.wxArtProvider_GetBitmap(wx.wxART_UNDO, wx.wxART_MENU, toolBmpSize), "Undo last edit") ! toolBar:AddToolSimple(ID_REDO, "Redo", wx.wxArtProvider_GetBitmap(wx.wxART_REDO, wx.wxART_MENU, toolBmpSize), "Redo last undo") toolBar:AddSeparator() toolBar:AddToolSimple(ID_FIND, "Find", wx.wxArtProvider_GetBitmap(wx.wxART_FIND, wx.wxART_MENU, toolBmpSize), "Find text") toolBar:AddToolSimple(ID_REPLACE, "Replace", wx.wxArtProvider_GetBitmap(wx.wxART_FIND_AND_REPLACE, wx.wxART_MENU, toolBmpSize), "Find and replace text") toolBar:AddSeparator() ! toolBar:AddToolSimple(ID_ABOUT, "About", wx.wxArtProvider_GetBitmap(wx.wxART_HELP, wx.wxART_MENU, toolBmpSize), "About wxLua IDE") toolBar:Realize() --- 115,141 ---- statusBar = frame:CreateStatusBar( 4 ) + local status_txt_width = statusBar:GetTextExtent("OVR ") + frame:SetStatusWidths{-1, status_txt_width+4, status_txt_width+4, 150} + frame:SetStatusText("Ready") toolBar = frame:CreateToolBar(wx.wxNO_BORDER + wx.wxTB_FLAT + wx.wxTB_DOCKABLE) -- note: Ususally the bmp size isn't necessary, but the HELP icon is not the right size in MSW local toolBmpSize = toolBar:GetToolBitmapSize() ! toolBar:AddToolSimple(ID_NEW, "New", wx.wxArtProvider_GetBitmap(wx.wxART_NORMAL_FILE, wx.wxART_MENU, toolBmpSize), "Creates an empty document") ! toolBar:AddToolSimple(ID_OPEN, "Open", wx.wxArtProvider_GetBitmap(wx.wxART_FILE_OPEN, wx.wxART_MENU, toolBmpSize), "Opens an existing document") ! toolBar:AddToolSimple(ID_SAVE, "Save", wx.wxArtProvider_GetBitmap(wx.wxART_FILE_SAVE, wx.wxART_MENU, toolBmpSize), "Saves the document") ! toolBar:AddToolSimple(ID_SAVEALL, "Save All", wx.wxArtProvider_GetBitmap(wx.wxART_NEW_DIR, wx.wxART_MENU, toolBmpSize), "Saves all documents") toolBar:AddSeparator() ! toolBar:AddToolSimple(ID_CUT, "Cut", wx.wxArtProvider_GetBitmap(wx.wxART_CUT, wx.wxART_MENU, toolBmpSize), "Cut the selection") ! toolBar:AddToolSimple(ID_COPY, "Copy", wx.wxArtProvider_GetBitmap(wx.wxART_COPY, wx.wxART_MENU, toolBmpSize), "Copy the selection") ! toolBar:AddToolSimple(ID_PASTE, "Paste", wx.wxArtProvider_GetBitmap(wx.wxART_PASTE, wx.wxART_MENU, toolBmpSize), "Paste the clipboard") toolBar:AddSeparator() toolBar:AddToolSimple(ID_UNDO, "Undo", wx.wxArtProvider_GetBitmap(wx.wxART_UNDO, wx.wxART_MENU, toolBmpSize), "Undo last edit") ! toolBar:AddToolSimple(ID_REDO, "Redo", wx.wxArtProvider_GetBitmap(wx.wxART_REDO, wx.wxART_MENU, toolBmpSize), "Redo last undo") toolBar:AddSeparator() toolBar:AddToolSimple(ID_FIND, "Find", wx.wxArtProvider_GetBitmap(wx.wxART_FIND, wx.wxART_MENU, toolBmpSize), "Find text") toolBar:AddToolSimple(ID_REPLACE, "Replace", wx.wxArtProvider_GetBitmap(wx.wxART_FIND_AND_REPLACE, wx.wxART_MENU, toolBmpSize), "Find and replace text") toolBar:AddSeparator() ! toolBar:AddToolSimple(ID_ABOUT, "About", wx.wxArtProvider_GetBitmap(wx.wxART_HELP, wx.wxART_MENU, toolBmpSize), "About wxLua IDE") toolBar:Realize() *************** *** 222,225 **** --- 225,229 ---- end + -- ---------------------------------------------------------------------------- -- Get the current editor page of the notebook or nil if none function getEditor(selection) *************** *** 234,237 **** --- 238,250 ---- end + function setEditorSelection(selection) + local editor = getEditor(selection) + if editor then + editor:SetFocus() + isFileAlteredOnDisk(editor) + end + updateStatusText(editor) + end + -- Update the statusbar text of the frame using the given editor function updateStatusText(editor) *************** *** 261,270 **** end ! function getModTime(filePath) local fileName = wx.wxFileName(filePath) return fileName:GetModificationTime(); end ! function isAlteredOnDisk(editor) local id = editor:GetId() if openDocuments[id] then --- 274,283 ---- end ! function getFileModTime(filePath) local fileName = wx.wxFileName(filePath) return fileName:GetModificationTime(); end ! function isFileAlteredOnDisk(editor) local id = editor:GetId() if openDocuments[id] then *************** *** 275,279 **** if filePath and (string.len(filePath) > 0) then if oldModTime and oldModTime:IsValid() then ! local modTime = getModTime(filePath) if modTime:IsValid() and oldModTime:IsEarlierThan(modTime) then local ret = wx.wxMessageBox(fileName.." has been modified on disk. Do you want to reload it?", --- 288,292 ---- if filePath and (string.len(filePath) > 0) then if oldModTime and oldModTime:IsValid() then ! local modTime = getFileModTime(filePath) if modTime:IsValid() and oldModTime:IsEarlierThan(modTime) then local ret = wx.wxMessageBox(fileName.." has been modified on disk. Do you want to reload it?", *************** *** 299,304 **** end end - else - openDocuments[id].modTime = modTime -- set the time end end --- 312,315 ---- *************** *** 306,331 **** end - function setEditorSelection(selection) - local editor = getEditor(selection) - if editor then - editor:SetFocus() - isAlteredOnDisk(editor) - end - updateStatusText(editor) - end - - function createAutoCompList(key) - --local len = string.len(key) - local userList = {} - for index, value in pairs(wx) do - --if string.sub(index, 1, len) == key then - if string.find(index, key, 1, 1) == 1 then -- perhaps faster? - table.insert(userList, index.." ") - end - end - table.sort(userList) - return table.concat(userList) - end - function setDocumentModified(id, modified, resetModTime) local fileName = openDocuments[id].fileName --- 317,320 ---- *************** *** 340,344 **** openDocuments[id].isModified = nil if resetModTime and filePath and string.len(filePath) > 0 then ! openDocuments[id].modTime = getModTime(filePath) end notebook:SetPageText(openDocuments[id].index, fileName) --- 329,333 ---- openDocuments[id].isModified = nil if resetModTime and filePath and string.len(filePath) > 0 then ! openDocuments[id].modTime = getFileModTime(filePath) end notebook:SetPageText(openDocuments[id].index, fileName) *************** *** 476,480 **** end) ! editor:Connect(wx.wxEVT_STC_MODIFIED, function ( event ) end) editor:Connect(wx.wxEVT_STC_SAVEPOINTREACHED, --- 465,469 ---- end) ! --editor:Connect(wx.wxEVT_STC_MODIFIED, function ( event ) end) editor:Connect(wx.wxEVT_STC_SAVEPOINTREACHED, *************** *** 515,519 **** editor:SetLexer(wx.wxSTC_LEX_LUA) ! -- Note: these keywords are shameless ripped from scite 1.68 editor:SetKeyWords(0, [[and break do else elseif end false for function if --- 504,508 ---- editor:SetLexer(wx.wxSTC_LEX_LUA) ! -- Note: these keywords are shamelessly ripped from scite 1.68 editor:SetKeyWords(0, [[and break do else elseif end false for function if *************** *** 556,560 **** editor:SetKeyWords(5, table.concat(wxkeywords)) - else editor:SetLexer(wx.wxSTC_LEX_NULL) --- 545,548 ---- *************** *** 563,566 **** --- 551,567 ---- end + function createAutoCompList(key) + --local len = string.len(key) + local userList = {} + for index, value in pairs(wx) do + --if string.sub(index, 1, len) == key then + if string.find(index, key, 1, 1) == 1 then -- perhaps faster? + table.insert(userList, index.." ") + end + end + table.sort(userList) + return table.concat(userList) + end + menuBar = wx.wxMenuBar() fileMenu = wx.wxCreateMenu{ *************** *** 612,616 **** openDocuments[id].filePath = filePath openDocuments[id].fileName = fileName ! openDocuments[id].modTime = getModTime(filePath) notebook:SetPageText(openDocuments[id].index, fileName) saved = 1 --- 613,617 ---- openDocuments[id].filePath = filePath openDocuments[id].fileName = fileName ! openDocuments[id].modTime = getFileModTime(filePath) notebook:SetPageText(openDocuments[id].index, fileName) saved = 1 *************** *** 864,873 **** end ! function enableMenuItem( event ) local editor = getEditor() event:Enable(editor ~= nil) end ! function findSelectedItem() local count = watchListCtrl:GetSelectedItemCount() if count > 0 then --- 865,874 ---- end ! function enableEditorMenuItem( event ) local editor = getEditor() event:Enable(editor ~= nil) end ! function findSelectedWatchItem() local count = watchListCtrl:GetSelectedItemCount() if count > 0 then *************** *** 956,960 **** watchWindow:Connect(ID_EDITWATCH, wx.wxEVT_COMMAND_MENU_SELECTED, function ( event ) ! local row = findSelectedItem() if row >= 0 then watchListCtrl:EditLabel(row) --- 957,961 ---- watchWindow:Connect(ID_EDITWATCH, wx.wxEVT_COMMAND_MENU_SELECTED, function ( event ) ! local row = findSelectedWatchItem() if row >= 0 then watchListCtrl:EditLabel(row) *************** *** 968,972 **** watchWindow:Connect(ID_REMOVEWATCH, wx.wxEVT_COMMAND_MENU_SELECTED, function ( event ) ! local row = findSelectedItem() if row >= 0 then watchListCtrl:DeleteItem(row) --- 969,973 ---- watchWindow:Connect(ID_REMOVEWATCH, wx.wxEVT_COMMAND_MENU_SELECTED, function ( event ) ! local row = findSelectedWatchItem() if row >= 0 then watchListCtrl:DeleteItem(row) *************** *** 1062,1066 **** frame:Connect(ID_CUT, wx.wxEVT_UPDATE_UI, function(event) ! enableMenuItem(event) end) --- 1063,1067 ---- frame:Connect(ID_CUT, wx.wxEVT_UPDATE_UI, function(event) ! enableEditorMenuItem(event) end) *************** *** 1072,1076 **** frame:Connect(ID_COPY, wx.wxEVT_UPDATE_UI, function(event) ! enableMenuItem(event) end) --- 1073,1077 ---- frame:Connect(ID_COPY, wx.wxEVT_UPDATE_UI, function(event) ! enableEditorMenuItem(event) end) *************** *** 1102,1106 **** frame:Connect(ID_CLEAR, wx.wxEVT_UPDATE_UI, function(event) ! enableMenuItem(event) end) --- 1103,1107 ---- frame:Connect(ID_CLEAR, wx.wxEVT_UPDATE_UI, function(event) ! enableEditorMenuItem(event) end) *************** *** 1112,1116 **** frame:Connect(ID_SELECTALL, wx.wxEVT_UPDATE_UI, function(event) ! enableMenuItem(event) end) --- 1113,1117 ---- frame:Connect(ID_SELECTALL, wx.wxEVT_UPDATE_UI, function(event) ! enableEditorMenuItem(event) end) *************** *** 1134,1138 **** frame:Connect(ID_AUTOCOMPLETE, wx.wxEVT_UPDATE_UI, function(event) ! enableMenuItem(event) end) --- 1135,1139 ---- frame:Connect(ID_AUTOCOMPLETE, wx.wxEVT_UPDATE_UI, function(event) ! enableEditorMenuItem(event) end) *************** *** 1153,1157 **** frame:Connect(ID_CLEAROUTPUT, wx.wxEVT_UPDATE_UI, function(event) ! enableMenuItem(event) end) --- 1154,1158 ---- frame:Connect(ID_CLEAROUTPUT, wx.wxEVT_UPDATE_UI, function(event) ! enableEditorMenuItem(event) end) *************** *** 1184,1188 **** findMenu = wx.wxCreateMenu{ ! { ID_FIND, "&Find\tCtrl-F", "Find the specified text" }, { ID_FINDNEXT, "Find &Next\tF3", "Find the next occurrence of the specified text" }, { ID_FINDPREV, "Find &Previous\tShift-F3", "Repeat the search backwards in the file" }, --- 1185,1189 ---- findMenu = wx.wxCreateMenu{ ! { ID_FIND, "&Find\tCtrl-F", "Find the specified text" }, { ID_FINDNEXT, "Find &Next\tF3", "Find the next occurrence of the specified text" }, { ID_FINDPREV, "Find &Previous\tShift-F3", "Repeat the search backwards in the file" }, *************** *** 1407,1411 **** frame:Connect(ID_FIND, wx.wxEVT_UPDATE_UI, function ( event ) ! enableMenuItem(event) end) --- 1408,1412 ---- frame:Connect(ID_FIND, wx.wxEVT_UPDATE_UI, function ( event ) ! enableEditorMenuItem(event) end) *************** *** 1438,1442 **** frame:Connect(ID_REPLACE, wx.wxEVT_UPDATE_UI, function ( event ) ! enableMenuItem(event) end) --- 1439,1443 ---- frame:Connect(ID_REPLACE, wx.wxEVT_UPDATE_UI, function ( event ) ! enableEditorMenuItem(event) end) *************** *** 1457,1484 **** frame:Connect(ID_GOTOLINE, wx.wxEVT_UPDATE_UI, function ( event ) ! enableMenuItem(event) end) - --[[ - function layoutChildren(event) - if toolBar then - local x, y = frame:GetClientSize() - - if wx.__WXMSW__ then - toolBar:SetSize(x, -1) - else - toolBar:SetSize(x, 34) - end - toolBar:Move(0, 0) - - local xoffset, yoffset = toolBar:GetSize() - - splitter:SetDimensions(0, yoffset, x, y - yoffset) - else - event:Skip() - end - end - -- FIXME frame:CreateToolBar lays it out correctly now - --frame:Connect(wx.wxEVT_SIZE, layoutChildren) - ]] function closeWindow(event) --- 1458,1463 ---- frame:Connect(ID_GOTOLINE, wx.wxEVT_UPDATE_UI, function ( event ) ! enableEditorMenuItem(event) end) function closeWindow(event) *************** *** 1535,1539 **** frame:Connect(ID_TOGGLEBREAKPOINT, wx.wxEVT_UPDATE_UI, function(event) ! enableMenuItem(event) end) --- 1514,1518 ---- frame:Connect(ID_TOGGLEBREAKPOINT, wx.wxEVT_UPDATE_UI, function(event) ! enableEditorMenuItem(event) end) *************** *** 1555,1570 **** frame:Connect(ID_RUN, wx.wxEVT_COMMAND_MENU_SELECTED, function ( event ) ! -- FIXME - I don't understand why you would would want to run *all* the notebook pages? --[[ ! local fileList = {} ! saveAll() ! for id, document in pairs(openDocuments) do ! local filePath = document.filePath ! if filePath == nil then ! return ! end ! table.insert(fileList, ' "'..filePath..'"') ! end ! local cmd = '"'..programName..'" '..table.concat(fileList) ]] local editor = getEditor(); --- 1534,1549 ---- frame:Connect(ID_RUN, wx.wxEVT_COMMAND_MENU_SELECTED, function ( event ) ! -- FIXME - I don't understand why you would would want to run *all* the notebook pages? --[[ ! local fileList = {} ! saveAll() ! for id, document in pairs(openDocuments) do ! local filePath = document.filePath ! if filePath == nil then ! return ! end ! table.insert(fileList, ' "'..filePath..'"') ! end ! local cmd = '"'..programName..'" '..table.concat(fileList) ]] local editor = getEditor(); *************** *** 1608,1612 **** frame:Connect(ID_COMPILE, wx.wxEVT_UPDATE_UI, function ( event ) ! enableMenuItem(event) end) --- 1587,1591 ---- frame:Connect(ID_COMPILE, wx.wxEVT_UPDATE_UI, function ( event ) ! enableEditorMenuItem(event) end) *************** *** 1740,1744 **** end) ! editorApp:Connect(-1, wx.wxEVT_WXLUA_DEBUG_CLIENT_CONNECTED, function (event) if debugServer then --- 1719,1723 ---- end) ! editorApp:Connect(wx.wxID_ANY, wx.wxEVT_WXLUA_DEBUG_CLIENT_CONNECTED, function (event) if debugServer then *************** *** 1767,1771 **** end ! editorApp:Connect(-1, wx.wxEVT_WXLUA_DEBUG_BREAK, function (event) if exitingProgram then return end --- 1746,1750 ---- end ! editorApp:Connect(wx.wxID_ANY, wx.wxEVT_WXLUA_DEBUG_BREAK, function (event) if exitingProgram then return end *************** *** 1842,1856 **** end ! editorApp:Connect(-1, wx.wxEVT_WXLUA_DEBUG_PRINT, function (event) displayOutput(event:GetMessage().."\n") end) ! editorApp:Connect(-1, wx.wxEVT_WXLUA_DEBUG_ERROR, function (event) displayOutput(event:GetMessage().."\n") end) ! editorApp:Connect(-1, wx.wxEVT_WXLUA_DEBUG_EXIT, function (event) for id, document in pairs(openDocuments) do --- 1821,1835 ---- end ! editorApp:Connect(wx.wxID_ANY, wx.wxEVT_WXLUA_DEBUG_PRINT, function (event) displayOutput(event:GetMessage().."\n") end) ! editorApp:Connect(wx.wxID_ANY, wx.wxEVT_WXLUA_DEBUG_ERROR, function (event) displayOutput(event:GetMessage().."\n") end) ! editorApp:Connect(wx.wxID_ANY, wx.wxEVT_WXLUA_DEBUG_EXIT, function (event) for id, document in pairs(openDocuments) do *************** *** 1869,1873 **** end) ! editorApp:Connect(-1, wx.wxEVT_WXLUA_DEBUG_EVALUATE_EXPR, function (event) if watchListCtrl then --- 1848,1852 ---- end) ! editorApp:Connect(wx.wxID_ANY, wx.wxEVT_WXLUA_DEBUG_EVALUATE_EXPR, function (event) if watchListCtrl then *************** *** 1953,1958 **** frame:Connect(ID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, displayAbout) - frame:SetStatusWidths{-1, 29, 29, 150} - frame:SetStatusText("Ready") frame:SetMenuBar(menuBar) --- 1932,1935 ---- |
From: John L. <jr...@us...> - 2006-09-07 04:20:57
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22903/wxLua/modules/wxluasocket/include Modified Files: wxlhandl.h wxlsock.h Log Message: cleanup and formatting in the wxlua editor.wx.lua move SetStackDialog to the wxLuaHandler so it can be used by other programs more easily start work on using the socket code in the wxluaeditor formatting in wxldserv.cpp Index: wxlhandl.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlhandl.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxlhandl.h 6 Sep 2006 05:33:08 -0000 1.7 --- wxlhandl.h 7 Sep 2006 04:20:54 -0000 1.8 *************** *** 35,39 **** virtual bool ProcessEvent(wxEvent& event) = 0; virtual void DisplayError(const wxString &strError) const = 0; ! virtual void SetStackDialog(wxLuaStackDialog *pStackDialog) = 0; void EnterLuaCriticalSection() { m_luaCriticalSection.Enter(); } --- 35,41 ---- virtual bool ProcessEvent(wxEvent& event) = 0; virtual void DisplayError(const wxString &strError) const = 0; ! ! void SetStackDialog(wxLuaStackDialog *stackDialog) { m_stackDialog = stackDialog; } ! wxLuaStackDialog* GetStackDialog() { return m_stackDialog; } void EnterLuaCriticalSection() { m_luaCriticalSection.Enter(); } *************** *** 45,48 **** --- 47,52 ---- protected: + wxLuaStackDialog *m_stackDialog; + static wxLuaHandler* sm_luaHandler; wxCriticalSection m_luaCriticalSection; Index: wxlsock.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlsock.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxlsock.h 6 Sep 2006 22:23:20 -0000 1.8 --- wxlsock.h 7 Sep 2006 04:20:54 -0000 1.9 *************** *** 101,105 **** { public: - // Accepted socket constructor wxLuaAcceptedSocket(socket_type socket, sockaddr_in address) : m_sock(socket), m_addr(address) {} --- 101,104 ---- |
From: John L. <jr...@us...> - 2006-09-07 04:20:57
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22903/wxLua/apps/wxluaedit/src Modified Files: wxluaedit.cpp Log Message: cleanup and formatting in the wxlua editor.wx.lua move SetStackDialog to the wxLuaHandler so it can be used by other programs more easily start work on using the socket code in the wxluaeditor formatting in wxldserv.cpp Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxluaedit.cpp 28 Aug 2006 05:26:19 -0000 1.21 --- wxluaedit.cpp 7 Sep 2006 04:20:54 -0000 1.22 *************** *** 27,35 **** #include "wxledit.h" // Declare the binding initialization functions as extern so we don't have to // #include the binding header for simplicity. extern bool wxLuaBinding_wx_init(); extern bool wxLuaBinding_wxstc_init(); ! //extern bool wxLuaBinding_wxluasocket_init(); // ---------------------------------------------------------------------------- --- 27,44 ---- #include "wxledit.h" + #include "wxluasocket/include/wxldserv.h" + #include "wxluasocket/include/wxldtarg.h" + #include "wxluasocket/include/wxlhandl.h" + #include "wxluadebug/include/staktree.h" + // Declare the binding initialization functions as extern so we don't have to // #include the binding header for simplicity. extern bool wxLuaBinding_wx_init(); extern bool wxLuaBinding_wxstc_init(); ! extern bool wxLuaBinding_wxluasocket_init(); ! ! class LuaHandler; ! ! wxWindowID ID_WXLUASTATE_DEBUG = 200; // ---------------------------------------------------------------------------- *************** *** 44,47 **** --- 53,62 ---- wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP }, + { wxCMD_LINE_OPTION, wxT("d"), wxT("debuggee"), wxT("run as debuggee, internal use"), + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + + // { wxCMD_LINE_OPTION, wxT("r"), wxT("run"), wxT("run wxLua program w/ command line args"), + // wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL|wxCMD_LINE_NEEDS_SEPARATOR }, + // filenames to open in the editor { wxCMD_LINE_PARAM, wxEmptyString, wxEmptyString, *************** *** 67,70 **** --- 82,117 ---- virtual bool OnInit(); + virtual int OnExit(); + + void OnLua(wxLuaEvent &event); + void OnDebugStackEnum(wxLuaDebugEvent &event); + void OnDebugTableEnum(wxLuaDebugEvent &event); + void OnDebugStackEntryEnum(wxLuaDebugEvent &event); + + void DisplayError(const wxString &strError) const; + + LuaHandler *m_luaHandler; + wxLuaDebugTarget *m_pDebugTarget; + wxLuaState m_wxlState; + wxString m_programName; + + private: + DECLARE_EVENT_TABLE(); + }; + + // --------------------------------------------------------------------------- + // LuaHandler - routes commands from the wxLuaHandler to the app + // --------------------------------------------------------------------------- + + class LuaHandler : public wxLuaHandler + { + public: + LuaHandler(wxLuaEditorApp *app) : m_app(app) {} + + virtual void AddPendingEvent(wxEvent& event) { m_app->AddPendingEvent(event); } + virtual bool ProcessEvent(wxEvent& event) { return m_app->ProcessEvent(event); } + virtual void DisplayError(const wxString &strError) const { m_app->DisplayError(strError); } + + wxLuaEditorApp *m_app; }; *************** *** 103,108 **** --- 150,178 ---- IMPLEMENT_APP(wxLuaEditorApp) + BEGIN_EVENT_TABLE(wxLuaEditorApp, wxApp) + EVT_LUA_PRINT (ID_WXLUASTATE_DEBUG, wxLuaEditorApp::OnLua) + EVT_LUA_ERROR (ID_WXLUASTATE_DEBUG, wxLuaEditorApp::OnLua) + EVT_LUA_DEBUG_HOOK (ID_WXLUASTATE_DEBUG, wxLuaEditorApp::OnLua) + + EVT_WXLUA_DEBUG_STACK_ENUM( wxLuaEditorApp::OnDebugStackEnum) + EVT_WXLUA_DEBUG_STACK_ENTRY_ENUM(wxLuaEditorApp::OnDebugStackEntryEnum) + EVT_WXLUA_DEBUG_TABLE_ENUM( wxLuaEditorApp::OnDebugTableEnum) + END_EVENT_TABLE() + bool wxLuaEditorApp::OnInit() { + m_luaHandler = new LuaHandler(this); + m_pDebugTarget = NULL; + m_programName = argv[0]; + + #if defined(__WXMSW__) && wxCHECK_VERSION(2, 3, 3) + WSADATA wsaData; + WORD wVersionRequested = MAKEWORD(1, 1); + WSAStartup(wVersionRequested, &wsaData); + #endif // defined(__WXMSW__) && wxCHECK_VERSION(2, 3, 3) + + wxLuaDebugServer::SetProgramName(argv[0]); + wxLuaDebugServer::SetNetworkName(wxGetHostName()); + wxInitAllImageHandlers(); *************** *** 122,132 **** wxLuaBinding_wx_init(); wxLuaBinding_wxstc_init(); ! //wxLuaBinding_wxluasocket_init(); ! // parse command line wxCmdLineParser parser(g_cmdLineDesc, argc, argv); ! if (parser.Parse() != 0) ! return 0; // help was shown / an error occurred // These are the options for the frame --- 192,239 ---- wxLuaBinding_wx_init(); wxLuaBinding_wxstc_init(); ! wxLuaBinding_wxluasocket_init(); // parse command line wxCmdLineParser parser(g_cmdLineDesc, argc, argv); ! ! switch ( parser.Parse() ) ! { ! case -1 : ! { ! // help should be given by the wxCmdLineParser, exit program ! return false; ! } ! case 0: ! { ! wxString value; ! if (parser.Found(wxT("d"), &value)) ! { ! // wxLuaDebugServer::StartClient() runs wxExecute(m_programName -d[host]:[port], ...) ! ! m_wxlState = wxLuaState(this, ID_WXLUASTATE_DEBUG); ! if (!m_wxlState.Ok()) ! return false; ! ! // Set up for debugging ! wxString serverName(value.BeforeFirst(wxT(':'))); ! ! long portNumber = 0; ! if (value.AfterFirst(wxT(':')).ToLong(&portNumber)) ! { ! m_pDebugTarget = new wxLuaDebugTarget(m_wxlState, serverName, (int)portNumber); ! if (m_pDebugTarget != NULL) ! return m_pDebugTarget->Run(); ! } ! return false; ! } ! ! break; ! } ! default: ! { ! wxLogMessage(wxT("Unknown command line option, aborting.")); ! return false; ! } ! } // These are the options for the frame *************** *** 220,223 **** --- 327,419 ---- } + int wxLuaEditorApp::OnExit() + { + // If acting as a debuggee, we're done - disconnect from the debugger. + if (m_pDebugTarget != NULL) + { + m_pDebugTarget->Stop(); + delete m_pDebugTarget; + m_pDebugTarget = NULL; + } + + if (m_wxlState.Ok()) + { + m_wxlState.CloseLuaState(true); + m_wxlState.Destroy(); + delete m_luaHandler; + } + + wxSafeYield(); // make sure windows get destroyed + + wxApp::OnExit(); + + #if defined(__WXMSW__) && wxCHECK_VERSION(2, 3, 3) + WSACleanup(); + #endif // defined(__WXMSW__) && wxCHECK_VERSION(2, 3, 3) + + return 0; + } + + void wxLuaEditorApp::OnLua( wxLuaEvent &event ) + { + if (event.GetEventType() == wxEVT_LUA_PRINT) + { + //if (m_pConsole != NULL) + // m_pConsole->DisplayText(event.GetString()); + //else + #ifdef __WXMSW__ + wxMessageBox(event.GetString(), wxT("wxLua")); + #else + fprintf(stderr, wx2lua(event.GetString() + wxT("\n"))); + #endif // __WXMSW__ + } + else if (event.GetEventType() == wxEVT_LUA_ERROR) + { + DisplayError(event.GetString()); + } + } + + void wxLuaEditorApp::OnDebugStackEnum(wxLuaDebugEvent &event) + { + if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) + wxLuaHandler::GetHandler().GetStackDialog()->FillStackCombobox(event.GetDebugData()); + else + event.Skip(); + } + + void wxLuaEditorApp::OnDebugStackEntryEnum(wxLuaDebugEvent &event) + { + if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) + wxLuaHandler::GetHandler().GetStackDialog()->FillStackEntry(event.GetReference(), event.GetDebugData()); + else + event.Skip(); + } + + void wxLuaEditorApp::OnDebugTableEnum(wxLuaDebugEvent &event) + { + if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) + wxLuaHandler::GetHandler().GetStackDialog()->FillTableEntry(wxTreeItemId((wxTreeItemIdValue)event.GetReference()), event.GetDebugData()); + else + event.Skip(); + } + + void wxLuaEditorApp::DisplayError(const wxString &errorStr) const + { + if (m_pDebugTarget != NULL) + m_pDebugTarget->DisplayError(errorStr); + else + { + //if (m_pConsole != NULL) + // m_pConsole->DisplayText(errorStr, true); + //else + #ifdef __WXMSW__ + wxMessageBox(errorStr, wxT("wxLua")); + #else + fprintf(stderr, wx2lua(errorStr + wxT("\n"))); + #endif // __WXMSW__ + + } + } + // ---------------------------------------------------------------------------- // wxLuaEditorFrame |
From: John L. <jr...@us...> - 2006-09-07 04:20:57
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22903/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp wxlhandl.cpp Log Message: cleanup and formatting in the wxlua editor.wx.lua move SetStackDialog to the wxLuaHandler so it can be used by other programs more easily start work on using the socket code in the wxluaeditor formatting in wxldserv.cpp Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxldserv.cpp 6 Sep 2006 22:23:20 -0000 1.16 --- wxldserv.cpp 7 Sep 2006 04:20:54 -0000 1.17 *************** *** 526,530 **** int wxLuaDebuggerBase::HandleDebugEvent(wxLuaDebugEvents_Type event_type) { ! switch(event_type) { case wxLUA_EVENT_DEBUG_BREAK: --- 526,532 ---- int wxLuaDebuggerBase::HandleDebugEvent(wxLuaDebugEvents_Type event_type) { ! wxCHECK_MSG(GetSocketBase(), event_type, wxT("Invalid socket")); ! ! switch (event_type) { case wxLUA_EVENT_DEBUG_BREAK: *************** *** 534,538 **** wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAK, lineNumber, fileName); - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 536,539 ---- *************** *** 544,548 **** wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_PRINT); debugEvent.SetMessage(strMessage); - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 545,548 ---- *************** *** 554,558 **** wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_ERROR); debugEvent.SetMessage(strMessage); - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 554,557 ---- *************** *** 566,574 **** case wxLUA_EVENT_DEBUG_STACK_ENUM: { - wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENUM); wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); if (pDebugData != NULL) debugEvent.SetDebugData(-1, pDebugData); - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 565,573 ---- case wxLUA_EVENT_DEBUG_STACK_ENUM: { wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); + + wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENUM); if (pDebugData != NULL) debugEvent.SetDebugData(-1, pDebugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 576,585 **** case wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM: { - wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM); int stackRef = GetSocketBase()->ReadInt(); wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); if (pDebugData != NULL) debugEvent.SetDebugData(stackRef, pDebugData); - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 575,584 ---- case wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM: { int stackRef = GetSocketBase()->ReadInt(); wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); + + wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM); if (pDebugData != NULL) debugEvent.SetDebugData(stackRef, pDebugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 587,596 **** case wxLUA_EVENT_DEBUG_TABLE_ENUM: { - wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_TABLE_ENUM); long itemNode = GetSocketBase()->ReadLong(); wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); if (pDebugData != NULL) debugEvent.SetDebugData(itemNode, pDebugData); - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 586,595 ---- case wxLUA_EVENT_DEBUG_TABLE_ENUM: { long itemNode = GetSocketBase()->ReadLong(); wxLuaDebugData *pDebugData = GetSocketBase()->ReadDebugData(); + + wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_TABLE_ENUM); if (pDebugData != NULL) debugEvent.SetDebugData(itemNode, pDebugData); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 598,608 **** case wxLUA_EVENT_DEBUG_EVALUATE_EXPR: { - wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EVALUATE_EXPR); int exprRef = GetSocketBase()->ReadInt(); wxString strResult = GetSocketBase()->ReadString(); debugEvent.SetMessage(strResult); debugEvent.SetDebugData(exprRef); - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 597,606 ---- case wxLUA_EVENT_DEBUG_EVALUATE_EXPR: { int exprRef = GetSocketBase()->ReadInt(); wxString strResult = GetSocketBase()->ReadString(); + wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EVALUATE_EXPR); debugEvent.SetMessage(strResult); debugEvent.SetDebugData(exprRef); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 614,618 **** bool enabled = GetSocketBase()->ReadInt() ? true : false; ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED, line, fileName, enabled); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 612,616 ---- bool enabled = GetSocketBase()->ReadInt() ? true : false; ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED, line, fileName, enabled); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 623,627 **** int line = GetSocketBase()->ReadInt(); ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED, line, fileName); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; --- 621,625 ---- int line = GetSocketBase()->ReadInt(); ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED, line, fileName); wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); break; *************** *** 629,633 **** default : break; } ! return event_type; } --- 627,631 ---- default : break; } ! return event_type; } *************** *** 733,740 **** if (m_serverSocket != NULL) { ! // close the server socket by connecting to the socket, thus ! // completing the 'accept'. If a client has not connected, this // code will satisfy the accept the m_fShutdown flag will be set ! // so the thread will not loop and instead will just destroy the // session socket object and return. try --- 731,738 ---- if (m_serverSocket != NULL) { ! // close the server socket by connecting to the socket, thus ! // completing the 'accept'. If a client has not connected, this // code will satisfy the accept the m_fShutdown flag will be set ! // so the thread will not loop and instead will just destroy the // session socket object and return. try Index: wxlhandl.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlhandl.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxlhandl.cpp 6 Sep 2006 05:33:09 -0000 1.4 --- wxlhandl.cpp 7 Sep 2006 04:20:54 -0000 1.5 *************** *** 32,38 **** wxLuaHandler* wxLuaHandler::sm_luaHandler = NULL; ! wxLuaHandler::wxLuaHandler() { ! wxASSERT_MSG(!sm_luaHandler, wxT("There can only be one wxLuaHandler")); sm_luaHandler = this; } --- 32,38 ---- wxLuaHandler* wxLuaHandler::sm_luaHandler = NULL; ! wxLuaHandler::wxLuaHandler() : m_stackDialog(NULL) { ! wxASSERT_MSG(!sm_luaHandler, wxT("There can only be one wxLuaHandler!")); sm_luaHandler = this; } |
From: John L. <jr...@us...> - 2006-09-07 04:20:57
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22903/wxLua/apps/wxlua/src Modified Files: editor.h lconsole.cpp wxlua.cpp wxlua.h Log Message: cleanup and formatting in the wxlua editor.wx.lua move SetStackDialog to the wxLuaHandler so it can be used by other programs more easily start work on using the socket code in the wxluaeditor formatting in wxldserv.cpp Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wxlua.cpp 28 Aug 2006 05:26:19 -0000 1.33 --- wxlua.cpp 7 Sep 2006 04:20:53 -0000 1.34 *************** *** 59,65 **** wxSize(500, 250), li); ! wxGetApp().SetStackDialog(pStackDialog); pStackDialog->ShowModal(); ! wxGetApp().SetStackDialog(NULL); pStackDialog->Destroy(); --- 59,65 ---- wxSize(500, 250), li); ! wxLuaHandler::GetHandler().SetStackDialog(pStackDialog); pStackDialog->ShowModal(); ! wxLuaHandler::GetHandler().SetStackDialog(NULL); pStackDialog->Destroy(); *************** *** 78,82 **** virtual void AddPendingEvent(wxEvent& event) { m_app->AddPendingEvent(event); } virtual bool ProcessEvent(wxEvent& event) { return m_app->ProcessEvent(event); } - virtual void SetStackDialog(wxLuaStackDialog *pStackDialog) { m_app->SetStackDialog(pStackDialog); } virtual void DisplayError(const wxString &strError) const { m_app->DisplayError(strError); } --- 78,81 ---- *************** *** 105,109 **** // --------------------------------------------------------------------------- ! // wxLuaStandaloneApp // --------------------------------------------------------------------------- --- 104,108 ---- // --------------------------------------------------------------------------- ! // wxCmdLineEntryDesc // --------------------------------------------------------------------------- *************** *** 149,156 **** bool wxLuaStandaloneApp::OnInit() { wxString errorStr; int argCount = 0; bool fOk = false; - m_pStackDialog = NULL; #if defined(__WXMSW__) && wxCHECK_VERSION(2, 3, 3) --- 148,159 ---- bool wxLuaStandaloneApp::OnInit() { + m_luaHandler = NULL; + m_pConsole = NULL; + m_fMemoryBitmapAdded = false; + m_pDebugTarget = NULL; + wxString errorStr; int argCount = 0; bool fOk = false; #if defined(__WXMSW__) && wxCHECK_VERSION(2, 3, 3) *************** *** 166,174 **** wxLuaDebugServer::SetNetworkName(wxGetHostName()); - m_fMemoryBitmapAdded = false; - m_pDebugTarget = NULL; - - m_pConsole = NULL; - wxInitAllImageHandlers(); wxFileSystem::AddHandler(new wxMemoryFSHandler); --- 169,172 ---- *************** *** 197,201 **** return false; - lua_State* L = m_wxlState.GetLuaState(); m_luaHandler = new LuaHandler(this); --- 195,198 ---- *************** *** 226,230 **** if (value.AfterFirst(wxT(':')).ToLong(&portNumber)) { ! m_pDebugTarget = new wxLuaDebugTarget(L, serverName, (int)portNumber); if (m_pDebugTarget != NULL) return m_pDebugTarget->Run(); --- 223,227 ---- if (value.AfterFirst(wxT(':')).ToLong(&portNumber)) { ! m_pDebugTarget = new wxLuaDebugTarget(m_wxlState, serverName, (int)portNumber); if (m_pDebugTarget != NULL) return m_pDebugTarget->Run(); *************** *** 325,347 **** } - void wxLuaStandaloneApp::OnLua( wxLuaEvent &event ) - { - if (event.GetEventType() == wxEVT_LUA_PRINT) - { - if (m_pConsole != NULL) - m_pConsole->DisplayText(event.GetString()); - else - #ifdef __WXMSW__ - wxMessageBox(event.GetString(), wxT("wxLua")); - #else - fprintf(stderr, wx2lua(event.GetString() + wxT("\n"))); - #endif // __WXMSW__ - } - else if (event.GetEventType() == wxEVT_LUA_ERROR) - { - DisplayError(event.GetString()); - } - } - #include "editor.h" --- 322,325 ---- *************** *** 414,424 **** } void wxLuaStandaloneApp::OnDebugStackEnum(wxLuaDebugEvent &event) { ! #if wxCHECK_VERSION(2, 3, 0) ! if (m_pStackDialog != NULL) ! m_pStackDialog->FillStackCombobox(event.GetDebugData()); else - #endif // wxCHECK_VERSION(2, 3, 0) event.Skip(); } --- 392,419 ---- } + void wxLuaStandaloneApp::OnLua( wxLuaEvent &event ) + { + if (event.GetEventType() == wxEVT_LUA_PRINT) + { + if (m_pConsole != NULL) + m_pConsole->DisplayText(event.GetString()); + else + #ifdef __WXMSW__ + wxMessageBox(event.GetString(), wxT("wxLua")); + #else + fprintf(stderr, wx2lua(event.GetString() + wxT("\n"))); + #endif // __WXMSW__ + } + else if (event.GetEventType() == wxEVT_LUA_ERROR) + { + DisplayError(event.GetString()); + } + } + void wxLuaStandaloneApp::OnDebugStackEnum(wxLuaDebugEvent &event) { ! if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) ! wxLuaHandler::GetHandler().GetStackDialog()->FillStackCombobox(event.GetDebugData()); else event.Skip(); } *************** *** 426,434 **** void wxLuaStandaloneApp::OnDebugStackEntryEnum(wxLuaDebugEvent &event) { ! #if wxCHECK_VERSION(2, 3, 0) ! if (m_pStackDialog != NULL) ! m_pStackDialog->FillStackEntry(event.GetReference(), event.GetDebugData()); else - #endif // wxCHECK_VERSION(2, 3, 0) event.Skip(); } --- 421,427 ---- void wxLuaStandaloneApp::OnDebugStackEntryEnum(wxLuaDebugEvent &event) { ! if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) ! wxLuaHandler::GetHandler().GetStackDialog()->FillStackEntry(event.GetReference(), event.GetDebugData()); else event.Skip(); } *************** *** 436,444 **** void wxLuaStandaloneApp::OnDebugTableEnum(wxLuaDebugEvent &event) { ! #if wxCHECK_VERSION(2, 3, 0) ! if (m_pStackDialog != NULL) ! m_pStackDialog->FillTableEntry(wxTreeItemId((wxTreeItemIdValue)event.GetReference()), event.GetDebugData()); else - #endif // wxCHECK_VERSION(2, 3, 0) event.Skip(); } --- 429,435 ---- void wxLuaStandaloneApp::OnDebugTableEnum(wxLuaDebugEvent &event) { ! if (wxLuaHandler::GetHandler().GetStackDialog() != NULL) ! wxLuaHandler::GetHandler().GetStackDialog()->FillTableEntry(wxTreeItemId((wxTreeItemIdValue)event.GetReference()), event.GetDebugData()); else event.Skip(); } Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxlua.h 5 Sep 2006 21:48:10 -0000 1.17 --- wxlua.h 7 Sep 2006 04:20:53 -0000 1.18 *************** *** 34,39 **** public: // Override the base class virtual functions ! bool OnInit(); ! int OnExit(); void DisplayError(const wxString &strError) const; --- 34,40 ---- public: // Override the base class virtual functions ! virtual bool OnInit(); ! virtual int OnExit(); ! void DisplayError(const wxString &strError) const; *************** *** 41,47 **** void SetLuaConsole(wxLuaConsole *pConsole) { m_pConsole = pConsole; } - void SetStackDialog(wxLuaStackDialog *pStackDialog) { m_pStackDialog = pStackDialog; } - void OnLua(wxLuaEvent &event); - int RunEditor(); --- 42,45 ---- *************** *** 49,52 **** --- 47,51 ---- int PushArgs(wxChar **argv, int argc, int start_n); + void OnLua(wxLuaEvent &event); void OnDebugStackEnum(wxLuaDebugEvent &event); void OnDebugTableEnum(wxLuaDebugEvent &event); *************** *** 54,58 **** wxString m_programName; - wxLuaStackDialog *m_pStackDialog; LuaHandler *m_luaHandler; wxLuaState m_wxlState; --- 53,56 ---- *************** *** 61,65 **** wxLuaDebugTarget *m_pDebugTarget; - private: DECLARE_EVENT_TABLE(); --- 59,62 ---- Index: editor.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/editor.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** editor.h 25 May 2006 04:39:52 -0000 1.15 --- editor.h 7 Sep 2006 04:20:53 -0000 1.16 *************** *** 9,14 **** extern const unsigned char wxLuaEditor[]; ! const size_t wxLuaEditor_len = 72350; ! const unsigned char wxLuaEditor[72351] = { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 45, 45, 45, 10, 45, 45, 32, 78, 97,109,101, 58, 32, 32, 32, 32, 32, 32, 32, 32, 69,100,105,116,111,114, 46,119,120, 46,108,117, 97, 10, --- 9,14 ---- extern const unsigned char wxLuaEditor[]; ! const size_t wxLuaEditor_len = 71959; ! const unsigned char wxLuaEditor[71960] = { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 45, 45, 45, 10, 45, 45, 32, 78, 97,109,101, 58, 32, 32, 32, 32, 32, 32, 32, 32, 69,100,105,116,111,114, 46,119,120, 46,108,117, 97, 10, *************** *** 127,150 **** 10, 115,116, 97,116,117,115, 66, 97,114, 32, 61, 32,102,114, 97,109,101, 58, 67,114,101, 97,116,101, 83,116, 97,116,117,115, 66, 97,114, 40, 32, 52, 32, 41, 10, 10, 116,111,111,108, 66, 97,114, 32, 61, 32,102,114, 97,109,101, 58, 67,114,101, 97,116,101, 84,111,111,108, 66, 97,114, 40,119,120, 46,119,120, 78, 79, 95, 66, 79, 82, 68, 69, 82, 32, 43, 32,119,120, 46,119,120, 84, 66, 95, 70, 76, 65, 84, 32, 43, 32,119,120, 46,119,120, 84, 66, 95, 68, 79, 67, 75, 65, 66, 76, 69, 41, 10, 45, 45, 32,110,111,116,101, 58, 32, 85,115,117,115, 97,108,108,121, 32,116,104,101, 32, 98,109,112, 32,115,105,122,101, 32,105,115,110, 39,116, 32,110,101, 99,101,115,115, 97,114,121, 44, 32, 98,117,116, 32,116,104,101, 32, 72, 69, 76, 80, 32,105, 99,111,110, 32,105,115, 32,110,111,116, 32,116,104,101, 32,114,105,103,104,116, 32,115,105,122,101, 32,105,110, 32, 77, 83, 87, 10, 108,111, 99, 97,108, 32,116,111,111,108, 66,109,112, 83,105,122,101, 32, 61, 32,116,111,111,108, 66, 97,114, 58, 71,101,116, 84,111,111,108, 66,105,116,109, 97,112, 83,105,122,101, 40, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 78, 69, 87, 44, 32, 32, 32, 32, 32, 34, 78,101,119, 34, 44, 32, 32, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 78, 79, 82, 77, 65, 76, 95, 70, 73, 76, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 34, 67,114,101, 97,116,101,115, 32, 97,110, 32,101,109,112,116,121, 32,100,111, 99,117,109,101,110,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 79, 80, 69, 78, 44, 32, 32, 32, 32, 34, 79,112,101,110, 34, 44, 32, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 76, 69, 95, 79, 80, 69, 78, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 32, 34, 79,112,101,110,115, 32, 97,110, 32,101,120,105,115,116,105,110,103, 32,100,111, 99,117,109,101,110,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 83, 65, 86, 69, 44, 32, 32, 32, 32, 34, 83, 97,118,101, 34, 44, 32, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 76, 69, 95, 83, 65, 86, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 32, 34, 83, 97,118,101,115, 32,116,104,101, 32,100,111, 99,117,109,101,110,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 83, 65, 86, 69, 65, 76, 76, 44, 32, 34, 83, 97,118,101, 32, 65,108,108, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 78, 69, 87, 95, 68, 73, 82, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 83, 97,118,101,115, 32, 97,108,108, 32,100,111, 99,117,109,101,110,116,115, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 67, 85, 84, 44, 32, 32, 32, 34, 67,117,116, 34, 44, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 67, 85, 84, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 32, 32, 34, 67,117,116, 32,116,104,101, 32,115,101,108,101, 99,116,105,111,110, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 67, 79, 80, 89, 44, 32, 32, 34, 67,111,112,121, 34, 44, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 67, 79, 80, 89, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 32, 34, 67,111,112,121, 32,116,104,101, 32,115,101,108,101, 99,116,105,111,110, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 80, 65, 83, 84, 69, 44, 32, 34, 80, 97,115,116,101, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 80, 65, 83, 84, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 34, 80, 97,115,116,101, 32,116,104,101, 32, 99,108,105,112, 98,111, 97,114,100, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 85, 78, 68, 79, 44, 32, 34, 85,110,100,111, 34, 44, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 85, 78, 68, 79, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 85,110,100,111, 32,108, 97,115,116, 32,101,100,105,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 82, 69, 68, 79, 44, 32, 34, 82,101,100,111, 34, 44, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 82, 69, 68, 79, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 82,101,100,111, 32,108, 97,115,116, 32,117,110,100,111, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 70, 73, 78, 68, 44, 32, 32, 32, 32, 34, 70,105,110,100, 34, 44, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 78, 68, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 70,105,110,100, 32,116,101,120,116, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 82, 69, 80, 76, 65, 67, 69, 44, 32, 34, 82,101,112,108, 97, 99,101, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 78, 68, 95, 65, 78, 68, 95, 82, 69, 80, 76, 65, 67, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 70,105,110,100, 32, 97,110,100, 32,114,101,112,108, 97, 99,101, 32,116,101,120,116, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 65, 66, 79, 85, 84, 44, 32, 34, 65, 98,111,117,116, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 72, 69, 76, 80, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 32, 34, 65, 98,111,117,116, 32,119,120, 76,117, 97, 32, 73, 68, 69, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 82,101, 97,108,105,122,101, 40, 41, 10, 10, --- 127,153 ---- 10, 115,116, 97,116,117,115, 66, 97,114, 32, 61, 32,102,114, 97,109,101, 58, 67,114,101, 97,116,101, 83,116, 97,116,117,115, 66, 97,114, 40, 32, 52, 32, 41, 10, + 108,111, 99, 97,108, 32,115,116, 97,116,117,115, 95,116,120,116, 95,119,105,100,116,104, 32, 61, 32,115,116, 97,116,117,115, 66, 97,114, 58, 71,101,116, 84,101,120,116, 69,120,116,101,110,116, 40, 34, 79, 86, 82, 32, 34, 41, 10, + 102,114, 97,109,101, 58, 83,101,116, 83,116, 97,116,117,115, 87,105,100,116,104,115,123, 45, 49, 44, 32,115,116, 97,116,117,115, 95,116,120,116, 95,119,105,100,116,104, 43, 52, 44, 32,115,116, 97,116,117,115, 95,116,120,116, 95,119,105,100,116,104, 43, 52, 44, 32, 49, 53, 48,125, 10, + 102,114, 97,109,101, 58, 83,101,116, 83,116, 97,116,117,115, 84,101,120,116, 40, 34, 82,101, 97,100,121, 34, 41, 10, 10, 116,111,111,108, 66, 97,114, 32, 61, 32,102,114, 97,109,101, 58, 67,114,101, 97,116,101, 84,111,111,108, 66, 97,114, 40,119,120, 46,119,120, 78, 79, 95, 66, 79, 82, 68, 69, 82, 32, 43, 32,119,120, 46,119,120, 84, 66, 95, 70, 76, 65, 84, 32, 43, 32,119,120, 46,119,120, 84, 66, 95, 68, 79, 67, 75, 65, 66, 76, 69, 41, 10, 45, 45, 32,110,111,116,101, 58, 32, 85,115,117,115, 97,108,108,121, 32,116,104,101, 32, 98,109,112, 32,115,105,122,101, 32,105,115,110, 39,116, 32,110,101, 99,101,115,115, 97,114,121, 44, 32, 98,117,116, 32,116,104,101, 32, 72, 69, 76, 80, 32,105, 99,111,110, 32,105,115, 32,110,111,116, 32,116,104,101, 32,114,105,103,104,116, 32,115,105,122,101, 32,105,110, 32, 77, 83, 87, 10, 108,111, 99, 97,108, 32,116,111,111,108, 66,109,112, 83,105,122,101, 32, 61, 32,116,111,111,108, 66, 97,114, 58, 71,101,116, 84,111,111,108, 66,105,116,109, 97,112, 83,105,122,101, 40, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 78, 69, 87, 44, 32, 32, 32, 32, 32, 34, 78,101,119, 34, 44, 32, 32, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 78, 79, 82, 77, 65, 76, 95, 70, 73, 76, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 67,114,101, 97,116,101,115, 32, 97,110, 32,101,109,112,116,121, 32,100,111, 99,117,109,101,110,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 79, 80, 69, 78, 44, 32, 32, 32, 32, 34, 79,112,101,110, 34, 44, 32, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 76, 69, 95, 79, 80, 69, 78, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 34, 79,112,101,110,115, 32, 97,110, 32,101,120,105,115,116,105,110,103, 32,100,111, 99,117,109,101,110,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 83, 65, 86, 69, 44, 32, 32, 32, 32, 34, 83, 97,118,101, 34, 44, 32, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 76, 69, 95, 83, 65, 86, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 34, 83, 97,118,101,115, 32,116,104,101, 32,100,111, 99,117,109,101,110,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 83, 65, 86, 69, 65, 76, 76, 44, 32, 34, 83, 97,118,101, 32, 65,108,108, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 78, 69, 87, 95, 68, 73, 82, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 32, 32, 34, 83, 97,118,101,115, 32, 97,108,108, 32,100,111, 99,117,109,101,110,116,115, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 67, 85, 84, 44, 32, 32, 32, 34, 67,117,116, 34, 44, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 67, 85, 84, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 32, 34, 67,117,116, 32,116,104,101, 32,115,101,108,101, 99,116,105,111,110, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 67, 79, 80, 89, 44, 32, 32, 34, 67,111,112,121, 34, 44, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 67, 79, 80, 89, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 32, 34, 67,111,112,121, 32,116,104,101, 32,115,101,108,101, 99,116,105,111,110, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 80, 65, 83, 84, 69, 44, 32, 34, 80, 97,115,116,101, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 80, 65, 83, 84, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 80, 97,115,116,101, 32,116,104,101, 32, 99,108,105,112, 98,111, 97,114,100, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 85, 78, 68, 79, 44, 32, 34, 85,110,100,111, 34, 44, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 85, 78, 68, 79, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 85,110,100,111, 32,108, 97,115,116, 32,101,100,105,116, 34, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 82, 69, 68, 79, 44, 32, 34, 82,101,100,111, 34, 44, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 82, 69, 68, 79, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 82,101,100,111, 32,108, 97,115,116, 32,117,110,100,111, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 70, 73, 78, 68, 44, 32, 32, 32, 32, 34, 70,105,110,100, 34, 44, 32, 32, 32, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 78, 68, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 70,105,110,100, 32,116,101,120,116, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 82, 69, 80, 76, 65, 67, 69, 44, 32, 34, 82,101,112,108, 97, 99,101, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 70, 73, 78, 68, 95, 65, 78, 68, 95, 82, 69, 80, 76, 65, 67, 69, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 70,105,110,100, 32, 97,110,100, 32,114,101,112,108, 97, 99,101, 32,116,101,120,116, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 65,100,100, 83,101,112, 97,114, 97,116,111,114, 40, 41, 10, ! 116,111,111,108, 66, 97,114, 58, 65,100,100, 84,111,111,108, 83,105,109,112,108,101, 40, 73, 68, 95, 65, 66, 79, 85, 84, 44, 32, 34, 65, 98,111,117,116, 34, 44, 32,119,120, 46,119,120, 65,114,116, 80,114,111,118,105,100,101,114, 95, 71,101,116, 66,105,116,109, 97,112, 40,119,120, 46,119,120, 65, 82, 84, 95, 72, 69, 76, 80, 44, 32,119,120, 46,119,120, 65, 82, 84, 95, 77, 69, 78, 85, 44, 32,116,111,111,108, 66,109,112, 83,105,122,101, 41, 44, 32, 34, 65, 98,111,117,116, 32,119,120, 76,117, 97, 32, 73, 68, 69, 34, 41, 10, 116,111,111,108, 66, 97,114, 58, 82,101, 97,108,105,122,101, 40, 41, 10, 10, *************** *** 234,237 **** --- 237,241 ---- 101,110,100, 10, 10, + 45, 45, 32, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 71,101,116, 32,116,104,101, 32, 99,117,114,114,101,110,116, 32,101,100,105,116,111,114, 32,112, 97,103,101, 32,111,102, 32,116,104,101, 32,110,111,116,101, 98,111,111,107, 32,111,114, 32,110,105,108, 32,105,102, 32,110,111,110,101, 10, 102,117,110, 99,116,105,111,110, 32,103,101,116, 69,100,105,116,111,114, 40,115,101,108,101, 99,116,105,111,110, 41, 10, *************** *** 246,249 **** --- 250,262 ---- 101,110,100, 10, 10, + 102,117,110, 99,116,105,111,110, 32,115,101,116, 69,100,105,116,111,114, 83,101,108,101, 99,116,105,111,110, 40,115,101,108,101, 99,116,105,111,110, 41, 10, + 32, 32, 32, 32,108,111, 99, 97,108, 32,101,100,105,116,111,114, 32, 61, 32,103,101,116, 69,100,105,116,111,114, 40,115,101,108,101, 99,116,105,111,110, 41, 10, + 32, 32, 32, 32,105,102, 32,101,100,105,116,111,114, 32,116,104,101,110, 10, + 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 70,111, 99,117,115, 40, 41, 10, + 32, 32, 32, 32, 32, 32, 32, 32,105,115, 70,105,108,101, 65,108,116,101,114,101,100, 79,110, 68,105,115,107, 40,101,100,105,116,111,114, 41, 10, + 32, 32, 32, 32,101,110,100, 10, + 32, 32, 32, 32,117,112,100, 97,116,101, 83,116, 97,116,117,115, 84,101,120,116, 40,101,100,105,116,111,114, 41, 10, + 101,110,100, 10, + 10, 45, 45, 32, 85,112,100, 97,116,101, 32,116,104,101, 32,115,116, 97,116,117,115, 98, 97,114, 32,116,101,120,116, 32,111,102, 32,116,104,101, 32,102,114, 97,109,101, 32,117,115,105,110,103, 32,116,104,101, 32,103,105,118,101,110, 32,101,100,105,116,111,114, 10, 102,117,110, 99,116,105,111,110, 32,117,112,100, 97,116,101, 83,116, 97,116,117,115, 84,101,120,116, 40,101,100,105,116,111,114, 41, 10, *************** *** 273,282 **** 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,103,101,116, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,105,108,101, 78, 97,109,101, 32, 61, 32,119,120, 46,119,120, 70,105,108,101, 78, 97,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,105,108,101, 78, 97,109,101, 58, 71,101,116, 77,111,100,105,102,105, 99, 97,116,105,111,110, 84,105,109,101, 40, 41, 59, 10, 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,105,115, 65,108,116,101,114,101,100, 79,110, 68,105,115,107, 40,101,100,105,116,111,114, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,105,100, 32, 61, 32,101,100,105,116,111,114, 58, 71,101,116, 73,100, 40, 41, 10, 32, 32, 32, 32,105,102, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 32,116,104,101,110, 10, --- 286,295 ---- 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,103,101,116, 70,105,108,101, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,105,108,101, 78, 97,109,101, 32, 61, 32,119,120, 46,119,120, 70,105,108,101, 78, 97,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,105,108,101, 78, 97,109,101, 58, 71,101,116, 77,111,100,105,102,105, 99, 97,116,105,111,110, 84,105,109,101, 40, 41, 59, 10, 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,105,115, 70,105,108,101, 65,108,116,101,114,101,100, 79,110, 68,105,115,107, 40,101,100,105,116,111,114, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,105,100, 32, 61, 32,101,100,105,116,111,114, 58, 71,101,116, 73,100, 40, 41, 10, 32, 32, 32, 32,105,102, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 32,116,104,101,110, 10, *************** *** 287,291 **** 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,102,105,108,101, 80, 97,116,104, 32, 97,110,100, 32, 40,115,116,114,105,110,103, 46,108,101,110, 40,102,105,108,101, 80, 97,116,104, 41, 32, 62, 32, 48, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,111,108,100, 77,111,100, 84,105,109,101, 32, 97,110,100, 32,111,108,100, 77,111,100, 84,105,109,101, 58, 73,115, 86, 97,108,105,100, 40, 41, 32,116,104,101,110, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,109,111,100, 84,105,109,101, 32, 61, 32,103,101,116, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,109,111,100, 84,105,109,101, 58, 73,115, 86, 97,108,105,100, 40, 41, 32, 97,110,100, 32,111,108,100, 77,111,100, 84,105,109,101, 58, 73,115, 69, 97,114,108,105,101,114, 84,104, 97,110, 40,109,111,100, 84,105,109,101, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,116, 32, 61, 32,119,120, 46,119,120, 77,101,115,115, 97,103,101, 66,111,120, 40,102,105,108,101, 78, 97,109,101, 46, 46, 34, 32,104, 97,115, 32, 98,101,101,110, 32,109,111,100,105,102,105,101,100, 32,111,110, 32,100,105,115,107, 46, 32, 68,111, 32,121,111,117, 32,119, 97,110,116, 32,116,111, 32,114,101,108,111, 97,100, 32,105,116, 63, 34, 44, 10, --- 300,304 ---- 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,102,105,108,101, 80, 97,116,104, 32, 97,110,100, 32, 40,115,116,114,105,110,103, 46,108,101,110, 40,102,105,108,101, 80, 97,116,104, 41, 32, 62, 32, 48, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,111,108,100, 77,111,100, 84,105,109,101, 32, 97,110,100, 32,111,108,100, 77,111,100, 84,105,109,101, 58, 73,115, 86, 97,108,105,100, 40, 41, 32,116,104,101,110, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,109,111,100, 84,105,109,101, 32, 61, 32,103,101,116, 70,105,108,101, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,109,111,100, 84,105,109,101, 58, 73,115, 86, 97,108,105,100, 40, 41, 32, 97,110,100, 32,111,108,100, 77,111,100, 84,105,109,101, 58, 73,115, 69, 97,114,108,105,101,114, 84,104, 97,110, 40,109,111,100, 84,105,109,101, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,116, 32, 61, 32,119,120, 46,119,120, 77,101,115,115, 97,103,101, 66,111,120, 40,102,105,108,101, 78, 97,109,101, 46, 46, 34, 32,104, 97,115, 32, 98,101,101,110, 32,109,111,100,105,102,105,101,100, 32,111,110, 32,100,105,115,107, 46, 32, 68,111, 32,121,111,117, 32,119, 97,110,116, 32,116,111, 32,114,101,108,111, 97,100, 32,105,116, 63, 34, 44, 10, *************** *** 311,316 **** 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,109,111,100, 84,105,109,101, 32, 61, 32,109,111,100, 84,105,109,101, 32, 45, 45, 32,115,101,116, 32,116,104,101, 32,116,105,109,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, --- 324,327 ---- *************** *** 318,343 **** 101,110,100, 10, 10, - 102,117,110, 99,116,105,111,110, 32,115,101,116, 69,100,105,116,111,114, 83,101,108,101, 99,116,105,111,110, 40,115,101,108,101, 99,116,105,111,110, 41, 10, - 32, 32, 32, 32,108,111, 99, 97,108, 32,101,100,105,116,111,114, 32, 61, 32,103,101,116, 69,100,105,116,111,114, 40,115,101,108,101, 99,116,105,111,110, 41, 10, - 32, 32, 32, 32,105,102, 32,101,100,105,116,111,114, 32,116,104,101,110, 10, - 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 70,111, 99,117,115, 40, 41, 10, - 32, 32, 32, 32, 32, 32, 32, 32,105,115, 65,108,116,101,114,101,100, 79,110, 68,105,115,107, 40,101,100,105,116,111,114, 41, 10, - 32, 32, 32, 32,101,110,100, 10, - 32, 32, 32, 32,117,112,100, 97,116,101, 83,116, 97,116,117,115, 84,101,120,116, 40,101,100,105,116,111,114, 41, 10, - 101,110,100, 10, - 10, - 102,117,110, 99,116,105,111,110, 32, 99,114,101, 97,116,101, 65,117,116,111, 67,111,109,112, 76,105,115,116, 40,107,101,121, 41, 10, - 32, 32, 32, 32, 45, 45,108,111, 99, 97,108, 32,108,101,110, 32, 61, 32,115,116,114,105,110,103, 46,108,101,110, 40,107,101,121, 41, 10, - 32, 32, 32, 32,108,111, 99, 97,108, 32,117,115,101,114, 76,105,115,116, 32, 61, 32,123,125, 10, - 32, 32, 32, 32,102,111,114, 32,105,110,100,101,120, 44, 32,118, 97,108,117,101, 32,105,110, 32,112, 97,105,114,115, 40,119,120, 41, 32,100,111, 10, - 32, 32, 32, 32, 32, 32, 32, 32, 45, 45,105,102, 32,115,116,114,105,110,103, 46,115,117, 98, 40,105,110,100,101,120, 44, 32, 49, 44, 32,108,101,110, 41, 32, 61, 61, 32,107,101,121, 32,116,104,101,110, 10, - 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,115,116,114,105,110,103, 46,102,105,110,100, 40,105,110,100,101,120, 44, 32,107,101,121, 44, 32, 49, 44, 32, 49, 41, 32, 61, 61, 32, 49, 32,116,104,101,110, 32, 45, 45, 32,112,101,114,104, 97,112,115, 32,102, 97,115,116,101,114, 63, 10, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116, 97, 98,108,101, 46,105,110,115,101,114,116, 40,117,115,101,114, 76,105,115,116, 44, 32,105,110,100,101,120, 46, 46, 34, 32, 34, 41, 10, - 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, - 32, 32, 32, 32,101,110,100, 10, - 32, 32, 32, 32,116, 97, 98,108,101, 46,115,111,114,116, 40,117,115,101,114, 76,105,115,116, 41, 10, - 32, 32, 32, 32,114,101,116,117,114,110, 32,116, 97, 98,108,101, 46, 99,111,110, 99, 97,116, 40,117,115,101,114, 76,105,115,116, 41, 10, - 101,110,100, 10, - 10, 102,117,110, 99,116,105,111,110, 32,115,101,116, 68,111, 99,117,109,101,110,116, 77,111,100,105,102,105,101,100, 40,105,100, 44, 32,109,111,100,105,102,105,101,100, 44, 32,114,101,115,101,116, 77,111,100, 84,105,109,101, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,105,108,101, 78, 97,109,101, 32, 61, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,102,105,108,101, 78, 97,109,101, 10, --- 329,332 ---- *************** *** 352,356 **** 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,105,115, 77,111,100,105,102,105,101,100, 32, 61, 32,110,105,108, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,114,101,115,101,116, 77,111,100, 84,105,109,101, 32, 97,110,100, 32,102,105,108,101, 80, 97,116,104, 32, 97,110,100, 32,115,116,114,105,110,103, 46,108,101,110, 40,102,105,108,101, 80, 97,116,104, 41, 32, 62, 32, 48, 32,116,104,101,110, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,109,111,100, 84,105,109,101, 32, 61, 32,103,101,116, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,110,111,116,101, 98,111,111,107, 58, 83,101,116, 80, 97,103,101, 84,101,120,116, 40,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,105,110,100,101,120, 44, 32,102,105,108,101, 78, 97,109,101, 41, 10, --- 341,345 ---- 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,105,115, 77,111,100,105,102,105,101,100, 32, 61, 32,110,105,108, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,114,101,115,101,116, 77,111,100, 84,105,109,101, 32, 97,110,100, 32,102,105,108,101, 80, 97,116,104, 32, 97,110,100, 32,115,116,114,105,110,103, 46,108,101,110, 40,102,105,108,101, 80, 97,116,104, 41, 32, 62, 32, 48, 32,116,104,101,110, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,109,111,100, 84,105,109,101, 32, 61, 32,103,101,116, 70,105,108,101, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,110,111,116,101, 98,111,111,107, 58, 83,101,116, 80, 97,103,101, 84,101,120,116, 40,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,105,110,100,101,120, 44, 32,102,105,108,101, 78, 97,109,101, 41, 10, *************** *** 488,492 **** 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 32, 32, 32, 32,101,100,105,116,111,114, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 69, 86, 84, 95, 83, 84, 67, 95, 77, 79, 68, 73, 70, 73, 69, 68, 44, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 32,101,110,100, 41, 10, 10, 32, 32, 32, 32,101,100,105,116,111,114, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 69, 86, 84, 95, 83, 84, 67, 95, 83, 65, 86, 69, 80, 79, 73, 78, 84, 82, 69, 65, 67, 72, 69, 68, 44, 10, --- 477,481 ---- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, ! 32, 32, 32, 32, 45, 45,101,100,105,116,111,114, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 69, 86, 84, 95, 83, 84, 67, 95, 77, 79, 68, 73, 70, 73, 69, 68, 44, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 32,101,110,100, 41, 10, 10, 32, 32, 32, 32,101,100,105,116,111,114, 58, 67,111,110,110,101, 99,116, 40,119,120, 46,119,120, 69, 86, 84, 95, 83, 84, 67, 95, 83, 65, 86, 69, 80, 79, 73, 78, 84, 82, 69, 65, 67, 72, 69, 68, 44, 10, *************** *** 527,531 **** 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 76,101,120,101,114, 40,119,120, 46,119,120, 83, 84, 67, 95, 76, 69, 88, 95, 76, 85, 65, 41, 10, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 78,111,116,101, 58, 32,116,104,101,115,101, 32,107,101,121,119,111,114,100,115, 32, 97,114,101, 32,115,104, 97,109,101,108,101,115,115, 32,114,105,112,112,101,100, 32,102,114,111,109, 32,115, 99,105,116,101, 32, 49, 46, 54, 56, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 75,101,121, 87,111,114,100,115, 40, 48, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 91, 91, 97,110,100, 32, 98,114,101, 97,107, 32,100,111, 32,101,108,115,101, 32,101,108,115,101,105,102, 32,101,110,100, 32,102, 97,108,115,101, 32,102,111,114, 32,102,117,110, 99,116,105,111,110, 32,105,102, 10, --- 516,520 ---- 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 76,101,120,101,114, 40,119,120, 46,119,120, 83, 84, 67, 95, 76, 69, 88, 95, 76, 85, 65, 41, 10, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 78,111,116,101, 58, 32,116,104,101,115,101, 32,107,101,121,119,111,114,100,115, 32, 97,114,101, 32,115,104, 97,109,101,108,101,115,115,108,121, 32,114,105,112,112,101,100, 32,102,114,111,109, 32,115, 99,105,116,101, 32, 49, 46, 54, 56, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 75,101,121, 87,111,114,100,115, 40, 48, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 91, 91, 97,110,100, 32, 98,114,101, 97,107, 32,100,111, 32,101,108,115,101, 32,101,108,115,101,105,102, 32,101,110,100, 32,102, 97,108,115,101, 32,102,111,114, 32,102,117,110, 99,116,105,111,110, 32,105,102, 10, *************** *** 568,572 **** 10, 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 75,101,121, 87,111,114,100,115, 40, 53, 44, 32,116, 97, 98,108,101, 46, 99,111,110, 99, 97,116, 40,119,120,107,101,121,119,111,114,100,115, 41, 41, 10, - 10, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,100,105,116,111,114, 58, 83,101,116, 76,101,120,101,114, 40,119,120, 46,119,120, 83, 84, 67, 95, 76, 69, 88, 95, 78, 85, 76, 76, 41, 10, --- 557,560 ---- *************** *** 575,578 **** --- 563,579 ---- 101,110,100, 10, 10, + 102,117,110, 99,116,105,111,110, 32, 99,114,101, 97,116,101, 65,117,116,111, 67,111,109,112, 76,105,115,116, 40,107,101,121, 41, 10, + 32, 32, 32, 32, 45, 45,108,111, 99, 97,108, 32,108,101,110, 32, 61, 32,115,116,114,105,110,103, 46,108,101,110, 40,107,101,121, 41, 10, + 32, 32, 32, 32,108,111, 99, 97,108, 32,117,115,101,114, 76,105,115,116, 32, 61, 32,123,125, 10, + 32, 32, 32, 32,102,111,114, 32,105,110,100,101,120, 44, 32,118, 97,108,117,101, 32,105,110, 32,112, 97,105,114,115, 40,119,120, 41, 32,100,111, 10, + 32, 32, 32, 32, 32, 32, 32, 32, 45, 45,105,102, 32,115,116,114,105,110,103, 46,115,117, 98, 40,105,110,100,101,120, 44, 32, 49, 44, 32,108,101,110, 41, 32, 61, 61, 32,107,101,121, 32,116,104,101,110, 10, + 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,115,116,114,105,110,103, 46,102,105,110,100, 40,105,110,100,101,120, 44, 32,107,101,121, 44, 32, 49, 44, 32, 49, 41, 32, 61, 61, 32, 49, 32,116,104,101,110, 32, 45, 45, 32,112,101,114,104, 97,112,115, 32,102, 97,115,116,101,114, 63, 10, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116, 97, 98,108,101, 46,105,110,115,101,114,116, 40,117,115,101,114, 76,105,115,116, 44, 32,105,110,100,101,120, 46, 46, 34, 32, 34, 41, 10, + 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, + 32, 32, 32, 32,101,110,100, 10, + 32, 32, 32, 32,116, 97, 98,108,101, 46,115,111,114,116, 40,117,115,101,114, 76,105,115,116, 41, 10, + 32, 32, 32, 32,114,101,116,117,114,110, 32,116, 97, 98,108,101, 46, 99,111,110, 99, 97,116, 40,117,115,101,114, 76,105,115,116, 41, 10, + 101,110,100, 10, + 10, 109,101,110,117, 66, 97,114, 32, 61, 32,119,120, 46,119,120, 77,101,110,117, 66, 97,114, 40, 41, 10, 102,105,108,101, 77,101,110,117, 32, 61, 32,119,120, 46,119,120, 67,114,101, 97,116,101, 77,101,110,117,123, 10, *************** *** 624,628 **** 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,102,105,108,101, 80, 97,116,104, 32, 61, 32,102,105,108,101, 80, 97,116,104, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,102,105,108,101, 78, 97,109,101, 32, 61, 32,102,105,108,101, 78, 97,109,101, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,109,111,100, 84,105,109,101, 32, 32, 61, 32,103,101,116, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,110,111,116,101, 98,111,111,107, 58, 83,101,116, 80, 97,103,101, 84,101,120,116, 40,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,105,110,100,101,120, 44, 32,102,105,108,101, 78, 97,109,101, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115, 97,118,101,100, 32, 61, 32, 49, 10, --- 625,629 ---- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,102,105,108,101, 80, 97,116,104, 32, 61, 32,102,105,108,101, 80, 97,116,104, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,102,105,108,101, 78, 97,109,101, 32, 61, 32,102,105,108,101, 78, 97,109,101, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,109,111,100, 84,105,109,101, 32, 32, 61, 32,103,101,116, 70,105,108,101, 77,111,100, 84,105,109,101, 40,102,105,108,101, 80, 97,116,104, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,110,111,116,101, 98,111,111,107, 58, 83,101,116, 80, 97,103,101, 84,101,120,116, 40,111,112,101,110, 68,111, 99,117,109,101,110,116,115, 91,105,100, 93, 46,105,110,100,101,120, 44, 32,102,105,108,101, 78, 97,109,101, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115, 97,118,101,100, 32, 61, 32, 49, 10, *************** *** 876,885 **** 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,101,110, 97, 98,108,101, 77,101,110,117, 73,116,101,109, 40, 32,101,118,101,110,116, 32, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,101,100,105,116,111,114, 32, 61, 32,103,101,116, 69,100,105,116,111,114, 40, 41, 10, 32, 32, 32, 32,101,118,101,110,116, 58, 69,110, 97, 98,108,101, 40,101,100,105,116,111,114, 32,126, 61, 32,110,105,108, 41, 10, 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,102,105,110,100, 83,101,108,101, 99,116,101,100, 73,116,101,109, 40, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,111,117,110,116, 32, 61, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 58, 71,101,116, 83,101,108,101, 99,116,101,100, 73,116,101,109, 67,111,117,110,116, 40, 41, 10, 32, 32, 32, 32,105,102, 32, 99,111,117,110,116, 32, 62, 32, 48, 32,116,104,101,110, 10, --- 877,886 ---- 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,101,110, 97, 98,108,101, 69,100,105,116,111,114, 77,101,110,117, 73,116,101,109, 40, 32,101,118,101,110,116, 32, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,101,100,105,116,111,114, 32, 61, 32,103,101,116, 69,100,105,116,111,114, 40, 41, 10, 32, 32, 32, 32,101,118,101,110,116, 58, 69,110, 97, 98,108,101, 40,101,100,105,116,111,114, 32,126, 61, 32,110,105,108, 41, 10, 101,110,100, 10, 10, ! 102,117,110, 99,116,105,111,110, 32,102,105,110,100, 83,101,108,101, 99,116,101,100, 87, 97,116, 99,104, 73,116,101,109, 40, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,111,117,110,116, 32, 61, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 58, 71,101,116, 83,101,108,101, 99,116,101,100, 73,116,101,109, 67,111,117,110,116, 40, 41, 10, 32, 32, 32, 32,105,102, 32, 99,111,117,110,116, 32, 62, 32, 48, 32,116,104,101,110, 10, *************** *** 968,972 **** 32, 32, 32, 32,119, 97,116, 99,104, 87,105,110,100,111,119, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 69, 68, 73, 84, 87, 65, 84, 67, 72, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,111,119, 32, 61, 32,102,105,110,100, 83,101,108,101, 99,116,101,100, 73,116,101,109, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,114,111,119, 32, 62, 61, 32, 48, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 58, 69,100,105,116, 76, 97, 98,101,108, 40,114,111,119, 41, 10, --- 969,973 ---- 32, 32, 32, 32,119, 97,116, 99,104, 87,105,110,100,111,119, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 69, 68, 73, 84, 87, 65, 84, 67, 72, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,111,119, 32, 61, 32,102,105,110,100, 83,101,108,101, 99,116,101,100, 87, 97,116, 99,104, 73,116,101,109, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,114,111,119, 32, 62, 61, 32, 48, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 58, 69,100,105,116, 76, 97, 98,101,108, 40,114,111,119, 41, 10, *************** *** 980,984 **** 32, 32, 32, 32,119, 97,116, 99,104, 87,105,110,100,111,119, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 82, 69, 77, 79, 86, 69, 87, 65, 84, 67, 72, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,111,119, 32, 61, 32,102,105,110,100, 83,101,108,101, 99,116,101,100, 73,116,101,109, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,114,111,119, 32, 62, 61, 32, 48, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 58, 68,101,108,101,116,101, 73,116,101,109, 40,114,111,119, 41, 10, --- 981,985 ---- 32, 32, 32, 32,119, 97,116, 99,104, 87,105,110,100,111,119, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 82, 69, 77, 79, 86, 69, 87, 65, 84, 67, 72, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 67, 79, 77, 77, 65, 78, 68, 95, 77, 69, 78, 85, 95, 83, 69, 76, 69, 67, 84, 69, 68, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 32, 40, 32,101,118,101,110,116, 32, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,111,119, 32, 61, 32,102,105,110,100, 83,101,108,101, 99,116,101,100, 87, 97,116, 99,104, 73,116,101,109, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,114,111,119, 32, 62, 61, 32, 48, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119, 97,116, 99,104, 76,105,115,116, 67,116,114,108, 58, 68,101,108,101,116,101, 73,116,101,109, 40,114,111,119, 41, 10, *************** *** 1074,1078 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 85, 84, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, --- 1075,1079 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 85, 84, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 69,100,105,116,111,114, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, *************** *** 1084,1088 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 79, 80, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, --- 1085,1089 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 79, 80, 89, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 69,100,105,116,111,114, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, *************** *** 1114,1118 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 76, 69, 65, 82, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, --- 1115,1119 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 76, 69, 65, 82, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 69,100,105,116,111,114, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, *************** *** 1124,1128 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 83, 69, 76, 69, 67, 84, 65, 76, 76, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, --- 1125,1129 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 83, 69, 76, 69, 67, 84, 65, 76, 76, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 69,100,105,116,111,114, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, *************** *** 1146,1150 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 65, 85, 84, 79, 67, 79, 77, 80, 76, 69, 84, 69, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, --- 1147,1151 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 65, 85, 84, 79, 67, 79, 77, 80, 76, 69, 84, 69, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 69,100,105,116,111,114, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, *************** *** 1165,1169 **** 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 76, 69, 65, 82, 79, 85, 84, 80, 85, 84, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, --- 1166,1170 ---- 102,114, 97,109,101, 58, 67,111,110,110,101, 99,116, 40, 73, 68, 95, 67, 76, 69, 65, 82, 79, 85, 84, 80, 85, 84, 44, 32,119,120, 46,119,120, 69, 86, 84, 95, 85, 80, 68, 65, 84, 69, 95, 85, 73, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40,101,118,101,110,116, 41, 10, ! 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110, 97, 98,108,101, 69,100,105,116,111,114, 77,101,110,117, 73,116,101,109, 40,101,118,101,110,116, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 41, 10, 10, *************** *** 1196,1200 **** 10, 102,105,110,100, 77,101,110,117, 32, 61, 32,119,120, 46,119,120, 67,114,101, 97,116,101, 77,101,110,117,123, 10, ! 32, 32, 32, 32, 32, 32, 32, 32,123, 32, 73, 68, 95, 70, 73, 78, 68, 44, 32, 32, 32, 32, 34, 38, 70,105,110,100, 92,116, 67,116,114,108, 45, 70, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34, 70,105,110,100, 32,116,104,101, 32,115,112,101, 99,105,102,105,101,100, 32,116,101,120,116, 34, 32,125, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,123, 32, 73, 68, 95, 70, 73, 78, 68, 78, 69, 88, 84, 44, 32, 32, 32, 34, 70,105,110,100, 32, 38, 78,101,120,116, 92,116, 70, 51, 34, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34, 70,105,110,100, 32,116,104,101, 32,110,101,120,116, 32,111, 99, 99,117,114,114,101,110, 99,101, 32,111,102, 32,116,104,101, 32,115,112,101, 99,105,102,105,101,100, 32,116,101,120,116, 34, 32,125, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,123, 32, 73, 68, 95, 70, 73, 78, 68, 80, 82, 69, 86, 44, 32, 32, 32, 34, 70,105,110,100, 32, 38, 80,114,101,118,105,111,117,115, 92,116, 83,104,105,102,116, 45, 70, 51, 34, 44, 32, 34, 82,101,112,101, 97,116, 32,116,104,101, 32,115,101, 97,114, 99,104, 32, 98, 97, 99,107,119, 97,114,100,115, 32,10... [truncated message content] |
From: John L. <jr...@us...> - 2006-09-06 22:23:26
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14464/wxLua/modules/wxluasocket/include Modified Files: dservice.h wxldserv.h wxldtarg.h wxlsock.h Log Message: more code refactoring, move more functions into wxLuaDebuggerBase Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxldserv.h 6 Sep 2006 05:33:08 -0000 1.10 --- wxldserv.h 6 Sep 2006 22:23:20 -0000 1.11 *************** *** 119,136 **** virtual ~wxLuaDebuggerBase() {} ! virtual bool AddBreakPoint(const wxString &fileName, int lineNumber) = 0; ! virtual bool RemoveBreakPoint(const wxString &fileName, int lineNumber) = 0; ! virtual bool ClearAllBreakPoints() = 0; ! virtual bool Run(const wxString &fileName, const wxString &buffer) = 0; ! virtual bool Step() = 0; ! virtual bool StepOver() = 0; ! virtual bool StepOut() = 0; ! virtual bool Continue() = 0; ! virtual bool Break() = 0; ! virtual bool Reset() = 0; ! virtual bool EnumerateStack() = 0; ! virtual bool EnumerateStackEntry(int stackEntry) = 0; ! virtual bool EnumerateTable(int tableRef, int nIndex, long nItemNode) = 0; ! virtual bool CleanupDebugReferences() = 0; private: --- 119,147 ---- virtual ~wxLuaDebuggerBase() {} ! virtual bool AddBreakPoint(const wxString &fileName, int lineNumber); ! virtual bool RemoveBreakPoint(const wxString &fileName, int lineNumber); ! virtual bool DisableBreakPoint(const wxString &fileName, int lineNumber); ! virtual bool EnableBreakPoint(const wxString &fileName, int lineNumber); ! virtual bool ClearAllBreakPoints(); ! virtual bool Run(const wxString &fileName, const wxString &buffer); ! virtual bool Step(); ! virtual bool StepOver(); ! virtual bool StepOut(); ! virtual bool Continue(); ! virtual bool Break(); ! virtual bool Reset(); ! virtual bool EnumerateStack(); ! virtual bool EnumerateStackEntry(int stackEntry); ! virtual bool EnumerateTable(int tableRef, int nIndex, long nItemNode); ! virtual bool CleanupDebugReferences(); ! virtual bool EvaluateExpr(int exprRef, const wxString &strExpression); ! ! virtual bool Compile(const wxString &fileName, const wxString &buffer); ! ! virtual void NotifyError(const wxString &msg); ! ! virtual int HandleDebugEvent(wxLuaDebugEvents_Type event_type); ! ! virtual wxLuaSocketBase* GetSocketBase() { return NULL; } private: *************** *** 163,187 **** bool WaitForConnect(int timeOut); - bool AddBreakPoint(const wxString &fileName, int lineNumber); - bool RemoveBreakPoint(const wxString &fileName, int lineNumber); - bool ClearAllBreakPoints(); - bool Run(const wxString &fileName, const wxString &buffer); - bool Step(); - bool StepOver(); - bool StepOut(); - bool Continue(); - bool Break(); - bool Reset(); - bool EnumerateStack(); - bool EnumerateStackEntry(int stackEntry); - bool EnumerateTable(int tableRef, int nIndex, long nItemNode); - bool CleanupDebugReferences(); void ThreadFunction(); - #if wxCHECK_VERSION(2, 3, 0) bool DisplayStackDialog(wxWindow *pParent); - #endif - bool EvaluateExpr(int exprRef, const wxString &pExpression); ! static bool Compile(const wxString &fileName, const wxString &buffer); protected: --- 174,181 ---- bool WaitForConnect(int timeOut); void ThreadFunction(); bool DisplayStackDialog(wxWindow *pParent); ! virtual wxLuaSocketBase* GetSocketBase() { return m_acceptedSocket; } protected: *************** *** 199,204 **** private: - static void NotifyError(const wxString &msg); - static int LuaCompileError (lua_State *L); DECLARE_ABSTRACT_CLASS(wxLuaDebugServer) }; --- 193,196 ---- Index: wxlsock.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlsock.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxlsock.h 6 Sep 2006 05:33:08 -0000 1.7 --- wxlsock.h 6 Sep 2006 22:23:20 -0000 1.8 *************** *** 53,56 **** --- 53,59 ---- virtual ~wxLuaSocketBase() {} + // Is the socket currently connected + virtual bool IsConnected() = 0; + // Read the whole buffer of size length into buffer buffer from the socket virtual int Read(char *buffer, int length) = 0; *************** *** 142,147 **** int GetSocket() const { return m_sock; } // Test if the socket is readable ! bool IsReadable () const { return ((m_sockstate == SOCKET_CONNECTED) || --- 145,153 ---- int GetSocket() const { return m_sock; } + // Is the socket connected + virtual bool IsConnected() { return (m_sockstate == SOCKET_CONNECTED); } + // Test if the socket is readable ! bool IsReadable() const { return ((m_sockstate == SOCKET_CONNECTED) || *************** *** 150,154 **** // Test if the socket is writeable ! bool IsWritable () const { return ((m_sockstate != SOCKET_CONNECTED) || --- 156,160 ---- // Test if the socket is writeable ! bool IsWritable() const { return ((m_sockstate != SOCKET_CONNECTED) || Index: wxldtarg.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldtarg.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxldtarg.h 6 Sep 2006 05:33:08 -0000 1.12 --- wxldtarg.h 6 Sep 2006 22:23:20 -0000 1.13 *************** *** 75,93 **** }; - class BreakPointObject : public wxObject - { - public: - BreakPointObject(const wxString &fileName, - int lineNumber) - : m_fileName(fileName), m_lineNumber(lineNumber) {} - - const wxString &GetFileName() const { return m_fileName; } - int GetLineNumber() const { return m_lineNumber; } - - private: - wxString m_fileName; - int m_lineNumber; - }; - public: --- 75,78 ---- Index: dservice.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/dservice.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** dservice.h 6 Sep 2006 05:33:08 -0000 1.13 --- dservice.h 6 Sep 2006 22:23:19 -0000 1.14 *************** *** 73,77 **** bool Error() { return !m_socket || m_socket->Error(); } // Is Socket Connected, from wxSocketBase ! bool IsConnected() { return m_socket && m_socket->IsConnected(); } // Is Socket Connected, from wxSocketBase bool WaitForRead(long seconds = 0, long milliseconds = 300) { return m_socket && m_socket->WaitForRead(seconds, milliseconds); } --- 73,77 ---- bool Error() { return !m_socket || m_socket->Error(); } // Is Socket Connected, from wxSocketBase ! virtual bool IsConnected() { return m_socket && m_socket->IsConnected(); } // Is Socket Connected, from wxSocketBase bool WaitForRead(long seconds = 0, long milliseconds = 300) { return m_socket && m_socket->WaitForRead(seconds, milliseconds); } *************** *** 120,128 **** static wxString GetBreakPointKey(const wxFileName& fileName, int line) { - #if wxCHECK_VERSION(2,3,0) return wxString::Format(wxT("%u:%s"), line, fileName.GetFullPath().c_str()); - #else - return wxString::Format(wxT("%u:%s"), line, fileName.c_str()); - #endif } --- 120,124 ---- *************** *** 290,313 **** bool Connect(const wxString& hostname = wxT("localhost"), int portNumber = WXLUA_SOCKET_PORT); ! // Debugger Commands ! bool AddBreakPoint(const wxString &fileName, int lineNumber); ! bool RemoveBreakPoint(const wxString &fileName, int lineNumber); ! bool DisableBreakPoint(const wxString &fileName, int lineNumber); ! bool EnableBreakPoint(const wxString &fileName, int lineNumber); ! bool ClearAllBreakPoints(); ! bool Step(); ! bool StepOver(); ! bool StepOut(); ! bool Continue(); ! bool Break(); ! bool EnumerateStack(); ! bool Reset(); ! bool EnumerateStackEntry(int stackEntry); ! bool EnumerateTable(int tableRef, int nIndex, long nItemNode); ! bool CleanupDebugReferences(); protected: void OnSocketEvent(wxSocketEvent& event); - void NotifyError(const wxString &msg); // Not Required for Debug Service --- 286,293 ---- bool Connect(const wxString& hostname = wxT("localhost"), int portNumber = WXLUA_SOCKET_PORT); ! virtual wxLuaSocketBase* GetSocketBase() { return m_debuggerSocket; } protected: void OnSocketEvent(wxSocketEvent& event); // Not Required for Debug Service *************** *** 318,322 **** mutable wxCriticalSection m_debuggerSocketCriticalSection; wxLuaDebugSocket* m_debuggerSocket; - int m_portNumber; DECLARE_EVENT_TABLE() --- 298,301 ---- |
From: John L. <jr...@us...> - 2006-09-06 22:23:25
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14464/wxLua/modules/wxluasocket/src Modified Files: dservice.cpp wxldserv.cpp wxlsock.cpp wxluasocket.cpp Log Message: more code refactoring, move more functions into wxLuaDebuggerBase Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxldserv.cpp 6 Sep 2006 05:33:09 -0000 1.15 --- wxldserv.cpp 6 Sep 2006 22:23:20 -0000 1.16 *************** *** 159,325 **** IMPLEMENT_ABSTRACT_CLASS(wxLuaDebuggerBase, wxEvtHandler) ! // ---------------------------------------------------------------------------- ! // wxLuaDebugServer ! // ---------------------------------------------------------------------------- ! IMPLEMENT_ABSTRACT_CLASS(wxLuaDebugServer, wxLuaDebuggerBase) ! ! wxString wxLuaDebugServer::sm_programName; ! wxString wxLuaDebugServer::sm_networkName; ! [...1104 lines suppressed...] - { - if (m_acceptedSocket != NULL) - { - try - { - if (m_acceptedSocket->WriteByte(wxLUA_CMD_EVALUATE_EXPR) && - m_acceptedSocket->WriteInt(exprRef) && - m_acceptedSocket->WriteString(strExpression)) - { - return true; - } - } - catch(wxLuaSocketException & /*e*/) - { - } - } - return false; - } - --- 852,853 ---- Index: dservice.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/dservice.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** dservice.cpp 6 Sep 2006 05:33:09 -0000 1.18 --- dservice.cpp 6 Sep 2006 22:23:20 -0000 1.19 *************** *** 748,894 **** switch(event.GetSocketEvent()) { ! case wxSOCKET_CONNECTION: { wxCriticalSectionLocker locker(m_debuggerSocketCriticalSection); m_debuggerSocket->SetSocket(sock); } ! break; ! ! case wxSOCKET_INPUT: ! { ! wxCriticalSectionLocker locker(m_debuggerSocketCriticalSection); ! ! if (!m_debuggerSocket->GetSocket()) ! return; ! ! wxASSERT_MSG(m_debuggerSocket->GetSocket() == sock,_("Debugger Socket Incorrect")); ! ! m_debuggerSocket->SetSocket(sock); ! ! // We disable input events, so that the test doesn't trigger ! // wxSocketEvent again. ! sock->SetNotify(wxSOCKET_LOST_FLAG); ! ! // Events from Debug Service ! int debuggeeEvent = m_debuggerSocket->ReadByte(); ! switch((wxLuaDebugEvents_Type) debuggeeEvent) { ! case wxLUA_EVENT_DEBUG_BREAK: ! { ! wxString fileName = m_debuggerSocket->ReadString(); ! int lineNumber = m_debuggerSocket->ReadInt(); ! ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAK, lineNumber, fileName); ! ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! ! case wxLUA_EVENT_DEBUG_PRINT: ! { ! wxString strMessage = m_debuggerSocket->ReadString(); ! ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_PRINT); ! debugEvent.SetMessage(strMessage); ! ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! ! case wxLUA_EVENT_DEBUG_ERROR: ! { ! wxString strMessage = m_debuggerSocket->ReadString(); ! ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_ERROR); ! debugEvent.SetMessage(strMessage); ! ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! ! case wxLUA_EVENT_DEBUG_EXIT: ! { ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EXIT); ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! ! case wxLUA_EVENT_DEBUG_STACK_ENUM: ! { ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENUM); ! wxLuaDebugData *pDebugData = m_debuggerSocket->ReadDebugData(); ! if (pDebugData != NULL) ! debugEvent.SetDebugData(-1, pDebugData); ! ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! ! case wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM: ! { ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM); ! int stackRef = m_debuggerSocket->ReadInt(); ! wxLuaDebugData *pDebugData = m_debuggerSocket->ReadDebugData(); ! if (pDebugData != NULL) ! debugEvent.SetDebugData(stackRef, pDebugData); ! ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! ! case wxLUA_EVENT_DEBUG_TABLE_ENUM: ! { ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_TABLE_ENUM); ! long itemNode = m_debuggerSocket->ReadLong(); ! wxLuaDebugData *pDebugData = m_debuggerSocket->ReadDebugData(); ! if (pDebugData != NULL) ! debugEvent.SetDebugData(itemNode, pDebugData); ! ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! ! case wxLUA_EVENT_DEBUG_EVALUATE_EXPR: ! { ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EVALUATE_EXPR); ! int exprRef = m_debuggerSocket->ReadInt(); ! wxString strResult = m_debuggerSocket->ReadString(); ! debugEvent.SetMessage(strResult); ! debugEvent.SetDebugData(exprRef); ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! case wxLUA_EVENT_DEBUG_BREAKPOINT_ADDED: ! { ! wxString fileName = m_debuggerSocket->ReadString(); ! int line = m_debuggerSocket->ReadInt(); ! bool enabled = m_debuggerSocket->ReadInt() ? true : false; ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_ADDED, line, fileName, enabled); ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } ! break; ! case wxLUA_EVENT_DEBUG_BREAKPOINT_REMOVED: ! { ! wxString fileName = m_debuggerSocket->ReadString(); ! int line = m_debuggerSocket->ReadInt(); ! wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAKPOINT_REMOVED, line, fileName); ! wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); ! } break; } ! ! // Enable input events again. ! sock->SetNotify(wxSOCKET_LOST_FLAG | wxSOCKET_INPUT_FLAG); ! break; ! } ! ! case wxSOCKET_LOST: { wxCriticalSectionLocker locker(m_debuggerSocketCriticalSection); --- 748,782 ---- switch(event.GetSocketEvent()) { ! case wxSOCKET_CONNECTION: { wxCriticalSectionLocker locker(m_debuggerSocketCriticalSection); m_debuggerSocket->SetSocket(sock); + break; } ! case wxSOCKET_INPUT: { ! wxCriticalSectionLocker locker(m_debuggerSocketCriticalSection); ! if (!m_debuggerSocket->GetSocket()) ! return; ! wxASSERT_MSG(m_debuggerSocket->GetSocket() == sock,_("Debugger Socket Incorrect")); ! m_debuggerSocket->SetSocket(sock); ! // We disable input events, so that the test doesn't trigger ! // wxSocketEvent again. ! sock->SetNotify(wxSOCKET_LOST_FLAG); ! // Events from Debug Service ! int debuggeeEvent = m_debuggerSocket->ReadByte(); ! HandleDebugEvent((wxLuaDebugEvents_Type) debuggeeEvent); ! // Enable input events again. ! sock->SetNotify(wxSOCKET_LOST_FLAG | wxSOCKET_INPUT_FLAG); break; } ! case wxSOCKET_LOST: { wxCriticalSectionLocker locker(m_debuggerSocketCriticalSection); *************** *** 898,1051 **** sock->Destroy(); delete sock; } ! break; ! ! default: ! // Error ! break; } } - bool wxLuaDebugger::AddBreakPoint(const wxString &fileName, int lineNumber) - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_ADD_BREAKPOINT) && - m_debuggerSocket->WriteString(fileName) && - m_debuggerSocket->WriteInt(lineNumber)); - } - - bool wxLuaDebugger::RemoveBreakPoint(const wxString &fileName, int lineNumber) - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_REMOVE_BREAKPOINT) && - m_debuggerSocket->WriteString(fileName) && - m_debuggerSocket->WriteInt(lineNumber)); - } - - bool wxLuaDebugger::DisableBreakPoint(const wxString &fileName, int lineNumber) - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_DISABLE_BREAKPOINT) && - m_debuggerSocket->WriteString(fileName) && - m_debuggerSocket->WriteInt(lineNumber)); - } - - bool wxLuaDebugger::EnableBreakPoint(const wxString &fileName, int lineNumber) - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_ENABLE_BREAKPOINT) && - m_debuggerSocket->WriteString(fileName) && - m_debuggerSocket->WriteInt(lineNumber)); - } - - bool wxLuaDebugger::ClearAllBreakPoints() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_CLEAR_ALL_BREAKPOINTS)); - } - - bool wxLuaDebugger::Step() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return m_debuggerSocket->WriteByte(wxLUA_CMD_DEBUG_STEP); - } - - bool wxLuaDebugger::StepOver() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return m_debuggerSocket->WriteByte(wxLUA_CMD_DEBUG_STEPOVER); - } - - bool wxLuaDebugger::StepOut() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return m_debuggerSocket->WriteByte(wxLUA_CMD_DEBUG_STEPOUT); - } - - bool wxLuaDebugger::Continue() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return m_debuggerSocket->WriteByte(wxLUA_CMD_DEBUG_CONTINUE); - } - - bool wxLuaDebugger::Break() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return m_debuggerSocket->WriteByte(wxLUA_CMD_DEBUG_BREAK); - } - - bool wxLuaDebugger::EnumerateStack() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return m_debuggerSocket->WriteByte(wxLUA_CMD_ENUMERATE_STACK); - } - - bool wxLuaDebugger::Reset() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return m_debuggerSocket->WriteByte(wxLUA_CMD_RESET); - } - - bool wxLuaDebugger::EnumerateStackEntry(int stackEntry) - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_ENUMERATE_STACK_ENTRY) && - m_debuggerSocket->WriteInt(stackEntry)); - } - - bool wxLuaDebugger::EnumerateTable(int tableRef, int nIndex, long nItemNode) - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_ENUMERATE_TABLE_REF) && - m_debuggerSocket->WriteInt(tableRef) && - m_debuggerSocket->WriteInt(nIndex) && - m_debuggerSocket->WriteLong(nItemNode)); - } - - bool wxLuaDebugger::CleanupDebugReferences() - { - if (!m_debuggerSocket->IsConnected()) - return false; - - return (m_debuggerSocket->WriteByte(wxLUA_CMD_CLEAR_DEBUG_REFERENCES)); - } - - void wxLuaDebugger::NotifyError(const wxString &msg) - { - wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_ERROR); - - debugEvent.SetMessage(msg); - - wxLuaHandler::GetHandler().AddPendingEvent(debugEvent); - } - // ---------------------------------------------------------------------------- // wxLuaDebuggee - The Lua Interpreter Being Debugged --- 786,797 ---- sock->Destroy(); delete sock; + break; } ! default: ! // Error ! break; } } // ---------------------------------------------------------------------------- // wxLuaDebuggee - The Lua Interpreter Being Debugged Index: wxluasocket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxluasocket.cpp 8 Jun 2006 03:22:11 -0000 1.2 --- wxluasocket.cpp 6 Sep 2006 22:23:20 -0000 1.3 *************** *** 54,58 **** wxString buffer = lua2wx(wxlState.GetStringType(1)); // compile the file ! bool fResult = wxLuaDebugServer::Compile(buffer, fileName); // push result lua_pushboolean(L, fResult); --- 54,59 ---- wxString buffer = lua2wx(wxlState.GetStringType(1)); // compile the file ! wxLuaDebuggerBase debuggerBase; ! bool fResult = debuggerBase.Compile(buffer, fileName); // push result lua_pushboolean(L, fResult); Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxlsock.cpp 6 Sep 2006 05:33:09 -0000 1.8 --- wxlsock.cpp 6 Sep 2006 22:23:20 -0000 1.9 *************** *** 312,317 **** sockaddr_in localAddr = { 0 }; ! localAddr.sin_family = AF_INET; ! localAddr.sin_port = htons(portNumber); localAddr.sin_addr.s_addr = htonl(INADDR_ANY); --- 312,317 ---- sockaddr_in localAddr = { 0 }; ! localAddr.sin_family = AF_INET; ! localAddr.sin_port = htons(portNumber); localAddr.sin_addr.s_addr = htonl(INADDR_ANY); *************** *** 410,427 **** } ! return length_; } // Read data from an open socket, repeat reading until all data has been read ! int wxLuaSocket::Read(char *buffer, int length) { if ((m_sockstate != SOCKET_CONNECTED) && (m_sockstate != SOCKET_ACCEPTED)) throw wxLuaSocketException(wxLuaSocketException::SOCKET_NOT_CONNECTED); while (length > 0) { int numRead = ::recv(m_sock, buffer, length, 0); if (numRead == 0) ! return length; if (numRead == SOCKET_ERROR) --- 410,429 ---- } ! return length_ - length; } // Read data from an open socket, repeat reading until all data has been read ! int wxLuaSocket::Read(char *buffer, int length_) { if ((m_sockstate != SOCKET_CONNECTED) && (m_sockstate != SOCKET_ACCEPTED)) throw wxLuaSocketException(wxLuaSocketException::SOCKET_NOT_CONNECTED); + int length = length_; + while (length > 0) { int numRead = ::recv(m_sock, buffer, length, 0); if (numRead == 0) ! return length_ - length; if (numRead == SOCKET_ERROR) *************** *** 431,435 **** buffer += numRead; } ! return 0; } --- 433,438 ---- buffer += numRead; } ! ! return length_ - length; } |
From: John L. <jr...@us...> - 2006-09-06 22:23:24
|
Update of /cvsroot/wxlua/wxLua/bindings/wxluasocket In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14464/wxLua/bindings/wxluasocket Modified Files: override.hpp Log Message: more code refactoring, move more functions into wxLuaDebuggerBase Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluasocket/override.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** override.hpp 24 May 2006 15:41:55 -0000 1.1 --- override.hpp 6 Sep 2006 22:23:18 -0000 1.2 *************** *** 9,13 **** wxString buffer = lua2wx(wxlState.GetStringType(1)); // compile the file ! bool fResult = wxLuaDebugServer::Compile(buffer, fileName); // push result lua_pushboolean(L, fResult); --- 9,14 ---- wxString buffer = lua2wx(wxlState.GetStringType(1)); // compile the file ! wxLuaDebuggerBase debuggerBase; ! bool fResult = debuggerBase.Compile(buffer, fileName); // push result lua_pushboolean(L, fResult); |