Index: ActivityView.cpp =================================================================== RCS file: /cvs/mushclient/ActivityView.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** ActivityView.cpp 24 Nov 2004 02:27:24 -0000 1.15 --- ActivityView.cpp 12 Jun 2007 04:01:56 -0000 1.16 *************** *** 106,118 **** App.RestoreColumnConfiguration ("Activity List", eColumnCount, GetListCtrl (), iColOrder, iColWidth, m_last_col, m_reverse); ! GetListCtrl ().InsertColumn(eColumnSeq, "Seq", LVCFMT_RIGHT, iColWidth [eColumnSeq]); ! GetListCtrl ().InsertColumn(eColumnMush, "World", LVCFMT_LEFT, iColWidth [eColumnMush]); ! GetListCtrl ().InsertColumn(eColumnNew, "New", LVCFMT_RIGHT, iColWidth [eColumnNew]); ! GetListCtrl ().InsertColumn(eColumnLines, "Lines", LVCFMT_RIGHT, iColWidth [eColumnLines]); ! GetListCtrl ().InsertColumn(eColumnStatus, "Status", LVCFMT_LEFT, iColWidth [eColumnStatus]); ! GetListCtrl ().InsertColumn(eColumnSince, "Since", LVCFMT_LEFT, iColWidth [eColumnSince]); ! GetListCtrl ().InsertColumn(eColumnDuration, "Duration", LVCFMT_RIGHT, iColWidth [eColumnDuration]); // recover column sequence --- 106,118 ---- App.RestoreColumnConfiguration ("Activity List", eColumnCount, GetListCtrl (), iColOrder, iColWidth, m_last_col, m_reverse); ! GetListCtrl ().InsertColumn(eColumnSeq, TranslateHeading ("Seq"), LVCFMT_RIGHT, iColWidth [eColumnSeq]); ! GetListCtrl ().InsertColumn(eColumnMush, TranslateHeading ("World"), LVCFMT_LEFT, iColWidth [eColumnMush]); ! GetListCtrl ().InsertColumn(eColumnNew, TranslateHeading ("New"), LVCFMT_RIGHT, iColWidth [eColumnNew]); ! GetListCtrl ().InsertColumn(eColumnLines, TranslateHeading ("Lines"), LVCFMT_RIGHT, iColWidth [eColumnLines]); ! GetListCtrl ().InsertColumn(eColumnStatus, TranslateHeading ("Status"), LVCFMT_LEFT, iColWidth [eColumnStatus]); ! GetListCtrl ().InsertColumn(eColumnSince, TranslateHeading ("Since"), LVCFMT_LEFT, iColWidth [eColumnSince]); ! GetListCtrl ().InsertColumn(eColumnDuration, TranslateHeading ("Duration"), LVCFMT_RIGHT, iColWidth [eColumnDuration]); // recover column sequence Index: AsciiArtDlg.cpp =================================================================== RCS file: /cvs/mushclient/AsciiArtDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** AsciiArtDlg.cpp 12 Apr 2002 05:01:03 -0000 1.2 --- AsciiArtDlg.cpp 11 Jun 2007 10:42:08 -0000 1.3 *************** *** 46,52 **** if (m_strText.IsEmpty ()) { ! ::AfxMessageBox("You must specify some text to insert."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } --- 46,52 ---- if (m_strText.IsEmpty ()) { ! ::TMessageBox("You must specify some text to insert."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } *************** *** 56,62 **** if (m_strFont.IsEmpty ()) { ! ::AfxMessageBox("You must specify a font file."); DDX_Text(pDX, IDC_FONT, m_strFont); pDX->Fail(); } --- 56,62 ---- if (m_strFont.IsEmpty ()) { ! ::TMessageBox("You must specify a font file."); DDX_Text(pDX, IDC_FONT, m_strFont); pDX->Fail(); } Index: CHATSOCK.CPP =================================================================== RCS file: /cvs/mushclient/CHATSOCK.CPP,v retrieving revision 1.36 retrieving revision 1.39 diff -c -r1.36 -r1.39 *** CHATSOCK.CPP 3 Apr 2007 00:59:36 -0000 1.36 --- CHATSOCK.CPP 12 Jun 2007 04:01:56 -0000 1.39 *************** *** 385,392 **** if (m_pDoc->m_bValidateIncomingCalls) { m_pDoc->Activate (); ! if (::AfxMessageBox ( ! CFormat ("Incoming chat call to world %s from %s, IP address: %s.\n\nAccept it?", (LPCTSTR) m_pDoc->m_mush_name, (LPCTSTR) m_strRemoteUserName, (LPCTSTR) inet_ntoa (m_ServerAddr.sin_addr)), --- 385,392 ---- if (m_pDoc->m_bValidateIncomingCalls) { m_pDoc->Activate (); ! if (::TMessageBox ( ! TFormat ("Incoming chat call to world %s from %s, IP address: %s.\n\nAccept it?", (LPCTSTR) m_pDoc->m_mush_name, (LPCTSTR) m_strRemoteUserName, (LPCTSTR) inet_ntoa (m_ServerAddr.sin_addr)), *************** *** 401,407 **** } // end of needing to validate calls m_pDoc->ChatNote (eChatSession, ! CFormat ("Chat session accepted, remote user: \"%s\"", (LPCTSTR) m_strRemoteUserName)); // tell them our acceptance, and chat name --- 401,407 ---- } // end of needing to validate calls m_pDoc->ChatNote (eChatSession, ! TFormat ("Chat session accepted, remote user: \"%s\"", (LPCTSTR) m_strRemoteUserName)); // tell them our acceptance, and chat name *************** *** 557,563 **** if (count == SOCKET_ERROR && nError != WSAEWOULDBLOCK) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("Unable to send to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nError, m_pDoc->GetSocketError (nError))); --- 557,563 ---- if (count == SOCKET_ERROR && nError != WSAEWOULDBLOCK) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("Unable to send to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nError, m_pDoc->GetSocketError (nError))); *************** *** 588,594 **** if (nErrorCode != 0) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("Unable to connect to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nErrorCode, m_pDoc->GetSocketError (nErrorCode))); --- 588,594 ---- if (nErrorCode != 0) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("Unable to connect to \"%s\", code = %i (%s)", (LPCTSTR) m_strServerName, nErrorCode, m_pDoc->GetSocketError (nErrorCode))); *************** *** 597,603 **** } m_pDoc->ChatNote (eChatSession, ! CFormat ("Session established to %s.", (LPCTSTR) m_strServerName)); CString strHostName; --- 597,603 ---- } m_pDoc->ChatNote (eChatSession, ! TFormat ("Session established to %s.", (LPCTSTR) m_strServerName)); CString strHostName; *************** *** 629,635 **** if (WSAGETASYNCERROR (lParam)) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("Chat session cannot resolve host name: %s.", (LPCTSTR) m_strServerName)); m_bDeleteMe = true; m_iChatStatus = eChatClosed; --- 629,635 ---- if (WSAGETASYNCERROR (lParam)) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("Chat session cannot resolve host name: %s.", (LPCTSTR) m_strServerName)); m_bDeleteMe = true; m_iChatStatus = eChatClosed; *************** *** 668,674 **** ntohs (pSocket->m_ServerAddr.sin_port) == m_iAllegedPort) { m_pDoc->ChatNote (eChatConnection, ! CFormat ("You are already connected to %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); --- 668,674 ---- ntohs (pSocket->m_ServerAddr.sin_port) == m_iAllegedPort) { m_pDoc->ChatNote (eChatConnection, ! TFormat ("You are already connected to %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); *************** *** 678,684 **** } // end of checking them m_pDoc->ChatNote (eChatConnection, ! CFormat ("Calling chat server at %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); --- 678,684 ---- } // end of checking them m_pDoc->ChatNote (eChatConnection, ! TFormat ("Calling chat server at %s port %d", (LPCTSTR) m_strAllegedAddress, m_iAllegedPort)); *************** *** 728,734 **** return; #if CHAT_DEBUG ! m_pDoc->Note (CFormat ("Received chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); --- 728,734 ---- return; #if CHAT_DEBUG ! m_pDoc->Note (TFormat ("Received chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); *************** *** 793,803 **** // tell them we don't support that SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s does not support the chat command %i.\n", m_pDoc->m_strOurChatName, iMessage)); // tell us we got it m_pDoc->ChatNote (eChatInformation, ! CFormat ("Received unsupported chat command %i from %s", iMessage, (LPCTSTR) m_strRemoteUserName)); break; --- 793,803 ---- // tell them we don't support that SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s does not support the chat command %i.\n", m_pDoc->m_strOurChatName, iMessage)); // tell us we got it m_pDoc->ChatNote (eChatInformation, ! TFormat ("Received unsupported chat command %i from %s", iMessage, (LPCTSTR) m_strRemoteUserName)); break; *************** *** 816,822 **** return; #if CHAT_DEBUG ! m_pDoc->Note (CFormat ("Sending chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); --- 816,822 ---- return; #if CHAT_DEBUG ! m_pDoc->Note (TFormat ("Sending chat message %i on %i, data: \"%s\"", iMessage, m_iChatID, (LPCTSTR) strMessage)); *************** *** 914,920 **** m_strRemoteUserName = strMessage; m_pDoc->ChatNote (eChatNameChange, ! CFormat ("%s has changed his/her name to %s.", (LPCTSTR) strOldName, (LPCTSTR) m_strRemoteUserName)); --- 914,920 ---- m_strRemoteUserName = strMessage; m_pDoc->ChatNote (eChatNameChange, ! TFormat ("%s has changed his/her name to %s.", (LPCTSTR) strOldName, (LPCTSTR) m_strRemoteUserName)); *************** *** 944,950 **** } // end of doing all m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s has requested your public connections", (LPCTSTR) m_strRemoteUserName)); SendChatMessage (CHAT_CONNECTION_LIST, strResult); } // end of CChatSocket::Process_Request_connections --- 944,950 ---- } // end of doing all m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s has requested your public connections", (LPCTSTR) m_strRemoteUserName)); SendChatMessage (CHAT_CONNECTION_LIST, strResult); } // end of CChatSocket::Process_Request_connections *************** *** 955,961 **** StringToList (strMessage, ",", strList); int iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatConnectionList, ! CFormat ("Found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); --- 955,961 ---- StringToList (strMessage, ",", strList); int iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatConnectionList, ! TFormat ("Found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); *************** *** 1096,1102 **** if (!m_bCanSendFiles) { SendChatMessage (CHAT_FILE_DENY, ! CFormat ("%s is not allowing file transfers from you.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } --- 1096,1102 ---- if (!m_bCanSendFiles) { SendChatMessage (CHAT_FILE_DENY, ! TFormat ("%s is not allowing file transfers from you.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } *************** *** 1117,1123 **** m_strSenderFileName.Find (_T("\\")) != -1) { SendChatMessage (CHAT_FILE_DENY, ! CFormat ("Supplied file name of \"%s\" may not contain slashes.", (LPCTSTR) m_strSenderFileName)); return; } --- 1117,1123 ---- m_strSenderFileName.Find (_T("\\")) != -1) { SendChatMessage (CHAT_FILE_DENY, ! TFormat ("Supplied file name of \"%s\" may not contain slashes.", (LPCTSTR) m_strSenderFileName)); return; } *************** *** 1140,1147 **** if (!m_pDoc->m_bAutoAllowFiles) { m_pDoc->Activate (); ! if (::AfxMessageBox ( ! CFormat ("%s wishes to send you the file \"%s\", size %ld bytes (%1.1f Kb).\n\nAccept it?", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strSenderFileName, m_iFileSize, --- 1140,1147 ---- if (!m_pDoc->m_bAutoAllowFiles) { m_pDoc->Activate (); ! if (UMessageBox ( ! TFormat ("%s wishes to send you the file \"%s\", size %ld bytes (%1.1f Kb).\n\nAccept it?", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strSenderFileName, m_iFileSize, *************** *** 1162,1168 **** _T("|"), // filter &Frame); // parent window ! CString strTitle = CFormat ("Chat: Save file from %s as ...", (LPCTSTR) m_strRemoteUserName); filedlg.m_ofn.lpstrTitle = strTitle; --- 1162,1168 ---- _T("|"), // filter &Frame); // parent window ! CString strTitle = TFormat ("Chat: Save file from %s as ...", (LPCTSTR) m_strRemoteUserName); filedlg.m_ofn.lpstrTitle = strTitle; *************** *** 1190,1196 **** { // tell them our rejection SendChatMessage (CHAT_FILE_DENY, ! CFormat ("%s does not want that particular file.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } // end of this file not wanted right now --- 1190,1196 ---- { // tell them our rejection SendChatMessage (CHAT_FILE_DENY, ! TFormat ("%s does not want that particular file.", (LPCTSTR) m_pDoc->m_strOurChatName)); return; } // end of this file not wanted right now *************** *** 1203,1211 **** catch (CFileException * e) { SendChatMessage (CHAT_FILE_DENY, ! CFormat ("%s can not open that file.", (LPCTSTR) m_pDoc->m_strOurChatName)); ! m_pDoc->ChatNote (eChatFile, CFormat ("File %s cannot be opened.", (LPCTSTR) m_strOurFileName)); e->Delete (); // reset the two fields we changed so far --- 1203,1211 ---- catch (CFileException * e) { SendChatMessage (CHAT_FILE_DENY, ! TFormat ("%s can not open that file.", (LPCTSTR) m_pDoc->m_strOurChatName)); ! m_pDoc->ChatNote (eChatFile, TFormat ("File %s cannot be opened.", (LPCTSTR) m_strOurFileName)); e->Delete (); // reset the two fields we changed so far *************** *** 1221,1227 **** SendChatMessage (CHAT_FILE_BLOCK_REQUEST, ""); m_pDoc->ChatNote (eChatFile, ! CFormat ( "Receiving a file from %s -- Filename: %s, Length: %ld bytes (%1.1f Kb).", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strOurFileName, --- 1221,1227 ---- SendChatMessage (CHAT_FILE_BLOCK_REQUEST, ""); m_pDoc->ChatNote (eChatFile, ! TFormat ( "Receiving a file from %s -- Filename: %s, Length: %ld bytes (%1.1f Kb).", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) m_strOurFileName, *************** *** 1287,1293 **** { SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to read error by sender."); m_pDoc->ChatNote (eChatFile, ! CFormat ("Send of file \"%s\" aborted due to read error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; --- 1287,1293 ---- { SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to read error by sender."); m_pDoc->ChatNote (eChatFile, ! TFormat ("Send of file \"%s\" aborted due to read error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; *************** *** 1302,1312 **** if (m_iBlocksTransferred >= m_iFileBlocks) { SendChatMessage (CHAT_FILE_END, ""); ! m_pDoc->ChatNote (eChatFile, CFormat ("Send of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); SendChatMessage (CHAT_MESSAGE, ! CFormat ("Sumcheck from sender was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1302,1312 ---- if (m_iBlocksTransferred >= m_iFileBlocks) { SendChatMessage (CHAT_FILE_END, ""); ! m_pDoc->ChatNote (eChatFile, TFormat ("Send of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); SendChatMessage (CHAT_MESSAGE, ! TFormat ("Sumcheck from sender was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1315,1321 **** )); // tell sender sumcheck m_pDoc->ChatNote (eChatFile, ! CFormat ("Sumcheck we calculated: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1315,1321 ---- )); // tell sender sumcheck m_pDoc->ChatNote (eChatFile, ! TFormat ("Sumcheck we calculated: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1365,1371 **** SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to write error by receiver."); m_pDoc->ChatNote (eChatFile, ! CFormat ("Receive of file \"%s\" aborted due to write error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; --- 1365,1371 ---- SendChatMessage (CHAT_MESSAGE, "File transfer aborted due to write error by receiver."); m_pDoc->ChatNote (eChatFile, ! TFormat ("Receive of file \"%s\" aborted due to write error.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // close file return; *************** *** 1383,1393 **** if (m_iBlocksTransferred >= m_iFileBlocks) { ! m_pDoc->ChatNote (eChatFile,CFormat ("Receive of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); m_pDoc->ChatNote (eChatFile, ! CFormat ("Sumcheck as written was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1383,1393 ---- if (m_iBlocksTransferred >= m_iFileBlocks) { ! m_pDoc->ChatNote (eChatFile,TFormat ("Receive of file \"%s\" complete.", (LPCTSTR) m_strOurFileName )); shsFinal (&m_shsInfo); m_pDoc->ChatNote (eChatFile, ! TFormat ("Sumcheck as written was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1396,1402 **** )); // notify sender SendChatMessage (CHAT_MESSAGE, ! CFormat ("Sumcheck as received was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], --- 1396,1402 ---- )); // notify sender SendChatMessage (CHAT_MESSAGE, ! TFormat ("Sumcheck as received was: %08X %08X %08X %08X %08X", m_shsInfo.digest [0], m_shsInfo.digest [1], m_shsInfo.digest [2], *************** *** 1421,1427 **** if (m_iFileBlocks != m_iBlocksTransferred) { m_pDoc->ChatNote (eChatFile, ! CFormat ("Transfer of file \"%s\" stopped prematurely.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // too soon - abort it --- 1421,1427 ---- if (m_iFileBlocks != m_iBlocksTransferred) { m_pDoc->ChatNote (eChatFile, ! TFormat ("Transfer of file \"%s\" stopped prematurely.", (LPCTSTR) m_strOurFileName )); StopFileTransfer (true); // too soon - abort it *************** *** 1458,1470 **** CString strPingTime; strPingTime.Format ("%9.3f seconds", m_fLastPingTime); m_pDoc->ChatNote (eChatPing, ! CFormat ("Ping time to %s: %s", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strPingTime)); } else m_pDoc->ChatNote (eChatPing, ! CFormat ("Ping response: %s", (LPCTSTR) strMessage)); } // end of CChatSocket::Process_Ping_response void CChatSocket::Process_Peek_connections (const CString strMessage) --- 1458,1470 ---- CString strPingTime; strPingTime.Format ("%9.3f seconds", m_fLastPingTime); m_pDoc->ChatNote (eChatPing, ! TFormat ("Ping time to %s: %s", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strPingTime)); } else m_pDoc->ChatNote (eChatPing, ! TFormat ("Ping response: %s", (LPCTSTR) strMessage)); } // end of CChatSocket::Process_Ping_response void CChatSocket::Process_Peek_connections (const CString strMessage) *************** *** 1503,1509 **** SendChatMessage (CHAT_PEEK_LIST, strResult); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s is peeking at your connections", (LPCTSTR) m_strRemoteUserName)); } // end of CChatSocket::Process_Peek_connections --- 1503,1509 ---- SendChatMessage (CHAT_PEEK_LIST, strResult); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s is peeking at your connections", (LPCTSTR) m_strRemoteUserName)); } // end of CChatSocket::Process_Peek_connections *************** *** 1519,1525 **** iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatPeekList, ! CFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); --- 1519,1525 ---- iCount = strList.GetCount () / 2; // number of connections m_pDoc->ChatNote (eChatPeekList, ! TFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); *************** *** 1553,1559 **** iCount = strList.GetCount () / 3; // number of connections m_pDoc->ChatNote (eChatPeekList, ! CFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); --- 1553,1559 ---- iCount = strList.GetCount () / 3; // number of connections m_pDoc->ChatNote (eChatPeekList, ! TFormat ("Peek found %i connection%s to %s", PLURAL (iCount), (LPCTSTR) m_strRemoteUserName)); *************** *** 1596,1605 **** if (m_bHeIsSnooping) { SendChatMessage (CHAT_MESSAGE, ! CFormat ("\nYou are no longer snooping %s.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s has stopped snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = false; return; // all done --- 1596,1605 ---- if (m_bHeIsSnooping) { SendChatMessage (CHAT_MESSAGE, ! TFormat ("\nYou are no longer snooping %s.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s has stopped snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = false; return; // all done *************** *** 1608,1631 **** if (m_bCanSnoop) { if (!m_pDoc->m_bAutoAllowSnooping && // don't bother if they don't mind ! ::AfxMessageBox ( ! CFormat ("%s wishes to start snooping you.\n\nPermit it?", (LPCTSTR) m_strRemoteUserName), MB_YESNO) != IDYES) { // tell them our rejection SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s does not want you to snoop just now.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); } // end of snoop not allowed right now else { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! CFormat ("\nYou are now snooping %s.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s is now snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = true; } --- 1608,1631 ---- if (m_bCanSnoop) { if (!m_pDoc->m_bAutoAllowSnooping && // don't bother if they don't mind ! ::TMessageBox ( ! TFormat ("%s wishes to start snooping you.\n\nPermit it?", (LPCTSTR) m_strRemoteUserName), MB_YESNO) != IDYES) { // tell them our rejection SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s does not want you to snoop just now.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); } // end of snoop not allowed right now else { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! TFormat ("\nYou are now snooping %s.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s is now snooping you.", (LPCTSTR) m_strRemoteUserName)); m_bHeIsSnooping = true; } *************** *** 1634,1643 **** else { // not allowed to snoop SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s has not given you permission to snoop.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! CFormat ("%s attempted to snoop you.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to snoop --- 1634,1643 ---- else { // not allowed to snoop SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s has not given you permission to snoop.\n", (LPCTSTR) m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatInformation, ! TFormat ("%s attempted to snoop you.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to snoop *************** *** 1692,1702 **** { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! CFormat ("\nYou command %s to '%s'.\n", (LPCTSTR) m_pDoc->m_strOurChatName , (LPCTSTR) strMessage)); m_pDoc->ChatNote (eChatCommand, ! CFormat ("%s commands you to '%s'.", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strMessage)); m_pDoc->m_iExecutionDepth = 0; --- 1692,1702 ---- { // tell them our acceptance SendChatMessage (CHAT_MESSAGE, ! TFormat ("\nYou command %s to '%s'.\n", (LPCTSTR) m_pDoc->m_strOurChatName , (LPCTSTR) strMessage)); m_pDoc->ChatNote (eChatCommand, ! TFormat ("%s commands you to '%s'.", (LPCTSTR) m_strRemoteUserName, (LPCTSTR) strMessage)); m_pDoc->m_iExecutionDepth = 0; *************** *** 1705,1714 **** else { // not allowed to send commands SendChatMessage (CHAT_MESSAGE, ! CFormat ("\n%s has not given you permission to send commands.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatCommand, ! CFormat ("%s attempted to send you a command.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to end commands --- 1705,1714 ---- else { // not allowed to send commands SendChatMessage (CHAT_MESSAGE, ! TFormat ("\n%s has not given you permission to send commands.\n", m_pDoc->m_strOurChatName)); m_pDoc->ChatNote (eChatCommand, ! TFormat ("%s attempted to send you a command.", (LPCTSTR) m_strRemoteUserName)); } // end of not allowed to end commands Index: ChatListDlg.cpp =================================================================== RCS file: /cvs/mushclient/ChatListDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** ChatListDlg.cpp 27 Nov 2004 09:11:30 -0000 1.4 --- ChatListDlg.cpp 12 Jun 2007 04:01:56 -0000 1.5 *************** *** 151,157 **** CDialog::OnInitDialog(); // update window title ! SetWindowText (CFormat ("Chat sessions for %s", m_pDoc->m_mush_name)); int iColOrder [eColumnChatCount] = {0, 1, 2, 3, 4, 5}, iColWidth [eColumnChatCount] = {90, 66, 81, 81, 55, 50}; --- 151,157 ---- CDialog::OnInitDialog(); // update window title ! SetWindowText (TFormat ("Chat sessions for %s", m_pDoc->m_mush_name)); int iColOrder [eColumnChatCount] = {0, 1, 2, 3, 4, 5}, iColWidth [eColumnChatCount] = {90, 66, 81, 81, 55, 50}; *************** *** 161,172 **** App.RestoreColumnConfiguration ("Chat List", eColumnChatCount, m_ctlChatList, iColOrder, iColWidth, m_last_col, m_reverse); ! m_ctlChatList.InsertColumn(eColumnChatName, "Name", LVCFMT_LEFT, iColWidth [eColumnChatName]); ! m_ctlChatList.InsertColumn(eColumnGroup, "Group", LVCFMT_LEFT, iColWidth [eColumnGroup]); ! m_ctlChatList.InsertColumn(eColumnFromIP, "From IP", LVCFMT_LEFT, iColWidth [eColumnFromIP]); ! m_ctlChatList.InsertColumn(eColumnCallIP, "Call IP", LVCFMT_LEFT, iColWidth [eColumnCallIP]); ! m_ctlChatList.InsertColumn(eColumnCallPort, "Call Port", LVCFMT_LEFT, iColWidth [eColumnCallPort]); ! m_ctlChatList.InsertColumn(eColumnFlags, "Flags", LVCFMT_LEFT, iColWidth [eColumnFlags]); // recover column sequence --- 161,172 ---- App.RestoreColumnConfiguration ("Chat List", eColumnChatCount, m_ctlChatList, iColOrder, iColWidth, m_last_col, m_reverse); ! m_ctlChatList.InsertColumn(eColumnChatName, TranslateHeading ("Name"), LVCFMT_LEFT, iColWidth [eColumnChatName]); ! m_ctlChatList.InsertColumn(eColumnGroup, TranslateHeading ("Group"), LVCFMT_LEFT, iColWidth [eColumnGroup]); ! m_ctlChatList.InsertColumn(eColumnFromIP, TranslateHeading ("From IP"), LVCFMT_LEFT, iColWidth [eColumnFromIP]); ! m_ctlChatList.InsertColumn(eColumnCallIP, TranslateHeading ("Call IP"), LVCFMT_LEFT, iColWidth [eColumnCallIP]); ! m_ctlChatList.InsertColumn(eColumnCallPort, TranslateHeading ("Call Port"), LVCFMT_LEFT, iColWidth [eColumnCallPort]); ! m_ctlChatList.InsertColumn(eColumnFlags, TranslateHeading ("Flags"), LVCFMT_LEFT, iColWidth [eColumnFlags]); // recover column sequence Index: ColourPickerDlg.cpp =================================================================== RCS file: /cvs/mushclient/ColourPickerDlg.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** ColourPickerDlg.cpp 3 Jan 2005 02:30:40 -0000 1.12 --- ColourPickerDlg.cpp 12 Jun 2007 04:01:56 -0000 1.13 *************** *** 239,245 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlColourList.InsertColumn(0, "Colour name", LVCFMT_LEFT, 130); // swatch m_ctlColourList.InsertColumn(1, "", LVCFMT_LEFT, 91); --- 239,245 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlColourList.InsertColumn(0, TranslateHeading ("Colour name"), LVCFMT_LEFT, 130); // swatch m_ctlColourList.InsertColumn(1, "", LVCFMT_LEFT, 91); *************** *** 386,393 **** m_ctlBlue.SetWindowText (CFormat ("%i", iBlue)); m_ctlHue.SetWindowText (CFormat ("Hue: %5.1f", fHue)); ! m_ctlSaturation.SetWindowText (CFormat ("Saturation: %5.3f", fSaturation)); ! m_ctlLuminance.SetWindowText (CFormat ("Luminance: %5.3f", fLuminance)); m_ctlRedSlider.SetPos (iRed); m_ctlGreenSlider.SetPos (iGreen); --- 386,393 ---- m_ctlBlue.SetWindowText (CFormat ("%i", iBlue)); m_ctlHue.SetWindowText (CFormat ("Hue: %5.1f", fHue)); ! m_ctlSaturation.SetWindowText (TFormat ("Saturation: %5.3f", fSaturation)); ! m_ctlLuminance.SetWindowText (TFormat ("Luminance: %5.3f", fLuminance)); m_ctlRedSlider.SetPos (iRed); m_ctlGreenSlider.SetPos (iGreen); Index: DDV_validation.cpp =================================================================== RCS file: /cvs/mushclient/DDV_validation.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** DDV_validation.cpp 12 Apr 2002 05:01:05 -0000 1.2 --- DDV_validation.cpp 11 Jun 2007 23:44:15 -0000 1.3 *************** *** 38,44 **** { TCHAR szT[32]; if (nMinChars == 1) ! AfxMessageBox(IDS_CANNOT_BE_BLANK, MB_ICONEXCLAMATION, AFX_IDP_PARSE_STRING_SIZE); else { wsprintf(szT, _T("%d"), nMinChars); --- 38,44 ---- { TCHAR szT[32]; if (nMinChars == 1) ! TMessageBox("This field may not be blank", MB_ICONEXCLAMATION); else { wsprintf(szT, _T("%d"), nMinChars); Index: EditDlg.cpp =================================================================== RCS file: /cvs/mushclient/EditDlg.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** EditDlg.cpp 25 Apr 2007 01:35:38 -0000 1.15 --- EditDlg.cpp 11 Jun 2007 10:42:08 -0000 1.16 *************** *** 45,51 **** { if (m_strText.FindOneOf ("\n\r") != -1) { ! ::AfxMessageBox("Line breaks not permitted here."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } --- 45,51 ---- { if (m_strText.FindOneOf ("\n\r") != -1) { ! ::TMessageBox("Line breaks not permitted here."); DDX_Text(pDX, IDC_TEXT, m_strText); pDX->Fail(); } Index: EditVariable.cpp =================================================================== RCS file: /cvs/mushclient/EditVariable.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** EditVariable.cpp 31 Dec 2004 07:03:34 -0000 1.8 --- EditVariable.cpp 11 Jun 2007 10:42:08 -0000 1.9 *************** *** 49,55 **** if (CheckLabel (m_strName)) { ! ::AfxMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); --- 49,55 ---- if (CheckLabel (m_strName)) { ! ::TMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); *************** *** 62,68 **** if (!m_bDoingChange) // only do this on an add if (m_pVariableMap->Lookup (m_strName, variable_item)) { ! ::AfxMessageBox("This variable name is already in the list of variables."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); return; --- 62,68 ---- if (!m_bDoingChange) // only do this on an add if (m_pVariableMap->Lookup (m_strName, variable_item)) { ! ::TMessageBox("This variable name is already in the list of variables."); DDX_Text(pDX, IDC_VARIABLE_NAME, m_strName); pDX->Fail(); return; Index: FindDlg.cpp =================================================================== RCS file: /cvs/mushclient/FindDlg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** FindDlg.cpp 31 Oct 2006 19:57:58 -0000 1.6 --- FindDlg.cpp 11 Jun 2007 10:42:08 -0000 1.7 *************** *** 44,50 **** if (m_strFindText.IsEmpty ()) { ! ::AfxMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } --- 44,50 ---- if (m_strFindText.IsEmpty ()) { ! ::TMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } Index: Finding.cpp =================================================================== RCS file: /cvs/mushclient/Finding.cpp,v retrieving revision 1.12 retrieving revision 1.14 diff -c -r1.12 -r1.14 *** Finding.cpp 20 Apr 2007 02:51:38 -0000 1.12 --- Finding.cpp 11 Jun 2007 21:40:12 -0000 1.14 *************** *** 48,58 **** CString strFindType = "text"; if (FindInfo.m_bRegexp) strFindType = "regular expression"; ! strMsg.Format ("The %s \"%s\" was not found%s", (LPCTSTR) strFindType, (LPCTSTR) FindInfo.m_strFindStringList.GetHead (), FindInfo.m_bAgain ? " again." : " ."); ! ::AfxMessageBox (strMsg, MB_ICONINFORMATION); FindInfo.m_iStartColumn = -1; return false; } // end of NotFound --- 48,58 ---- CString strFindType = "text"; if (FindInfo.m_bRegexp) strFindType = "regular expression"; ! strMsg = TFormat ("The %s \"%s\" was not found%s", (LPCTSTR) strFindType, (LPCTSTR) FindInfo.m_strFindStringList.GetHead (), FindInfo.m_bAgain ? " again." : " ."); ! ::TMessageBox (strMsg, MB_ICONINFORMATION); FindInfo.m_iStartColumn = -1; return false; } // end of NotFound Index: FunctionListDlg.cpp =================================================================== RCS file: /cvs/mushclient/FunctionListDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** FunctionListDlg.cpp 26 Apr 2007 06:10:06 -0000 1.3 --- FunctionListDlg.cpp 11 Jun 2007 10:42:08 -0000 1.4 *************** *** 184,190 **** CDialog::OnOK(); } else ! ::AfxMessageBox ("No function selected"); } void CFunctionListDlg::OnChangeFilter() --- 184,190 ---- CDialog::OnOK(); } else ! ::TMessageBox ("No function selected"); } void CFunctionListDlg::OnChangeFilter() Index: GlobalChangeDlg.cpp =================================================================== RCS file: /cvs/mushclient/GlobalChangeDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** GlobalChangeDlg.cpp 3 Jan 2005 02:30:40 -0000 1.4 --- GlobalChangeDlg.cpp 11 Jun 2007 10:42:08 -0000 1.5 *************** *** 38,44 **** if (m_strChangeFrom.IsEmpty ()) { ! ::AfxMessageBox("This field cannot be empty."); DDX_Text(pDX, IDC_CHANGE_FROM, m_strChangeFrom); pDX->Fail(); } --- 38,44 ---- if (m_strChangeFrom.IsEmpty ()) { ! ::TMessageBox("This field cannot be empty."); DDX_Text(pDX, IDC_CHANGE_FROM, m_strChangeFrom); pDX->Fail(); } Index: GlobalPrefs.cpp =================================================================== RCS file: /cvs/mushclient/GlobalPrefs.cpp,v retrieving revision 1.34 retrieving revision 1.36 diff -c -r1.34 -r1.36 *** GlobalPrefs.cpp 26 Apr 2007 02:55:45 -0000 1.34 --- GlobalPrefs.cpp 11 Jun 2007 23:44:15 -0000 1.36 *************** *** 139,145 **** } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! AfxMessageBox("You have selected too many worlds to add. Please try again with fewer worlds."); UpdateDialogControls(this, TRUE); } --- 139,145 ---- } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! TMessageBox("You have selected too many worlds to add. Please try again with fewer worlds."); UpdateDialogControls(this, TRUE); } *************** *** 437,442 **** --- 437,444 ---- DDX_CBIndex(pDX, IDC_TABS, m_iWindowTabsStyle); DDX_Check(pDX, IDC_FLAT_TOOLBARS, m_bFlatToolbars); DDX_Check(pDX, IDC_NOTIFY_TO_OUTPUT, m_bErrorNotificationToOutputWindow); + DDX_MinMaxString(pDX, IDC_LOCALE, m_strLocale); + DDV_MinMaxString(pDX, m_strLocale, 2, 3); //}}AFX_DATA_MAP } *************** *** 1213,1218 **** --- 1215,1221 ---- propSheet.m_Page2.m_bTriggerRemoveCheck = pApp->m_bTriggerRemoveCheck; propSheet.m_Page2.m_bF1macro = pApp->m_bF1macro; propSheet.m_Page2.m_bAllTypingToCommandWindow = pApp->m_bAllTypingToCommandWindow; + propSheet.m_Page2.m_strLocale = pApp->m_strLocale; propSheet.m_Page3.m_bConfirmBeforeClosingWorld = pApp->m_bConfirmBeforeClosingWorld ; propSheet.m_Page3.m_bConfirmBeforeClosingMushclient = pApp->m_bConfirmBeforeClosingMushclient ; propSheet.m_Page3.m_bConfirmBeforeClosingMXPdebug = pApp->m_bConfirmBeforeClosingMXPdebug ; *************** *** 1322,1327 **** --- 1325,1331 ---- pApp->m_bTriggerRemoveCheck = propSheet.m_Page2.m_bTriggerRemoveCheck; pApp->m_bF1macro = propSheet.m_Page2.m_bF1macro; pApp->m_bAllTypingToCommandWindow = propSheet.m_Page2.m_bAllTypingToCommandWindow; + pApp->m_strLocale = propSheet.m_Page2.m_strLocale; pApp->m_bConfirmBeforeClosingWorld = propSheet.m_Page3.m_bConfirmBeforeClosingWorld ; pApp->m_bConfirmBeforeClosingMushclient = propSheet.m_Page3.m_bConfirmBeforeClosingMushclient ; pApp->m_bConfirmBeforeClosingMXPdebug = propSheet.m_Page3.m_bConfirmBeforeClosingMXPdebug ; *************** *** 1599,1605 **** } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! AfxMessageBox("You have selected too many plugins to add. Please try again with fewer Plugins."); UpdateDialogControls(this, TRUE); --- 1603,1609 ---- } else if (CommDlgExtendedError() == FNERR_BUFFERTOOSMALL) // To many files - buffer not large enough ! TMessageBox("You have selected too many plugins to add. Please try again with fewer Plugins."); UpdateDialogControls(this, TRUE); Index: GlobalPrefs.h =================================================================== RCS file: /cvs/mushclient/GlobalPrefs.h,v retrieving revision 1.25 retrieving revision 1.26 diff -c -r1.25 -r1.26 *** GlobalPrefs.h 1 Apr 2007 04:44:31 -0000 1.25 --- GlobalPrefs.h 11 Jun 2007 23:44:15 -0000 1.26 *************** *** 98,103 **** --- 98,104 ---- int m_iWindowTabsStyle; BOOL m_bFlatToolbars; BOOL m_bErrorNotificationToOutputWindow; + CString m_strLocale; //}}AFX_DATA Index: GoToLineDlg.cpp =================================================================== RCS file: /cvs/mushclient/GoToLineDlg.cpp,v retrieving revision 1.2 retrieving revision 1.4 diff -c -r1.2 -r1.4 *** GoToLineDlg.cpp 12 Apr 2002 05:01:07 -0000 1.2 --- GoToLineDlg.cpp 11 Jun 2007 21:40:12 -0000 1.4 *************** *** 42,49 **** if (m_iLineNumber < 1 || m_iLineNumber > m_iMaxLine) { CString strMessage; ! strMessage.Format ("Line number must be in range 1 to %i", m_iMaxLine); ! ::AfxMessageBox(strMessage); DDX_Text(pDX, IDC_LINE_NUMBER, m_iLineNumber); pDX->Fail(); } --- 42,49 ---- if (m_iLineNumber < 1 || m_iLineNumber > m_iMaxLine) { CString strMessage; ! strMessage = TFormat ("Line number must be in range 1 to %i", m_iMaxLine); ! ::TMessageBox(strMessage); DDX_Text(pDX, IDC_LINE_NUMBER, m_iLineNumber); pDX->Fail(); } Index: HighlightPhraseDlg.cpp =================================================================== RCS file: /cvs/mushclient/HighlightPhraseDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** HighlightPhraseDlg.cpp 3 Apr 2007 23:10:18 -0000 1.4 --- HighlightPhraseDlg.cpp 11 Jun 2007 10:42:08 -0000 1.5 *************** *** 49,55 **** // can't highlight an empty string if (m_strText.IsEmpty ()) { ! ::AfxMessageBox("The text to highlight cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of text being blank --- 49,55 ---- // can't highlight an empty string if (m_strText.IsEmpty ()) { ! ::TMessageBox("The text to highlight cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of text being blank *************** *** 57,63 **** // no change doesn't make sense here if (m_iColour <= 0) { ! ::AfxMessageBox("Please choose a colour other than '(no change)'.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of no colour selected --- 57,63 ---- // no change doesn't make sense here if (m_iColour <= 0) { ! ::TMessageBox("Please choose a colour other than '(no change)'.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } // end of no colour selected *************** *** 68,74 **** m_iOtherBackground_orig == m_iOtherBackground) { ! ::AfxMessageBox("Please choose a different colour than the original one.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } --- 68,74 ---- m_iOtherBackground_orig == m_iOtherBackground) { ! ::TMessageBox("Please choose a different colour than the original one.", MB_ICONSTOP); DDX_Text(pDX, IDC_HIGHLIGHT_TEXT, m_strText); pDX->Fail(); } Index: ImportXMLdlg.cpp =================================================================== RCS file: /cvs/mushclient/ImportXMLdlg.cpp,v retrieving revision 1.9 retrieving revision 1.11 diff -c -r1.9 -r1.11 *** ImportXMLdlg.cpp 14 Oct 2006 05:49:03 -0000 1.9 --- ImportXMLdlg.cpp 11 Jun 2007 21:40:12 -0000 1.11 *************** *** 116,122 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) filedlg.GetPathName ()), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception --- 116,122 ---- catch (CFileException * e) { ! ::TMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) filedlg.GetPathName ()), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception *************** *** 202,223 **** &iKeypad, &iPrinting); ! CString strCounts; ! ADDCOUNT (iTriggers, "trigger", PLURAL); ! ADDCOUNT (iAliases, "alias", PLURALES); ! ADDCOUNT (iTimers, "timer", PLURAL); ! ADDCOUNT (iMacros, "macro", PLURAL); ! ADDCOUNT (iVariables, "variable", PLURAL); ! ADDCOUNT (iColours, "colour", PLURAL); ! ADDCOUNT (iKeypad, "keypad", PLURAL); ! ADDCOUNT (iPrinting, "printing style", PLURAL); if (strCounts.IsEmpty ()) ! strCounts = "No items loaded."; ! else ! strCounts += " loaded."; ! ::AfxMessageBox (strCounts, MB_ICONINFORMATION); m_pDoc->SetModifiedFlag (TRUE); // document has now changed --- 202,229 ---- &iKeypad, &iPrinting); ! CString strCounts = TFormat ( ! "%lu trigger%s, " ! "%lu alias%s, " ! "%lu timer%s, " ! "%lu macro%s, " ! "%lu variable%s, " ! "%lu colour%s, " ! "%lu keypad%s, " ! "%lu printing style%s loaded. ", ! PLURAL (iTriggers), ! PLURALES (iAliases), ! PLURAL (iTimers), ! PLURAL (iMacros), ! PLURAL (iVariables), ! PLURAL (iColours), ! PLURAL (iKeypad), ! PLURAL (iPrinting)); if (strCounts.IsEmpty ()) ! strCounts = Translate ("No items loaded."); ! ::TMessageBox (strCounts, MB_ICONINFORMATION); m_pDoc->SetModifiedFlag (TRUE); // document has now changed *************** *** 227,238 **** } else ! ::AfxMessageBox ("Not in XML format"); } // end of try block catch (CArchiveException* ) { ! ::AfxMessageBox ("There was a problem parsing the XML. " "See the error window for more details"); } --- 233,244 ---- } else ! ::TMessageBox ("Not in XML format"); } // end of try block catch (CArchiveException* ) { ! ::TMessageBox ("There was a problem parsing the XML. " "See the error window for more details"); } Index: InsertUnicodeDlg.cpp =================================================================== RCS file: /cvs/mushclient/InsertUnicodeDlg.cpp,v retrieving revision 1.1 retrieving revision 1.3 diff -c -r1.1 -r1.3 *** InsertUnicodeDlg.cpp 20 Apr 2007 02:52:09 -0000 1.1 --- InsertUnicodeDlg.cpp 11 Jun 2007 21:40:12 -0000 1.3 *************** *** 40,53 **** if(m_strCharacter.IsEmpty ()) { ! ::AfxMessageBox("Unicode character code cannot be blank."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being blank if(m_strCharacter.GetLength () > 10) { ! ::AfxMessageBox("Unicode character code too long."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being too long to convert --- 40,53 ---- if(m_strCharacter.IsEmpty ()) { ! ::TMessageBox ("Unicode character code cannot be blank."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being blank if(m_strCharacter.GetLength () > 10) { ! ::TMessageBox ("Unicode character code too long."); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } // end of code being too long to convert *************** *** 62,68 **** if (!isxdigit (*p)) { ! ::AfxMessageBox (CFormat ("Bad hex character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } --- 62,68 ---- if (!isxdigit (*p)) { ! ::TMessageBox (TFormat ("Bad hex character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } *************** *** 80,86 **** for ( ; *p; p++) if (!isdigit (*p)) { ! ::AfxMessageBox (CFormat ("Bad decimal character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } --- 80,86 ---- for ( ; *p; p++) if (!isdigit (*p)) { ! ::TMessageBox (TFormat ("Bad decimal character: '%c'.", *p)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); } *************** *** 90,96 **** if (i < 0 || i > LONG_MAX) { ! ::AfxMessageBox (CFormat ("Unicode character %I64i too large - must be in range 0 to 2147483647 " "(hex 0 to 7FFFFFFF).", i)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); --- 90,96 ---- if (i < 0 || i > LONG_MAX) { ! ::TMessageBox (TFormat ("Unicode character %I64i too large - must be in range 0 to 2147483647 " "(hex 0 to 7FFFFFFF).", i)); DDX_Text(pDX, IDC_UNICODE_CHARACTER, m_strCharacter); pDX->Fail(); Index: LuaChooseList.cpp =================================================================== RCS file: /cvs/mushclient/LuaChooseList.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** LuaChooseList.cpp 29 Nov 2005 23:36:35 -0000 1.1 --- LuaChooseList.cpp 12 Jun 2007 04:01:56 -0000 1.2 *************** *** 53,59 **** SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, "Main column", LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) --- 53,59 ---- SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, TranslateHeading ("Main column"), LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) Index: LuaChooseListMulti.cpp =================================================================== RCS file: /cvs/mushclient/LuaChooseListMulti.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** LuaChooseListMulti.cpp 3 Aug 2006 03:53:08 -0000 1.1 --- LuaChooseListMulti.cpp 12 Jun 2007 04:01:56 -0000 1.2 *************** *** 49,55 **** SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, "Main column", LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) --- 49,55 ---- SetWindowText (m_strTitle); ! m_ctlListBox.InsertColumn(0, TranslateHeading ("Main column"), LVCFMT_LEFT, 340); m_ctlListBox.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, m_ctlListBox.SendMessage (LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0) Index: LuaGsubDlg.cpp =================================================================== RCS file: /cvs/mushclient/LuaGsubDlg.cpp,v retrieving revision 1.4 retrieving revision 1.6 diff -c -r1.4 -r1.6 *** LuaGsubDlg.cpp 17 Jun 2006 23:22:37 -0000 1.4 --- LuaGsubDlg.cpp 11 Jun 2007 21:40:12 -0000 1.6 *************** *** 58,64 **** if (m_strReplacement.IsEmpty ()) { ! ::AfxMessageBox ("When calling a function the replacement text must be the function name", MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); --- 58,64 ---- if (m_strReplacement.IsEmpty ()) { ! ::TMessageBox ("When calling a function the replacement text must be the function name", MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); *************** *** 79,85 **** if (! FindLuaFunction (L, m_strReplacement)) { ! ::AfxMessageBox (CFormat ("Function '%s' not found in script text", (LPCTSTR) m_strReplacement), MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); --- 79,85 ---- if (! FindLuaFunction (L, m_strReplacement)) { ! ::TMessageBox (TFormat ("Function '%s' not found in script text", (LPCTSTR) m_strReplacement), MB_ICONEXCLAMATION); DDX_Text(pDX, IDC_REPLACEMENT, m_strReplacement); pDX->Fail(); Index: MUSHclient.cpp =================================================================== RCS file: /cvs/mushclient/MUSHclient.cpp,v retrieving revision 1.73 retrieving revision 1.77 diff -c -r1.73 -r1.77 *** MUSHclient.cpp 18 Apr 2007 01:21:31 -0000 1.73 --- MUSHclient.cpp 11 Jun 2007 23:44:15 -0000 1.77 *************** *** 1,6 **** --- 1,9 ---- // MUSHclient.cpp : Defines the class behaviors for the application. // + // xgettext -kTMessageBox -kTranslate -o mushclient_static.po *.cpp + // xgettext -kTranslateFormat -o mushclient_formatted.po *.cpp + #include "stdafx.h" #include "MUSHclient.h" #include "doc.h" *************** *** 35,47 **** COLORREF xterm_256_colours [256]; // Statically link __delayLoadHelper/__FUnloadDelayLoadedDLL ! #pragma comment( lib, "Delayimp.lib") #ifdef LUA51 // Lua 5.1 #pragma comment( lib, "lua5.1.lib" ) // however we will allowed delayed load ! #pragma comment(linker, "/DelayLoad:lua5.1.dll") #else // Lua 5.0 #pragma comment( lib, "..\\lua50\\lib\\dll\\lua50.lib" ) --- 38,51 ---- COLORREF xterm_256_colours [256]; // Statically link __delayLoadHelper/__FUnloadDelayLoadedDLL ! //#pragma comment( lib, "Delayimp.lib") #ifdef LUA51 // Lua 5.1 #pragma comment( lib, "lua5.1.lib" ) // however we will allowed delayed load ! // #pragma comment(linker, "/DelayLoad:lua5.1.dll") ! #pragma comment(linker, "lua5.1.dll") #else // Lua 5.0 #pragma comment( lib, "..\\lua50\\lib\\dll\\lua50.lib" ) *************** *** 96,101 **** --- 100,115 ---- void Generate256colours (void); + extern const struct luaL_reg *ptr_xmllib; + + extern "C" + { + LUALIB_API int luaopen_rex(lua_State *L); + LUALIB_API int luaopen_bits(lua_State *L); + LUALIB_API int luaopen_compress(lua_State *L); + LUALIB_API int luaopen_bc(lua_State *L); + } + ///////////////////////////////////////////////////////////////////////////// // CMUSHclientApp *************** *** 252,257 **** --- 266,276 ---- LoadMapDirections (); Generate256colours (); + // UMessageBox ("\xC9\xB3\xC9\xA8\xC9\x95\xC9\xAE"); + + // set the current locale + setlocale (LC_ALL, "" ); + // Set the debug-heap flag so that freed blocks are kept on the // linked list, to catch any inadvertent use of freed memory SET_CRT_DEBUG_FIELD( _CRTDBG_DELAY_FREE_MEM_DF ); *************** *** 261,266 **** --- 280,286 ---- // in ProcessPreviousLine.cpp m_SpellChecker_Lua = NULL; + m_Translator_Lua = NULL; m_bShowInitialDelay = true; m_TypeOfNewDocument = eNormalNewDocument; *************** *** 278,284 **** if (!bWine) if (!AfxOleInit()) // not needed? { ! AfxMessageBox("OLE initialization failed", MB_ICONSTOP); return FALSE; } --- 298,304 ---- if (!bWine) if (!AfxOleInit()) // not needed? { ! AfxMessageBox("OLE initialization failed", MB_ICONSTOP); // DON'T TRANSLATE return FALSE; } *************** *** 290,295 **** --- 310,316 ---- else m_iCounterFrequency = 0; // no performance counter + SetRegistryKey ("Gammon Software Solutions"); // CG: The following block was added by the Splash Screen component. *************** *** 403,415 **** LoadGlobalsFromRegistry (); // check for configuration name collisions #ifdef _DEBUG for (int i = 0; AlphaOptionsTable [i].pName; i++) for (int j = 0; OptionsTable [j].pName; j++) if (strcmp (AlphaOptionsTable [i].pName, OptionsTable [j].pName) == 0) ! ::AfxMessageBox (CFormat ("Internal MUSHclient error, config name collision: %s", (LPCTSTR) OptionsTable [j].pName), MB_ICONEXCLAMATION); #endif --- 424,444 ---- LoadGlobalsFromRegistry (); + // i18n setup ------------------------------- + + if (!I18N_Setup ()) + { + AfxMessageBox("Lua (i18n) initialization failed", MB_ICONSTOP); // DON'T TRANSLATE + return FALSE; + } + // check for configuration name collisions #ifdef _DEBUG for (int i = 0; AlphaOptionsTable [i].pName; i++) for (int j = 0; OptionsTable [j].pName; j++) if (strcmp (AlphaOptionsTable [i].pName, OptionsTable [j].pName) == 0) ! ::TMessageBox (TFormat ("Internal MUSHclient error, config name collision: %s", (LPCTSTR) OptionsTable [j].pName), MB_ICONEXCLAMATION); #endif *************** *** 443,449 **** WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE , extraWnd)) // owner is hidden window { ! AfxMessageBox("Unable to load main frame window", MB_ICONSTOP); return FALSE; } m_pMainWnd = pMainFrame; --- 472,478 ---- WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE , extraWnd)) // owner is hidden window { ! TMessageBox ("Unable to load main frame window", MB_ICONSTOP); return FALSE; } m_pMainWnd = pMainFrame; *************** *** 751,757 **** // warn them, if they have sessions open. if (gdoccount > 0 && App.m_bConfirmBeforeClosingMushclient) ! if (::AfxMessageBox ("This will end your MUSHclient session.", MB_OKCANCEL | MB_ICONINFORMATION) == IDCANCEL) return 0; --- 780,786 ---- // warn them, if they have sessions open. if (gdoccount > 0 && App.m_bConfirmBeforeClosingMushclient) ! if (::TMessageBox ("This will end your MUSHclient session.", MB_OKCANCEL | MB_ICONINFORMATION) == IDCANCEL) return 0; *************** *** 976,985 **** --- 1005,1020 ---- DELETE_MAP (m_ColoursMap, CColours); + // close spell checker Lua state if (m_SpellChecker_Lua) lua_close (m_SpellChecker_Lua); m_SpellChecker_Lua = NULL; + // close i18n Lua state + if (m_Translator_Lua) + lua_close (m_Translator_Lua); + m_Translator_Lua = NULL; + return CWinApp::ExitInstance(); } *************** *** 1111,1163 **** } - LONG WINAPI DelayLoadDllExceptionFilter(PEXCEPTION_POINTERS pep) { - // Assume we recognize this exception - LONG lDisposition = EXCEPTION_EXECUTE_HANDLER; - // If this is a Delay-load problem, ExceptionInformation[0] points - // to a DelayLoadInfo structure that has detailed error info - PDelayLoadInfo pdli = PDelayLoadInfo(pep->ExceptionRecord - ->ExceptionInformation[0]); - // Create a buffer where we construct error messages - char sz[500] = { 0 }; - switch (pep->ExceptionRecord->ExceptionCode) { - case VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND): - // The DLL module was not found at runtime - wsprintf(sz, "The DLL \"%s\" was not found\n\n" - "Please ensure it is in your path, or disable the spell checker.", pdli->szDll); - break; - case VcppException(ERROR_SEVERITY_ERROR, ERROR_PROC_NOT_FOUND): - // The DLL module was found but it doesn’t contain the function - if (pdli->dlp.fImportByName) { - wsprintf(sz, "Function %s was not found in %s", - pdli->dlp.szProcName, pdli->szDll); - } else { - wsprintf(sz, "Function ordinal %d was not found in %s", - pdli->dlp.dwOrdinal, pdli->szDll); - } - break; - default: - lDisposition = EXCEPTION_CONTINUE_SEARCH; // We don’t recognize this // exception - break; - } - if (lDisposition == EXCEPTION_EXECUTE_HANDLER) { - // We recognized this error and constructed a message, show it - MessageBox(NULL, sz, NULL, MB_OK); - } - return(lDisposition); - } // end of DelayLoadDllExceptionFilter - - - extern const struct luaL_reg *ptr_xmllib; - - extern "C" - { - LUALIB_API int luaopen_rex(lua_State *L); - LUALIB_API int luaopen_bits(lua_State *L); - LUALIB_API int luaopen_compress(lua_State *L); - LUALIB_API int luaopen_bc(lua_State *L); - } - LUALIB_API int luaopen_progress_dialog(lua_State *L); void CMUSHclientApp::OpenLuaDelayed () --- 1146,1151 ---- *************** *** 1205,1211 **** lua_getglobal (m_SpellChecker_Lua, SPELLCHECKFUNCTION); if (!lua_isfunction (m_SpellChecker_Lua, -1)) { ! ::AfxMessageBox (CFormat ("Function '%s' not in spellchecker.lua file", SPELLCHECKFUNCTION), MB_OK | MB_ICONSTOP); lua_close (m_SpellChecker_Lua); m_SpellChecker_Lua = NULL; --- 1193,1199 ---- lua_getglobal (m_SpellChecker_Lua, SPELLCHECKFUNCTION); if (!lua_isfunction (m_SpellChecker_Lua, -1)) { ! ::TMessageBox (TFormat ("Function '%s' not in spellchecker.lua file", SPELLCHECKFUNCTION), MB_OK | MB_ICONSTOP); lua_close (m_SpellChecker_Lua); m_SpellChecker_Lua = NULL; *************** *** 1213,1242 **** } // end of OpenLuaDelayed - extern LONG WINAPI DelayLoadDllExceptionFilterLua(PEXCEPTION_POINTERS pep); void CMUSHclientApp::InitSpellCheck (void) { ! // Wrap all calls to delay-load DLL functions inside SEH ! __try ! { ! ! OpenLuaDelayed (); ! if (m_SpellChecker_Lua) ! m_bSpellCheckOK = true; ! else ! m_bSpellCheckOK = false; ! ! ! } ! __except (DelayLoadDllExceptionFilter(GetExceptionInformation())) ! { ! // Nothing to do in here, thread continues to run normally ! m_bSpellCheckOK = false; ! m_SpellChecker_Lua = NULL; ! } } // end of InitSpellCheck --- 1201,1219 ---- } // end of OpenLuaDelayed void CMUSHclientApp::InitSpellCheck (void) { ! ! OpenLuaDelayed (); ! if (m_SpellChecker_Lua) ! m_bSpellCheckOK = true; ! else ! m_bSpellCheckOK = false; ! ! } // end of InitSpellCheck *************** *** 1247,1256 **** { if (m_zCompress.msg) ! ::AfxMessageBox (CFormat ("Could not initialise zlib decompression engine: %s", m_zCompress.msg), MB_ICONEXCLAMATION); else ! ::AfxMessageBox (CFormat ("Could not initialise zlib decompression engine: %i", izError), MB_ICONEXCLAMATION); } // end of zLibError --- 1224,1233 ---- { if (m_zCompress.msg) ! ::TMessageBox (TFormat ("Could not initialise zlib decompression engine: %s", m_zCompress.msg), MB_ICONEXCLAMATION); else ! ::TMessageBox (TFormat ("Could not initialise zlib decompression engine: %i", izError), MB_ICONEXCLAMATION); } // end of zLibError *************** *** 1261,1281 **** { bool bCompressInitOK = false; ! // Wrap all calls to delay-load DLL functions inside SEH ! __try ! { ! int izError; ! if ((izError = inflateInit (&m_zCompress)) == Z_OK) ! bCompressInitOK = true; ! else ! zLibError (izError, m_zCompress); ! } // endof __try ! __except (DelayLoadDllExceptionFilter(GetExceptionInformation())) ! { ! // Nothing to do in here, thread continues to run normally ! } ! return bCompressInitOK; } // end of InitZlib --- 1238,1250 ---- { bool bCompressInitOK = false; ! int izError; ! if ((izError = inflateInit (&m_zCompress)) == Z_OK) ! bCompressInitOK = true; ! else ! zLibError (izError, m_zCompress); ! return bCompressInitOK; } // end of InitZlib *************** *** 1434,1439 **** --- 1403,1453 ---- } // end of Generate256colours + + BOOL CMUSHclientApp::I18N_Setup (void) // internationalization + { + + CString m_strTranslatorFile = ExtractDirectory (App.m_strMUSHclientFileName); + m_strTranslatorFile += "locale\\"; + m_strTranslatorFile += App.m_strLocale; // eg. EN + m_strTranslatorFile += ".lua"; + + CFileStatus status; + if (CFile::GetStatus(m_strTranslatorFile, status)) + { + + m_Translator_Lua = MakeLuaState(); /* opens Lua */ + if (!m_Translator_Lua) + return FALSE; // can't open Lua + + luaL_openlibs (m_Translator_Lua); // new way of opening all libraries + + luaopen_rex (m_Translator_Lua); // regular expression library + luaopen_bits (m_Translator_Lua); // bit manipulation library + luaopen_compress (m_Translator_Lua); // compression (utils) library + luaopen_bc (m_Translator_Lua); // open bc library + + // add xml reader (and other stuff) to utils lib + luaL_register (m_Translator_Lua, "utils", ptr_xmllib); + + lua_settop(m_Translator_Lua, 0); // clear stack + + + // process translator file into Lua space + // sample file name: (application directory)\locale\EN.lua + + if (luaL_loadfile(m_Translator_Lua, m_strTranslatorFile) || + lua_pcall (m_Translator_Lua, 0, 0, 0)) + { + LuaError (m_Translator_Lua, "Localization initialization"); + lua_close (m_Translator_Lua); + m_Translator_Lua = NULL; + } + + } // end of localization file exists + + return TRUE; + } // end of void CMUSHclientApp::I18N_Setup /* Index: MUSHclient.h =================================================================== RCS file: /cvs/mushclient/MUSHclient.h,v retrieving revision 1.45 retrieving revision 1.48 diff -c -r1.45 -r1.48 *** MUSHclient.h 6 Apr 2007 05:01:26 -0000 1.45 --- MUSHclient.h 11 Jun 2007 23:44:15 -0000 1.48 *************** *** 96,102 **** __int64 m_nUniqueNumber; ! lua_State * m_SpellChecker_Lua; // Lua state // global preferences --- 96,105 ---- __int64 m_nUniqueNumber; ! lua_State * m_SpellChecker_Lua; // Lua state - spellchecker ! lua_State * m_Translator_Lua; // Lua state - translation (i18n) ! ! CString m_strTranslatorFile; // eg. (application directory)\po\English_Australia.1252.po // global preferences *************** *** 173,178 **** --- 176,182 ---- CString m_strWordDelimitersDblClick; CString m_strWorldList; CString m_strLuaScript; + CString m_strLocale; // other things *************** *** 238,243 **** --- 242,249 ---- void ShowGlobalOptions (CMUSHclientDoc * pDoc); void OpenLuaDelayed (); // for spell checker + + BOOL I18N_Setup (void); // internationalization /* virtual void OnFinalRelease() Index: MUSHclient.rc =================================================================== RCS file: /cvs/mushclient/MUSHclient.rc,v retrieving revision 1.197 retrieving revision 1.200 diff -c -r1.197 -r1.200 *** MUSHclient.rc 8 Jun 2007 01:30:36 -0000 1.197 --- MUSHclient.rc 12 Jun 2007 04:01:56 -0000 1.200 *************** *** 1467,1472 **** --- 1467,1474 ---- GROUPBOX "Spell checker",IDC_STATIC,6,171,72,27 CONTROL "&Enable",IDC_ENABLE_SPELL_CHECK,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,16,182,38,10 + LTEXT "&Locale code:",IDC_STATIC,162,184,42,8 + EDITTEXT IDC_LOCALE,209,181,34,14,ES_UPPERCASE | ES_AUTOHSCROLL LTEXT "Window tabs:",IDC_STATIC,197,123,44,8 COMBOBOX IDC_TABS,195,137,48,49,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP *************** *** 2839,2851 **** IDD_REGEXP_PROBLEM DIALOGEX 0, 0, 400, 93 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Problem parsing regular expression" ! FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN LTEXT "Nature of problem.",IDC_ERROR_MESSAGE,11,5,378,11 EDITTEXT IDC_REGEXP_TEXT,11,21,378,36,ES_MULTILINE | ES_READONLY | WS_HSCROLL,WS_EX_DLGMODALFRAME LTEXT "The error occurred at column: xxxxxxxx",IDC_COLUMN,11, ! 62,123,8 DEFPUSHBUTTON "OK",IDOK,11,75,50,14 END --- 2841,2853 ---- IDD_REGEXP_PROBLEM DIALOGEX 0, 0, 400, 93 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Problem parsing regular expression" ! FONT 8, "MS Sans Serif" BEGIN LTEXT "Nature of problem.",IDC_ERROR_MESSAGE,11,5,378,11 EDITTEXT IDC_REGEXP_TEXT,11,21,378,36,ES_MULTILINE | ES_READONLY | WS_HSCROLL,WS_EX_DLGMODALFRAME LTEXT "The error occurred at column: xxxxxxxx",IDC_COLUMN,11, ! 62,375,8 DEFPUSHBUTTON "OK",IDOK,11,75,50,14 END *************** *** 5561,5568 **** // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,8,0 ! PRODUCTVERSION 4,0,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L --- 5563,5570 ---- // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,9,0 ! PRODUCTVERSION 4,0,9,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L *************** *** 5580,5593 **** VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.08\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.08\0" VALUE "SpecialBuild", "\0" END END --- 5582,5595 ---- VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.09\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2007 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.09\0" VALUE "SpecialBuild", "\0" END END Index: MapCommentDlg.cpp =================================================================== RCS file: /cvs/mushclient/MapCommentDlg.cpp,v retrieving revision 1.2 retrieving revision 1.4 diff -c -r1.2 -r1.4 *** MapCommentDlg.cpp 27 Nov 2004 09:11:30 -0000 1.2 --- MapCommentDlg.cpp 11 Jun 2007 21:40:12 -0000 1.4 *************** *** 40,46 **** int i; if ((i = m_strComment.FindOneOf ("{}")) != -1) { ! ::AfxMessageBox(CFormat ("The comment may not contain the character \"%c\"", m_strComment [i])); DDX_Text(pDX, IDC_COMMENT, m_strComment); pDX->Fail(); --- 40,46 ---- int i; if ((i = m_strComment.FindOneOf ("{}")) != -1) { ! ::TMessageBox(TFormat ("The comment may not contain the character \"%c\"", m_strComment [i])); DDX_Text(pDX, IDC_COMMENT, m_strComment); pDX->Fail(); Index: MapDlg.cpp =================================================================== RCS file: /cvs/mushclient/MapDlg.cpp,v retrieving revision 1.15 retrieving revision 1.17 diff -c -r1.15 -r1.17 *** MapDlg.cpp 20 Apr 2007 02:51:38 -0000 1.15 --- MapDlg.cpp 11 Jun 2007 21:40:12 -0000 1.17 *************** *** 98,104 **** { if (m_pDoc->m_strMapList.GetCount () > 1) ! if (::AfxMessageBox (CFormat ("Remove existing %i directions from the map?", m_pDoc->m_strMapList.GetCount ()), MB_YESNO | MB_ICONQUESTION) != IDYES) return; --- 98,104 ---- { if (m_pDoc->m_strMapList.GetCount () > 1) ! if (UMessageBox (TFormat ("Remove existing %i directions from the map?", m_pDoc->m_strMapList.GetCount ()), MB_YESNO | MB_ICONQUESTION) != IDYES) return; Index: MapMoveDlg.cpp =================================================================== RCS file: /cvs/mushclient/MapMoveDlg.cpp,v retrieving revision 1.3 retrieving revision 1.5 diff -c -r1.3 -r1.5 *** MapMoveDlg.cpp 16 Aug 2002 20:21:38 -0000 1.3 --- MapMoveDlg.cpp 11 Jun 2007 21:40:12 -0000 1.5 *************** *** 48,61 **** int i; if ((i = m_strAction.FindOneOf ("{}()/\\")) != -1) { ! ::AfxMessageBox(CFormat ("The action may not contain the character \"%c\"", m_strAction [i])); DDX_Text(pDX, IDC_ACTION, m_strAction); pDX->Fail(); } // end of bad character if ((i = m_strReverse.FindOneOf ("{}()/\\")) != -1) { ! ::AfxMessageBox(CFormat ("The reverse action may not contain the character \"%c\"", m_strReverse [i])); DDX_Text(pDX, IDC_REVERSE, m_strReverse); pDX->Fail(); --- 48,61 ---- int i; if ((i = m_strAction.FindOneOf ("{}()/\\")) != -1) { ! ::TMessageBox(TFormat ("The action may not contain the character \"%c\"", m_strAction [i])); DDX_Text(pDX, IDC_ACTION, m_strAction); pDX->Fail(); } // end of bad character if ((i = m_strReverse.FindOneOf ("{}()/\\")) != -1) { ! ::TMessageBox(TFormat ("The reverse action may not contain the character \"%c\"", m_strReverse [i])); DDX_Text(pDX, IDC_REVERSE, m_strReverse); pDX->Fail(); Index: Mapping.cpp =================================================================== RCS file: /cvs/mushclient/Mapping.cpp,v retrieving revision 1.10 retrieving revision 1.12 diff -c -r1.10 -r1.12 *** Mapping.cpp 20 Apr 2007 02:51:38 -0000 1.10 --- Mapping.cpp 11 Jun 2007 21:40:12 -0000 1.12 *************** *** 76,82 **** // then press Cancel. This would in fact not enable it, so we should warn them. if (!m_bMapping && m_strMapList.IsEmpty ()) ! if (::AfxMessageBox ("Warning - mapping has not been turned on because you pressed 'Cancel'.\n\n" "Do you want mapping enabled now?", MB_ICONQUESTION | MB_YESNO) == IDYES) m_bMapping = true; --- 76,82 ---- // then press Cancel. This would in fact not enable it, so we should warn them. if (!m_bMapping && m_strMapList.IsEmpty ()) ! if (::TMessageBox ("Warning - mapping has not been turned on because you pressed 'Cancel'.\n\n" "Do you want mapping enabled now?", MB_ICONQUESTION | MB_YESNO) == IDYES) m_bMapping = true; *************** *** 104,110 **** { char sMessage [1000]; e->GetErrorMessage (sMessage, sizeof sMessage); ! ::AfxMessageBox (CFormat ("Error \"%s\" processing mapping failure regular expression \"%s\"", sMessage, (LPCTSTR) m_strMappingFailure)); e->Delete (); --- 104,110 ---- { char sMessage [1000]; e->GetErrorMessage (sMessage, sizeof sMessage); ! ::TMessageBox (TFormat ("Error \"%s\" processing mapping failure regular expression \"%s\"", sMessage, (LPCTSTR) m_strMappingFailure)); e->Delete (); Index: MultiLineTriggerDlg.cpp =================================================================== RCS file: /cvs/mushclient/MultiLineTriggerDlg.cpp,v retrieving revision 1.1 retrieving revision 1.3 diff -c -r1.1 -r1.3 *** MultiLineTriggerDlg.cpp 3 Jan 2005 02:31:21 -0000 1.1 --- MultiLineTriggerDlg.cpp 11 Jun 2007 21:40:12 -0000 1.3 *************** *** 46,52 **** // can't make an empty trigger if (m_strTriggerText.IsEmpty ()) { ! ::AfxMessageBox("The trigger match text cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank --- 46,52 ---- // can't make an empty trigger if (m_strTriggerText.IsEmpty ()) { ! ::TMessageBox("The trigger match text cannot be empty.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank *************** *** 61,75 **** if (iCount < 1) { ! ::AfxMessageBox("Multi-line triggers must match at least 2 lines.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank if (iCount > MAX_RECENT_LINES) { ! ::AfxMessageBox( ! CFormat ("Multi-line triggers can match a maximum of %i lines.", MAX_RECENT_LINES), MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); --- 61,75 ---- if (iCount < 1) { ! ::TMessageBox("Multi-line triggers must match at least 2 lines.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); } // end of text being blank if (iCount > MAX_RECENT_LINES) { ! ::TMessageBox( ! TFormat ("Multi-line triggers can match a maximum of %i lines.", MAX_RECENT_LINES), MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_TEXT, m_strTriggerText); pDX->Fail(); Index: PluginWizard.cpp =================================================================== RCS file: /cvs/mushclient/PluginWizard.cpp,v retrieving revision 1.21 retrieving revision 1.23 diff -c -r1.21 -r1.23 *** PluginWizard.cpp 26 Apr 2007 02:55:45 -0000 1.21 --- PluginWizard.cpp 12 Jun 2007 04:01:56 -0000 1.23 *************** *** 68,74 **** CString strTemp = m_strName; // no name doesn't become lower case if (m_doc->CheckObjectName (strTemp)) { ! ::AfxMessageBox("The plugin name must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_NAME, m_strName); pDX->Fail(); --- 68,74 ---- CString strTemp = m_strName; // no name doesn't become lower case if (m_doc->CheckObjectName (strTemp)) { ! ::TMessageBox ("The plugin name must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_NAME, m_strName); pDX->Fail(); *************** *** 123,129 **** // description cannot have ]]> in it if (m_strDescription.Find ("]]>") != -1) { ! ::AfxMessageBox("Description may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_DESCRIPTION, m_strDescription); pDX->Fail(); } --- 123,129 ---- // description cannot have ]]> in it if (m_strDescription.Find ("]]>") != -1) { ! ::TMessageBox ("Description may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_DESCRIPTION, m_strDescription); pDX->Fail(); } *************** *** 210,219 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, "Match", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, "Send", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, "Group", LVCFMT_LEFT, 50); int iTrigger, iItem; --- 210,219 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, TranslateHeading ("Match"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, TranslateHeading ("Send"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, TranslateHeading ("Group"), LVCFMT_LEFT, 50); int iTrigger, iItem; *************** *** 317,326 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, "Match", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, "Send", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, "Group", LVCFMT_LEFT, 50); int iAlias, iItem = 0; --- 317,326 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, TranslateHeading ("Match"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, TranslateHeading ("Send"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, TranslateHeading ("Group"), LVCFMT_LEFT, 50); int iAlias, iItem = 0; *************** *** 427,436 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, "Time", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, "Send", LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, "Group", LVCFMT_LEFT, 50); int iItem = 0; POSITION pos; --- 427,436 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 100); ! m_ctlList.InsertColumn(1, TranslateHeading ("Time"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(2, TranslateHeading ("Send"), LVCFMT_LEFT, 120); ! m_ctlList.InsertColumn(3, TranslateHeading ("Group"), LVCFMT_LEFT, 50); int iItem = 0; POSITION pos; *************** *** 449,460 **** CString strTimer; if (t->iType == CTimer::eInterval) ! strTimer = CFormat ("Every %02i:%02i:%04.2f", t->iEveryHour, t->iEveryMinute, t->fEverySecond); else ! strTimer = CFormat ("At %02i:%02i:%04.2f", t->iAtHour, t->iAtMinute, t->fAtSecond); --- 449,460 ---- CString strTimer; if (t->iType == CTimer::eInterval) ! strTimer = TFormat ("Every %02i:%02i:%04.2f", t->iEveryHour, t->iEveryMinute, t->fEverySecond); else ! strTimer = TFormat ("At %02i:%02i:%04.2f", t->iAtHour, t->iAtMinute, t->fAtSecond); *************** *** 561,568 **** | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, "Name", LVCFMT_LEFT, 150); ! m_ctlList.InsertColumn(1, "Contents", LVCFMT_LEFT, 200); int iItem = 0; POSITION pos; --- 561,568 ---- | LVS_EX_FULLROWSELECT | (App.m_bShowGridLinesInListViews ? LVS_EX_GRIDLINES : 0) ); ! m_ctlList.InsertColumn(0, TranslateHeading ("Name"), LVCFMT_LEFT, 150); ! m_ctlList.InsertColumn(1, TranslateHeading ("Contents"), LVCFMT_LEFT, 200); int iItem = 0; POSITION pos; *************** *** 665,671 **** // description cannot have ]]> in it if (m_strScript.Find ("]]>") != -1) { ! ::AfxMessageBox("Script may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_SCRIPT, m_strScript); pDX->Fail(); } --- 665,671 ---- // description cannot have ]]> in it if (m_strScript.Find ("]]>") != -1) { ! ::TMessageBox ("Script may not contain the sequence \"]]>\"", MB_ICONSTOP); DDX_Text(pDX, IDC_SCRIPT, m_strScript); pDX->Fail(); } *************** *** 808,814 **** // description cannot have ]]> in it if (m_strComments.Find ("--") != -1) { ! ::AfxMessageBox("Comments may not contain the sequence \"--\"", MB_ICONSTOP); DDX_Text(pDX, IDC_COMMENTS, m_strComments); pDX->Fail(); } --- 808,814 ---- // description cannot have ]]> in it if (m_strComments.Find ("--") != -1) { ! ::TMessageBox ("Comments may not contain the sequence \"--\"", MB_ICONSTOP); DDX_Text(pDX, IDC_COMMENTS, m_strComments); pDX->Fail(); } Index: PluginsDlg.cpp =================================================================== RCS file: /cvs/mushclient/PluginsDlg.cpp,v retrieving revision 1.17 retrieving revision 1.20 diff -c -r1.17 -r1.20 *** PluginsDlg.cpp 8 Jun 2007 01:30:36 -0000 1.17 --- PluginsDlg.cpp 12 Jun 2007 04:01:56 -0000 1.20 *************** *** 100,111 **** if (iColWidth [eColumnEnabled] < 20) iColWidth [eColumnEnabled] = 20; ! m_ctlPluginList.InsertColumn(eColumnName, "Name", LVCFMT_LEFT, iColWidth [eColumnName]); ! m_ctlPluginList.InsertColumn(eColumnPurpose, "Purpose", LVCFMT_LEFT, iColWidth [eColumnPurpose]); ! m_ctlPluginList.InsertColumn(eColumnAuthor, "Author", LVCFMT_LEFT, iColWidth [eColumnAuthor]); ! m_ctlPluginList.InsertColumn(eColumnLanguage, "Language", LVCFMT_LEFT, iColWidth [eColumnLanguage]); ! m_ctlPluginList.InsertColumn(eColumnFile, "File", LVCFMT_LEFT, iColWidth [eColumnFile]); ! m_ctlPluginList.InsertColumn(eColumnEnabled, "Enabled", LVCFMT_LEFT, iColWidth [eColumnEnabled]); // recover column sequence --- 100,111 ---- if (iColWidth [eColumnEnabled] < 20) iColWidth [eColumnEnabled] = 20; ! m_ctlPluginList.InsertColumn(eColumnName, TranslateHeading ("Name"), LVCFMT_LEFT, iColWidth [eColumnName]); ! m_ctlPluginList.InsertColumn(eColumnPurpose, TranslateHeading ("Purpose"), LVCFMT_LEFT, iColWidth [eColumnPurpose]); ! m_ctlPluginList.InsertColumn(eColumnAuthor, TranslateHeading ("Author"), LVCFMT_LEFT, iColWidth [eColumnAuthor]); ! m_ctlPluginList.InsertColumn(eColumnLanguage, TranslateHeading ("Language"), LVCFMT_LEFT, iColWidth [eColumnLanguage]); ! m_ctlPluginList.InsertColumn(eColumnFile, TranslateHeading ("File"), LVCFMT_LEFT, iColWidth [eColumnFile]); ! m_ctlPluginList.InsertColumn(eColumnEnabled, TranslateHeading ("Enabled"), LVCFMT_LEFT, iColWidth [eColumnEnabled]); // recover column sequence *************** *** 232,238 **** if (p->m_strDescription.IsEmpty ()) continue; // ignore ones without a description ! CString strTitle = CFormat ("%s description", (LPCTSTR) p->m_strName); m_pDoc->AppendToTheNotepad (strTitle, p->m_strDescription, --- 232,238 ---- if (p->m_strDescription.IsEmpty ()) continue; // ignore ones without a description ! CString strTitle = TFormat ("%s description", (LPCTSTR) p->m_strName); m_pDoc->AppendToTheNotepad (strTitle, p->m_strDescription, *************** *** 328,341 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::AfxMessageBox (CFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); --- 328,341 ---- catch (CFileException * e) { ! ::TMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::TMessageBox (TFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); *************** *** 375,381 **** delete p; // delete the plugin } else ! ::AfxMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop LoadList (); --- 375,381 ---- delete p; // delete the plugin } else ! ::TMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop LoadList (); *************** *** 449,462 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::AfxMessageBox (CFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); --- 449,462 ---- catch (CFileException * e) { ! ::TMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::TMessageBox (TFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strName), MB_ICONEXCLAMATION); e->Delete (); *************** *** 464,470 **** } else ! ::AfxMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop --- 464,470 ---- } else ! ::TMessageBox ("Plugin cannot be found, unexpectedly.", MB_ICONEXCLAMATION); } // end of loop *************** *** 498,504 **** pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::AfxMessageBox(CFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); return; --- 498,504 ---- pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::TMessageBox(TFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); return; *************** *** 507,513 **** if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); --- 507,513 ---- if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox(TFormat ("Unable to edit the plugin file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); *************** *** 667,673 **** pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::AfxMessageBox(CFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); continue; --- 667,673 ---- pNewDoc->m_iUniqueDocumentNumber = m_pDoc->m_iUniqueDocumentNumber; } else ! ::TMessageBox(TFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); continue; *************** *** 676,682 **** if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); } // end of loop --- 676,682 ---- if ((long) ShellExecute (Frame, _T("open"), m_pDoc->m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) strName), NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox(TFormat ("Unable to edit the plugin state file %s.", (LPCTSTR) strName), MB_ICONEXCLAMATION); } // end of loop Index: ProcessPreviousLine.cpp =================================================================== RCS file: /cvs/mushclient/ProcessPreviousLine.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -c -r1.54 -r1.55 *** ProcessPreviousLine.cpp 25 Apr 2007 22:48:54 -0000 1.54 --- ProcessPreviousLine.cpp 12 Jun 2007 04:01:56 -0000 1.55 *************** *** 587,593 **** if ((m_iUTF8ErrorCount & 0x7F) == 1) ColourNote ("white", "red", ! CFormat ("Previous line had a bad UTF-8 sequence at column %i, and was not evaluated for trigger matches", iBad + 1)); } --- 587,593 ---- if ((m_iUTF8ErrorCount & 0x7F) == 1) ColourNote ("white", "red", ! TFormat ("Previous line had a bad UTF-8 sequence at column %i, and was not evaluated for trigger matches", iBad + 1)); } *************** *** 1044,1050 **** trigger_item->nMatched++; // count trigger matches ! CString strScriptSource = CFormat ("Trigger: %s", (LPCTSTR) trigger_item->strLabel); if (trigger_item->iSendTo == eSendToScriptAfterOmit) { --- 1044,1050 ---- trigger_item->nMatched++; // count trigger matches ! CString strScriptSource = TFormat ("Trigger: %s", (LPCTSTR) trigger_item->strLabel); if (trigger_item->iSendTo == eSendToScriptAfterOmit) { Index: RecallDlg.cpp =================================================================== RCS file: /cvs/mushclient/RecallDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** RecallDlg.cpp 28 Nov 2004 03:53:56 -0000 1.3 --- RecallDlg.cpp 11 Jun 2007 10:42:08 -0000 1.4 *************** *** 131,137 **** { if (m_ctlText.GetModify ()) { ! int iReply = ::AfxMessageBox ("Window contents have changed. Save changes?", MB_ICONQUESTION | MB_YESNOCANCEL); if (iReply == IDCANCEL) --- 131,137 ---- { if (m_ctlText.GetModify ()) { ! int iReply = ::TMessageBox ("Window contents have changed. Save changes?", MB_ICONQUESTION | MB_YESNOCANCEL); if (iReply == IDCANCEL) Index: RecallSearchDlg.cpp =================================================================== RCS file: /cvs/mushclient/RecallSearchDlg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** RecallSearchDlg.cpp 31 Oct 2006 19:57:58 -0000 1.6 --- RecallSearchDlg.cpp 11 Jun 2007 10:42:08 -0000 1.7 *************** *** 54,60 **** if (m_strFindText.IsEmpty () || !(m_bOutput || m_bCommands || m_bNotes)) { ! ::AfxMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } --- 54,60 ---- if (m_strFindText.IsEmpty () || !(m_bOutput || m_bCommands || m_bNotes)) { ! ::TMessageBox("You must specify something to search for."); DDX_Text(pDX, IDC_FIND_WHAT, m_strFindText); pDX->Fail(); } Index: ScriptErrorDlg.cpp =================================================================== RCS file: /cvs/mushclient/ScriptErrorDlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** ScriptErrorDlg.cpp 17 Oct 2006 21:24:16 -0000 1.4 --- ScriptErrorDlg.cpp 12 Jun 2007 04:01:56 -0000 1.5 *************** *** 71,84 **** void CScriptErrorDlg::OnCopy() { ! putontoclipboard (CFormat ("Error number: %i\r\n" ! "Event: %s\r\n" ! "Description: %s\r\n" ! "Called by: %s\r\n" , m_iError, (LPCTSTR) m_strEvent, (LPCTSTR) m_strDescription, ! (LPCTSTR) m_strCalledBy)); } --- 71,84 ---- void CScriptErrorDlg::OnCopy() { ! putontoclipboard (Replace (TFormat ("Error number: %i\n" ! "Event: %s\n" ! "Description: %s\n" ! "Called by: %s\n" , m_iError, (LPCTSTR) m_strEvent, (LPCTSTR) m_strDescription, ! (LPCTSTR) m_strCalledBy), "\n", "\r\n")); } Index: StatLink.cpp =================================================================== RCS file: /cvs/mushclient/StatLink.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** StatLink.cpp 7 Apr 2007 05:42:07 -0000 1.4 --- StatLink.cpp 11 Jun 2007 10:42:08 -0000 1.5 *************** *** 104,113 **** m_color = g_colorVisited; // change color Invalidate(); // repaint } else { ! CString msg; ! msg = "Unable to execute: "; ! msg += m_link; ! ::AfxMessageBox (msg, MB_ICONEXCLAMATION); TRACE(_T("*** WARNING: CStaticLink: unable to navigate link %s\n"), (LPCTSTR)m_link); } --- 104,111 ---- m_color = g_colorVisited; // change color Invalidate(); // repaint } else { ! CString msg = TFormat ("Unable to execute: %s", (LPCTSTR) m_link); ! ::TMessageBox (msg, MB_ICONEXCLAMATION); TRACE(_T("*** WARNING: CStaticLink: unable to navigate link %s\n"), (LPCTSTR)m_link); } Index: TextAttributesDlg.cpp =================================================================== RCS file: /cvs/mushclient/TextAttributesDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** TextAttributesDlg.cpp 18 Dec 2004 07:43:43 -0000 1.5 --- TextAttributesDlg.cpp 12 Jun 2007 04:01:56 -0000 1.6 *************** *** 100,111 **** CString strDate; strDate = m_pLine->m_theTime.Format ("%A, %B %d, %#I:%M:%S %p"); ! INFO (CFormat ("Line %i (%i), %s", m_iLine, m_pLine->m_nLineNumber, (LPCTSTR) strDate)); ! INFO (CFormat (" Flags = End para: %s, Note: %s, User input: %s, Log: %s, Bookmark: %s", YES_OR_NO (m_pLine->hard_return), YES_OR_NO (m_pLine->flags & COMMENT), YES_OR_NO (m_pLine->flags & USER_INPUT), --- 100,111 ---- CString strDate; strDate = m_pLine->m_theTime.Format ("%A, %B %d, %#I:%M:%S %p"); ! INFO (TFormat ("Line %i (%i), %s", m_iLine, m_pLine->m_nLineNumber, (LPCTSTR) strDate)); ! INFO (TFormat (" Flags = End para: %s, Note: %s, User input: %s, Log: %s, Bookmark: %s", YES_OR_NO (m_pLine->hard_return), YES_OR_NO (m_pLine->flags & COMMENT), YES_OR_NO (m_pLine->flags & USER_INPUT), *************** *** 113,128 **** YES_OR_NO (m_pLine->flags & BOOKMARK) )); ! INFO (CFormat (" Length = %i, last space = %i", m_pLine->len, m_pLine->last_space)); CString strText = CString (m_pLine->text, m_pLine->len); ! INFO (CFormat (" Text = \"%s\"", (LPCTSTR) strText)); INFO (""); ! INFO (CFormat ("%i style run%s", PLURAL (m_pLine->styleList.GetCount ()))); INFO (""); CStyle * pStyle; --- 113,128 ---- YES_OR_NO (m_pLine->flags & BOOKMARK) )); ! INFO (TFormat (" Length = %i, last space = %i", m_pLine->len, m_pLine->last_space)); CString strText = CString (m_pLine->text, m_pLine->len); ! INFO (TFormat (" Text = \"%s\"", (LPCTSTR) strText)); INFO (""); ! INFO (TFormat ("%i style run%s", PLURAL (m_pLine->styleList.GetCount ()))); INFO (""); CStyle * pStyle; *************** *** 135,141 **** pStyle = m_pLine->styleList.GetNext (pos); // offset, length and text affected ! INFO (CFormat ("%i: Offset = %i, Length = %i, Text = \"%s\"", iCount, iCol, pStyle->iLength, --- 135,141 ---- pStyle = m_pLine->styleList.GetNext (pos); // offset, length and text affected ! INFO (TFormat ("%i: Offset = %i, Length = %i, Text = \"%s\"", iCount, iCol, pStyle->iLength, *************** *** 156,182 **** switch (pStyle->iFlags & ACTIONTYPE) { case ACTION_NONE: ! INFO (" No action."); break; case ACTION_SEND: ! INFO (CFormat (" Action - send to MUD: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (CFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_HYPERLINK: ! INFO (CFormat (" Action - hyperlink: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (CFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_PROMPT: ! INFO (CFormat (" Action - send to command window: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (CFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; --- 156,182 ---- switch (pStyle->iFlags & ACTIONTYPE) { case ACTION_NONE: ! INFO (Translate (" No action.")); break; case ACTION_SEND: ! INFO (TFormat (" Action - send to MUD: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (TFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_HYPERLINK: ! INFO (TFormat (" Action - hyperlink: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (TFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; case ACTION_PROMPT: ! INFO (TFormat (" Action - send to command window: \"%s\"", (LPCTSTR) strAction)); if (!strHint.IsEmpty ()) ! INFO (TFormat (" Hint: \"%s\"", (LPCTSTR) strHint)); break; *************** *** 184,192 **** // variable to set? if (!strVariable.IsEmpty ()) ! INFO (CFormat (" Set variable: %s", (LPCTSTR) strVariable)); ! INFO (CFormat (" Flags = Hilite: %s, Underline: %s, " "Blink: %s, Inverse: %s, Changed: %s", YES_OR_NO (pStyle->iFlags & HILITE), YES_OR_NO (pStyle->iFlags & UNDERLINE), --- 184,192 ---- // variable to set? if (!strVariable.IsEmpty ()) ! INFO (TFormat (" Set variable: %s", (LPCTSTR) strVariable)); ! INFO (TFormat (" Flags = Hilite: %s, Underline: %s, " "Blink: %s, Inverse: %s, Changed: %s", YES_OR_NO (pStyle->iFlags & HILITE), YES_OR_NO (pStyle->iFlags & UNDERLINE), *************** *** 196,202 **** )); if (pStyle->iFlags & START_TAG) ! INFO (CFormat (" Start MXP tag: %s", (LPCTSTR) pStyle->pAction->m_strAction)); char * sColours [8] = --- 196,202 ---- )); if (pStyle->iFlags & START_TAG) ! INFO (TFormat (" Start MXP tag: %s", (LPCTSTR) pStyle->pAction->m_strAction)); char * sColours [8] = *************** *** 215,248 **** switch (pStyle->iFlags & COLOURTYPE) { case COLOUR_ANSI: ! INFO (CFormat (" Foreground colour ANSI : %i (%s)", pStyle->iForeColour, sColours [pStyle->iForeColour & 7])); ! INFO (CFormat (" Background colour ANSI : %i (%s)", pStyle->iBackColour, sColours [pStyle->iBackColour & 7])); break; case COLOUR_CUSTOM: ! INFO (CFormat (" Custom colour: %i (%s)", pStyle->iForeColour, (LPCTSTR) m_pDoc->m_strCustomColourName [pStyle->iForeColour & 0xFF])); break; case COLOUR_RGB: ! INFO (CFormat (" Foreground colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iForeColour), GetGValue (pStyle->iForeColour), GetBValue (pStyle->iForeColour) )); ! INFO (CFormat (" Background colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iBackColour), GetGValue (pStyle->iBackColour), GetBValue (pStyle->iBackColour) )); break; case COLOUR_RESERVED: ! INFO (CFormat (" Foreground colour rsvd : %i", pStyle->iForeColour & 0xFFFFFF)); ! INFO (CFormat (" Background colour rsvd : %i", pStyle->iBackColour & 0xFFFFFF)); break; --- 215,248 ---- switch (pStyle->iFlags & COLOURTYPE) { case COLOUR_ANSI: ! INFO (TFormat (" Foreground colour ANSI : %i (%s)", pStyle->iForeColour, sColours [pStyle->iForeColour & 7])); ! INFO (TFormat (" Background colour ANSI : %i (%s)", pStyle->iBackColour, sColours [pStyle->iBackColour & 7])); break; case COLOUR_CUSTOM: ! INFO (TFormat (" Custom colour: %i (%s)", pStyle->iForeColour, (LPCTSTR) m_pDoc->m_strCustomColourName [pStyle->iForeColour & 0xFF])); break; case COLOUR_RGB: ! INFO (TFormat (" Foreground colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iForeColour), GetGValue (pStyle->iForeColour), GetBValue (pStyle->iForeColour) )); ! INFO (TFormat (" Background colour RGB : R=%i, G=%i, B=%i", GetRValue (pStyle->iBackColour), GetGValue (pStyle->iBackColour), GetBValue (pStyle->iBackColour) )); break; case COLOUR_RESERVED: ! INFO (TFormat (" Foreground colour rsvd : %i", pStyle->iForeColour & 0xFFFFFF)); ! INFO (TFormat (" Background colour rsvd : %i", pStyle->iBackColour & 0xFFFFFF)); break; *************** *** 255,266 **** } // end of counting number to move ! INFO (CFormat ("%i column%s in %i style run%s", PLURAL (iCol), PLURAL (m_pLine->styleList.GetCount ()))); if (iCol != m_pLine->len) ! INFO ("** WARNING - length discrepancy **"); INFO (""); ! INFO ("------ (end line information) ------"); INFO (""); OnOK(); // close dialog box --- 255,266 ---- } // end of counting number to move ! INFO (TFormat ("%i column%s in %i style run%s", PLURAL (iCol), PLURAL (m_pLine->styleList.GetCount ()))); if (iCol != m_pLine->len) ! INFO (Translate ("** WARNING - length discrepancy **")); INFO (""); ! INFO (Translate ("------ (end line information) ------")); INFO (""); OnOK(); // close dialog box Index: TextDocument.cpp =================================================================== RCS file: /cvs/mushclient/TextDocument.cpp,v retrieving revision 1.16 retrieving revision 1.18 diff -c -r1.16 -r1.18 *** TextDocument.cpp 17 Dec 2006 00:08:08 -0000 1.16 --- TextDocument.cpp 12 Jun 2007 04:01:56 -0000 1.18 *************** *** 261,269 **** m_timeFileMod = status.m_mtime; CString strText; ! strText.Format ("The file \"%s\" has been modified. Do you wish to reload it?", (LPCTSTR) GetPathName ()); ! if (::AfxMessageBox (strText, MB_YESNO | MB_ICONQUESTION) == IDYES) { CWaitCursor wait; --- 261,269 ---- m_timeFileMod = status.m_mtime; CString strText; ! strText = TFormat ("The file \"%s\" has been modified. Do you wish to reload it?", (LPCTSTR) GetPathName ()); ! if (::TMessageBox (strText, MB_YESNO | MB_ICONQUESTION) == IDYES) { CWaitCursor wait; *************** *** 279,285 **** } catch(CException* e) { ! ::AfxMessageBox ("Unable to read file", MB_ICONEXCLAMATION); e->Delete(); } } // end of approving modification or wanting it anyway --- 279,285 ---- } catch(CException* e) { ! ::TMessageBox ("Unable to read file", MB_ICONEXCLAMATION); e->Delete(); } } // end of approving modification or wanting it anyway *************** *** 426,434 **** if (!m_strSearchString.IsEmpty ()) { if (pDoc) ! strTitle = CFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name); else ! strTitle = "Untitled"; } CreateTextWindow ("", // contents --- 426,434 ---- if (!m_strSearchString.IsEmpty ()) { if (pDoc) ! strTitle = TFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name); else ! strTitle = Translate ("Untitled"); } CreateTextWindow ("", // contents Index: TextView.cpp =================================================================== RCS file: /cvs/mushclient/TextView.cpp,v retrieving revision 1.35 retrieving revision 1.40 diff -c -r1.35 -r1.40 *** TextView.cpp 4 May 2007 04:00:22 -0000 1.35 --- TextView.cpp 12 Jun 2007 04:01:56 -0000 1.40 *************** *** 539,545 **** { CTime theTime = CTime::GetCurrentTime(); ! CString strTime = theTime.Format ("%A, %#d %B %Y, %#I:%M %p"); // insert the time GetEditCtrl ().ReplaceSel (strTime, true); --- 539,545 ---- { CTime theTime = CTime::GetCurrentTime(); ! CString strTime = theTime.Format (TranslateTime ("%A, %#d %B %Y, %#I:%M %p")); // insert the time GetEditCtrl ().ReplaceSel (strTime, true); *************** *** 586,598 **** CString strDisplay; ! strDisplay.Format ("The %s contains %i line%s, %i word%s, %i character%s", (LPCTSTR) strSelection, PLURAL (iNewLines), PLURAL (iWords), PLURAL (strText.GetLength ())); ! ::AfxMessageBox (strDisplay, MB_ICONINFORMATION); } --- 586,598 ---- CString strDisplay; ! strDisplay = TFormat ("The %s contains %i line%s, %i word%s, %i character%s", (LPCTSTR) strSelection, PLURAL (iNewLines), PLURAL (iWords), PLURAL (strText.GetLength ())); ! UMessageBox (strDisplay, MB_ICONINFORMATION); } *************** *** 910,922 **** GetSelection (strText); pCmdUI->Enable(!strText.IsEmpty ()); ! pCmdUI->SetText(CFormat ("&Send To %s\tShift+Ctrl+S", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText("&Send To World\tShift+Ctrl+S"); } } --- 910,922 ---- GetSelection (strText); pCmdUI->Enable(!strText.IsEmpty ()); ! pCmdUI->SetText(TFormat ("&Send To %s\tShift+Ctrl+S", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText(Translate ("&Send To World\tShift+Ctrl+S")); } } *************** *** 969,975 **** return; if (pDoc->IsModified ()) ! if (::AfxMessageBox (CFormat ("Replace entire window contents with \'recall\' from %s?", (LPCTSTR) pWorld->m_mush_name), MB_YESNO | MB_ICONQUESTION ) != IDYES) return; --- 969,975 ---- return; if (pDoc->IsModified ()) ! if (::TMessageBox (TFormat ("Replace entire window contents with \'recall\' from %s?", (LPCTSTR) pWorld->m_mush_name), MB_YESNO | MB_ICONQUESTION ) != IDYES) return; *************** *** 1130,1142 **** if (pWorld) { pCmdUI->Enable(TRUE); ! pCmdUI->SetText(CFormat ("&Flip To %s\tCtrl+Alt+Space", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText("&Flip To World\tCtrl+Alt+Space"); } } --- 1130,1142 ---- if (pWorld) { pCmdUI->Enable(TRUE); ! pCmdUI->SetText(TFormat ("&Flip To %s\tCtrl+Alt+Space", (LPCTSTR) pWorld->m_mush_name)); } else { pCmdUI->Enable(FALSE); ! pCmdUI->SetText(Translate ("&Flip To World\tCtrl+Alt+Space")); } } *************** *** 1339,1345 **** if (*pOld != '>') { ! ::AfxMessageBox ("Unterminated element (\"<\" not followed by \">\")", MB_ICONSTOP); return; } --- 1339,1345 ---- if (*pOld != '>') { ! ::TMessageBox ("Unterminated element (\"<\" not followed by \">\")", MB_ICONSTOP); return; } *************** *** 1355,1361 **** if (*pOld != ';') { ! ::AfxMessageBox ("Unterminated entity (\"&\" not followed by \";\")", MB_ICONSTOP); return; } --- 1355,1361 ---- if (*pOld != ';') { ! ::TMessageBox ("Unterminated entity (\"&\" not followed by \";\")", MB_ICONSTOP); return; } *************** *** 1373,1379 **** { if (!isxdigit (strEntity [i])) { ! ::AfxMessageBox (CFormat ("Invalid hex number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1373,1379 ---- { if (!isxdigit (strEntity [i])) { ! ::TMessageBox (TFormat ("Invalid hex number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1382,1388 **** if (iNewDigit >= 'A') iNewDigit -= 7; if (iResult & 0xF0) ! ::AfxMessageBox (CFormat ("Invalid hex number in entity: &%s; " "- maximum of 2 hex digits", (LPCTSTR) strEntity), MB_ICONSTOP); iResult = (iResult << 4) + iNewDigit - '0'; --- 1382,1388 ---- if (iNewDigit >= 'A') iNewDigit -= 7; if (iResult & 0xF0) ! ::TMessageBox (TFormat ("Invalid hex number in entity: &%s; " "- maximum of 2 hex digits", (LPCTSTR) strEntity), MB_ICONSTOP); iResult = (iResult << 4) + iNewDigit - '0'; *************** *** 1394,1400 **** { if (!isdigit (strEntity [i])) { ! ::AfxMessageBox (CFormat ("Invalid number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1394,1400 ---- { if (!isdigit (strEntity [i])) { ! ::TMessageBox (TFormat ("Invalid number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1407,1413 **** if (iResult < 32 || // don't allow nonprintable characters iResult > 255) // don't allow characters more than 1 byte { ! ::AfxMessageBox (CFormat ("Disallowed number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1407,1413 ---- if (iResult < 32 || // don't allow nonprintable characters iResult > 255) // don't allow characters more than 1 byte { ! ::TMessageBox (TFormat ("Disallowed number in entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1420,1426 **** *pNew++ = strEntityContents [0]; else { ! ::AfxMessageBox (CFormat ("Unknown entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } --- 1420,1426 ---- *pNew++ = strEntityContents [0]; else { ! ::TMessageBox (TFormat ("Unknown entity: &%s;" , (LPCTSTR) strEntity), MB_ICONSTOP); return; } *************** *** 1533,1556 **** } // end of OpenLuaDelayed - extern LONG WINAPI DelayLoadDllExceptionFilterLua(PEXCEPTION_POINTERS pep); void CTextView::OpenLua () { - // Wrap all calls to delay-load DLL functions inside SEH - __try - { OpenLuaDelayed (); - } - - __except (DelayLoadDllExceptionFilterLua(GetExceptionInformation())) - { - // Nothing to do in here, thread continues to run normally - L = NULL; - } - } // end of CScriptEngine::OpenLua --- 1533,1544 ---- *************** *** 1621,1629 **** // show selection size if (nEndChar > nStartChar) ! dlg.m_strSelectionSize = CFormat ("%i character%s selected.", PLURAL (strText.GetLength ())); else ! dlg.m_strSelectionSize = CFormat ("All text selected: %i character%s", PLURAL (strText.GetLength ())); int iLines = 0; --- 1609,1617 ---- // show selection size if (nEndChar > nStartChar) ! dlg.m_strSelectionSize = TFormat ("%i character%s selected.", PLURAL (strText.GetLength ())); else ! dlg.m_strSelectionSize = TFormat ("All text selected: %i character%s", PLURAL (strText.GetLength ())); int iLines = 0; *************** *** 1634,1640 **** if (*p++ == '\n') iLines++; ! dlg.m_strSelectionSize += CFormat (" (%i line break%s)", PLURAL (iLines)); // restore from last time dlg.m_strFindPattern = App.m_strFind; --- 1622,1628 ---- if (*p++ == '\n') iLines++; ! dlg.m_strSelectionSize += TFormat (" (%i line break%s)", PLURAL (iLines)); // restore from last time dlg.m_strFindPattern = App.m_strFind; *************** *** 1725,1731 **** lua_close (L); // done with Lua script space // show count of replacements in status bar ! Frame.SetStatusMessageNow (CFormat ("%i replaced.", count)); } --- 1713,1719 ---- lua_close (L); // done with Lua script space // show count of replacements in status bar ! Frame.SetStatusMessageNow (TFormat ("%i replaced.", count)); } Index: TimerDlg.cpp =================================================================== RCS file: /cvs/mushclient/TimerDlg.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** TimerDlg.cpp 26 Apr 2007 02:55:45 -0000 1.21 --- TimerDlg.cpp 11 Jun 2007 10:42:08 -0000 1.22 *************** *** 127,133 **** if (ts1 <= CmcDateTimeSpan (0, 0, 0, 0)) { ! ::AfxMessageBox("The timer interval must be greater than zero."); DDX_Text(pDX, IDC_INTERVAL_HOUR, m_iEveryHour); pDX->Fail(); return; --- 127,133 ---- if (ts1 <= CmcDateTimeSpan (0, 0, 0, 0)) { ! ::TMessageBox("The timer interval must be greater than zero."); DDX_Text(pDX, IDC_INTERVAL_HOUR, m_iEveryHour); pDX->Fail(); return; *************** *** 135,141 **** if(ts2 >= ts1) { ! ::AfxMessageBox("The timer offset must be less than the timer period."); DDX_Text(pDX, IDC_OFFSET_HOUR, m_iOffsetHour); pDX->Fail(); return; --- 135,141 ---- if(ts2 >= ts1) { ! ::TMessageBox("The timer offset must be less than the timer period."); DDX_Text(pDX, IDC_OFFSET_HOUR, m_iOffsetHour); pDX->Fail(); return; *************** *** 162,170 **** if (m_strLabel.CompareNoCase (timer_item->strLabel) == 0) { CString strMsg; ! strMsg.Format ("The timer label \"%s\" is already in the list of timers.", (LPCTSTR) m_strLabel); ! ::AfxMessageBox(strMsg); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); return; --- 162,170 ---- if (m_strLabel.CompareNoCase (timer_item->strLabel) == 0) { CString strMsg; ! strMsg = TFormat ("The timer label \"%s\" is already in the list of timers.", (LPCTSTR) m_strLabel); ! ::TMessageBox(strMsg); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); return; *************** *** 179,185 **** if (CheckLabel (m_strLabel)) { ! ::AfxMessageBox("The label must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); --- 179,185 ---- if (CheckLabel (m_strLabel)) { ! ::TMessageBox ("The label must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_TIMER_LABEL, m_strLabel); pDX->Fail(); *************** *** 193,199 **** { if (m_iSendTo == eSendToVariable) { ! ::AfxMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 193,199 ---- { if (m_iSendTo == eSendToVariable) { ! ::TMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 206,212 **** if (CheckLabel (m_strVariable)) { ! ::AfxMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 206,212 ---- if (CheckLabel (m_strVariable)) { ! ::TMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 226,232 **** { if (strResult [0] == '*') // error in speedwalk string? { ! ::AfxMessageBox (strResult.Mid (1)); DDX_Text(pDX, IDC_TIMER_CONTENTS, m_strContents); pDX->Fail(); } // end of error message --- 226,232 ---- { if (strResult [0] == '*') // error in speedwalk string? { ! ::TMessageBox (strResult.Mid (1)); // already translated, I think DDX_Text(pDX, IDC_TIMER_CONTENTS, m_strContents); pDX->Fail(); } // end of error message *************** *** 235,241 **** if(m_strContents.IsEmpty () && m_strProcedure.IsEmpty ()) { ! ::AfxMessageBox("The timer contents cannot be blank unless you specify a script subroutine."); DDX_Text(pDX, IDC_TIMER_CONTENTS, m_strContents); pDX->Fail(); return; --- 235,241 ---- if(m_strContents.IsEmpty () && m_strProcedure.IsEmpty ()) { ! ::TMessageBox("The timer contents cannot be blank unless you specify a script subroutine."); DDX_Text(pDX, IDC_TIMER_CONTENTS, m_strContents); pDX->Fail(); return; *************** *** 249,255 **** if (CheckLabel (m_strProcedure, true)) { ! ::AfxMessageBox("The script subroutine name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_SCRIPT_NAME, m_strProcedure); pDX->Fail(); --- 249,255 ---- if (CheckLabel (m_strProcedure, true)) { ! ::TMessageBox("The script subroutine name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_SCRIPT_NAME, m_strProcedure); pDX->Fail(); Index: Utilities.cpp =================================================================== RCS file: /cvs/mushclient/Utilities.cpp,v retrieving revision 1.66 retrieving revision 1.71 diff -c -r1.66 -r1.71 *** Utilities.cpp 4 May 2007 04:00:22 -0000 1.66 --- Utilities.cpp 12 Jun 2007 04:01:56 -0000 1.71 *************** *** 1720,1726 **** sItem = sPrev; if (bRaiseError) ! ::AfxMessageBox (CFormat ("Cannot find the function '%s' - item '%s' is %s", sName, sItem.c_str (), lua_typename(L, lua_type (L,-1)) --- 1720,1726 ---- sItem = sPrev; if (bRaiseError) ! ::TMessageBox (TFormat ("Cannot find the function '%s' - item '%s' is %s", sName, sItem.c_str (), lua_typename(L, lua_type (L,-1)) *************** *** 2308,2314 **** *pNew++ = 0; // terminator at end strNewText.ReleaseBuffer (); ! if (::AfxMessageBox (CFormat ("Clipboard converted for use with the Forum, %i change%s made", PLURAL (iChanges)), MB_ICONINFORMATION | MB_OKCANCEL) != IDOK) return strText; --- 2308,2314 ---- *pNew++ = 0; // terminator at end strNewText.ReleaseBuffer (); ! if (::TMessageBox (TFormat ("Clipboard converted for use with the Forum, %i change%s made", PLURAL (iChanges)), MB_ICONINFORMATION | MB_OKCANCEL) != IDOK) return strText; *************** *** 2430,2435 **** --- 2430,2436 ---- } + // don't translate this, I think :) static int panic (lua_State *L) { (void)L; /* to avoid warnings */ ::AfxMessageBox (CFormat ("PANIC: unprotected error in call to Lua API (%s)", *************** *** 2509,2538 **** { switch (iError) { ! case PCRE_ERROR_NOMATCH : return "No match"; ! case PCRE_ERROR_NULL : return "Null"; ! case PCRE_ERROR_BADOPTION : return "Bad option"; ! case PCRE_ERROR_BADMAGIC : return "Bad magic"; ! case PCRE_ERROR_UNKNOWN_OPCODE : return "Unknown Opcode"; ! case PCRE_ERROR_NOMEMORY : return "No Memory"; ! case PCRE_ERROR_NOSUBSTRING : return "No Substring"; ! case PCRE_ERROR_MATCHLIMIT : return "Match Limit"; ! case PCRE_ERROR_CALLOUT : return "Callout"; ! case PCRE_ERROR_BADUTF8 : return "Bad UTF8"; ! case PCRE_ERROR_BADUTF8_OFFSET : return "Bad UTF8 Offset"; ! case PCRE_ERROR_PARTIAL : return "Partial"; ! case PCRE_ERROR_BADPARTIAL : return "Bad Partial"; ! case PCRE_ERROR_INTERNAL : return "Internal"; ! case PCRE_ERROR_BADCOUNT : return "Bad Count"; ! case PCRE_ERROR_DFA_UITEM : return "Dfa Uitem"; ! case PCRE_ERROR_DFA_UCOND : return "Dfa Ucond"; ! case PCRE_ERROR_DFA_UMLIMIT : return "Dfa Umlimit"; ! case PCRE_ERROR_DFA_WSSIZE : return "Dfa Wssize"; ! case PCRE_ERROR_DFA_RECURSE : return "Dfa Recurse"; ! case PCRE_ERROR_RECURSIONLIMIT : return "Recursion Limit"; ! case PCRE_ERROR_NULLWSLIMIT : return "Null Ws Limit"; ! case PCRE_ERROR_BADNEWLINE : return "Bad Newline"; ! default: return "Unknown PCRE error"; } } // end of Convert_PCRE_Runtime_Error --- 2510,2539 ---- { switch (iError) { ! case PCRE_ERROR_NOMATCH : return Translate ("No match"); ! case PCRE_ERROR_NULL : return Translate ("Null"); ! case PCRE_ERROR_BADOPTION : return Translate ("Bad option"); ! case PCRE_ERROR_BADMAGIC : return Translate ("Bad magic"); ! case PCRE_ERROR_UNKNOWN_OPCODE : return Translate ("Unknown Opcode"); ! case PCRE_ERROR_NOMEMORY : return Translate ("No Memory"); ! case PCRE_ERROR_NOSUBSTRING : return Translate ("No Substring"); ! case PCRE_ERROR_MATCHLIMIT : return Translate ("Match Limit"); ! case PCRE_ERROR_CALLOUT : return Translate ("Callout"); ! case PCRE_ERROR_BADUTF8 : return Translate ("Bad UTF8"); ! case PCRE_ERROR_BADUTF8_OFFSET : return Translate ("Bad UTF8 Offset"); ! case PCRE_ERROR_PARTIAL : return Translate ("Partial"); ! case PCRE_ERROR_BADPARTIAL : return Translate ("Bad Partial"); ! case PCRE_ERROR_INTERNAL : return Translate ("Internal"); ! case PCRE_ERROR_BADCOUNT : return Translate ("Bad Count"); ! case PCRE_ERROR_DFA_UITEM : return Translate ("Dfa Uitem"); ! case PCRE_ERROR_DFA_UCOND : return Translate ("Dfa Ucond"); ! case PCRE_ERROR_DFA_UMLIMIT : return Translate ("Dfa Umlimit"); ! case PCRE_ERROR_DFA_WSSIZE : return Translate ("Dfa Wssize"); ! case PCRE_ERROR_DFA_RECURSE : return Translate ("Dfa Recurse"); ! case PCRE_ERROR_RECURSIONLIMIT : return Translate ("Recursion Limit"); ! case PCRE_ERROR_NULLWSLIMIT : return Translate ("Null Ws Limit"); ! case PCRE_ERROR_BADNEWLINE : return Translate ("Bad Newline"); ! default: return Translate ("Unknown PCRE error"); } } // end of Convert_PCRE_Runtime_Error *************** *** 2576,2579 **** --- 2577,2880 ---- } return (first[0] << 8) + first[1]; } + + // i18n (Internationalization) stuff + + // translate message (eg. "File cannot be opened") into locale-specific language + const char * TranslateGeneric (const char * sText, const char * sSection) + { + const char * sResult = sText; // default if not found is the source string + + // no translation file? + if (App.m_Translator_Lua == NULL) + return sText; // no file - just return source text + + lua_settop (App.m_Translator_Lua, 0); // pop everything from last time + + lua_getglobal (App.m_Translator_Lua, sSection); + if (!lua_istable (App.m_Translator_Lua, -1)) + return sText; // no messages table - just return source text + + lua_getfield (App.m_Translator_Lua, -1, sText); + + // if we found it, take result + if (lua_isstring (App.m_Translator_Lua, -1)) + sResult = lua_tostring (App.m_Translator_Lua, -1); + + // if string is not empty, use it + if (sResult [0]) + return sResult; + else + return sText; + } // end of Translate + + // translate message (eg. "File %s cannot be opened") into locale-specific language + + // This parses the format string, and works out how many arguments to supply to the Lua function + + // Characters and strings will be supplied as string type, others will be numbers. + + /* + + ["You have loaded %i %s%s"] = + function (a, b, c) + return "Thou hast loaded " .. a .. " " .. b .. c + end -- function + + */ + + /* valid flags in a format specification */ + #define FORMATFLAGS "-+ #0" + + const char * TFormat (const char * sFormat, ...) + { + static CString strTranslated; + + bool bNotFound = App.m_Translator_Lua == NULL; + + if (!bNotFound) + { + lua_settop (App.m_Translator_Lua, 0); // pop everything from last time + lua_getglobal (App.m_Translator_Lua, "formatted"); + } + else + bNotFound = true; + + + if (!bNotFound && lua_istable (App.m_Translator_Lua, -1)) + lua_getfield (App.m_Translator_Lua, -1, sFormat); + else + bNotFound = true; + + + const char * sResult = NULL; + + // if we found it, pass arguments, and call it + if (!bNotFound && lua_isfunction (App.m_Translator_Lua, -1)) + { + + va_list sstrings; + va_start(sstrings, sFormat); + int iArgCount = 0; + + // scan format string looking for % symbols + const char * sFormatItem = sFormat; + + while (sFormatItem = strchr (sFormatItem, '%')) + { + sFormatItem++; // skip the % + + // skip special flags ( + while (strchr(FORMATFLAGS, *sFormatItem)) + sFormatItem++; /* skip flags */ + if (isdigit(unsigned char (*sFormatItem))) + sFormatItem++; /* skip width */ + if (isdigit(unsigned char (*sFormatItem))) + sFormatItem++; /* (2 digits at most) */ + if (*sFormatItem == '.') + { + sFormatItem++; + if (isdigit(unsigned char (*sFormatItem))) + sFormatItem++; /* skip precision */ + if (isdigit(unsigned char (*sFormatItem))) + sFormatItem++; /* (2 digits at most) */ + } + + // Microsoft extensions which specify data width + char cWidth = 0; // h = short, l = long, L = __int64 + + if (*sFormatItem == 'l' || *sFormatItem == 'h') + cWidth = *sFormatItem++; + else + if (memcmp (sFormatItem, "I64", 3) == 0) + { + cWidth = 'L'; + sFormatItem += 3; // skip I64 + } + + char cType = *sFormatItem++; // type of field + + // having %% in the string does not require an argument + if (cType == '%') + continue; + + iArgCount++; + + char* sArg; + char cArg; + double dArg; + + switch (cType) + { + // single character (pushed as a number - see definition for %c) + case 'c': + cArg = va_arg (sstrings, char); + lua_pushinteger (App.m_Translator_Lua, cArg); + break; + + // signed integers + case 'd': case 'i': + switch (cWidth) + { + case 'h': + dArg = va_arg (sstrings, short); + break; + + case 'L': + dArg = va_arg (sstrings, __int64); + break; + + default: + dArg = va_arg (sstrings, int); + break; + } + lua_pushnumber (App.m_Translator_Lua, dArg); + break; + + // unsigned integers + case 'o': case 'u': case 'x': case 'X': + switch (cWidth) + { + case 'h': + dArg = va_arg (sstrings, unsigned short); + break; + + case 'L': + dArg = va_arg (sstrings, /* unsigned */ __int64); // not implemented in this version + break; + + default: + dArg = va_arg (sstrings, unsigned int); + break; + } + lua_pushnumber (App.m_Translator_Lua, dArg); + break; + + case 'e': case 'E': case 'f': + case 'g': case 'G': + dArg = va_arg (sstrings, double); + lua_pushnumber (App.m_Translator_Lua, dArg); + break; + + case 's': + sArg = va_arg (sstrings, char *); + lua_pushstring (App.m_Translator_Lua, sArg); + break; + + // unknown, don't count it + default: + iArgCount--; + break; + + } // end of switch + + } // end while loop + + + va_end (sstrings); + + if (lua_pcall (App.m_Translator_Lua, iArgCount, 1, 0)) // call with n args and 1 result + { + LuaError (App.m_Translator_Lua, "Calling TFormat"); + bNotFound = true; // if error, ignore it + } + else + { + // function better have returned a string + if (lua_isstring (App.m_Translator_Lua, -1)) + { + sResult = lua_tostring (App.m_Translator_Lua, -1); + // only use if it evaluates to a non-empty string + if (sResult [0] == 0) + bNotFound = true; + } + else + bNotFound = true; // not a string on stack + + } // end of executed OK + + } // end of function found + else + bNotFound = true; + + // failure ? use standard formatting on string + if (sResult == NULL || bNotFound) + { + va_list argList; + va_start(argList, sFormat); + strTranslated = CFormat (sFormat, argList); + va_end(argList); + return strTranslated; + } + + return sResult; + } // end of TFormat + + // display message box - using UTF-8 + int UMessageBox (const char * sText, UINT nType) + { + + int iBad = _pcre_valid_utf8 ((unsigned char *) sText, strlen (sText)); + + // use PCRE to validate the string first - if bad, fall back to standard box + if (iBad >= 0) + return ::AfxMessageBox (sText, nType); + + // find how big table has to be + int iLength = MultiByteToWideChar (CP_UTF8, 0, sText, -1, NULL, NULL); + + // vector to hold Unicode + vector v; + + // adjust size + v.resize (iLength); + + // do the conversion now + MultiByteToWideChar (CP_UTF8, 0, sText, -1, &v [0], iLength); + + // disable windows for modal dialog + App.EnableModeless(FALSE); + HWND hWndTop; + HWND hWnd = CWnd::GetSafeOwner_(NULL, &hWndTop); + + // determine icon based on type specified + if ((nType & MB_ICONMASK) == 0) + { + switch (nType & MB_TYPEMASK) + { + case MB_OK: + case MB_OKCANCEL: + nType |= MB_ICONEXCLAMATION; + break; + + case MB_YESNO: + case MB_YESNOCANCEL: + nType |= MB_ICONEXCLAMATION; + break; + + case MB_ABORTRETRYIGNORE: + case MB_RETRYCANCEL: + // No default icon for these types, since they are rarely used. + // The caller should specify the icon. + break; + } + } + + int nResult = ::MessageBoxW (hWnd, &v [0], L"MUSHclient", nType); + + // re-enable windows + if (hWndTop != NULL) + ::EnableWindow(hWndTop, TRUE); + App.EnableModeless(TRUE); + + return nResult; + + } // end of UMessageBox + + // display message box - translated + int TMessageBox (const char * sText, UINT nType) + { + return UMessageBox (Translate (sText), nType); + } + Index: aliasdlg.cpp =================================================================== RCS file: /cvs/mushclient/aliasdlg.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -c -r1.39 -r1.40 *** aliasdlg.cpp 26 Apr 2007 02:55:45 -0000 1.39 --- aliasdlg.cpp 11 Jun 2007 21:40:12 -0000 1.40 *************** *** 120,126 **** if (m_name.IsEmpty ()) { ! ::AfxMessageBox("The alias cannot be blank."); DDX_Text(pDX, IDC_ALIAS_NAME, m_name); pDX->Fail(); } // end of alias being blank --- 120,126 ---- if (m_name.IsEmpty ()) { ! ::TMessageBox("The alias cannot be blank."); DDX_Text(pDX, IDC_ALIAS_NAME, m_name); pDX->Fail(); } // end of alias being blank *************** *** 179,185 **** if (bDuplicate) { ! ::AfxMessageBox("This alias is already in the list of aliases."); DDX_Text(pDX, IDC_ALIAS_NAME, m_name); pDX->Fail(); } --- 179,185 ---- if (bDuplicate) { ! ::TMessageBox("This alias is already in the list of aliases."); DDX_Text(pDX, IDC_ALIAS_NAME, m_name); pDX->Fail(); } *************** *** 192,200 **** if (m_strLabel.CompareNoCase (alias_item->strLabel) == 0) { CString strMsg; ! strMsg.Format ("The alias label \"%s\" is already in the list of aliases.", (LPCTSTR) m_strLabel); ! ::AfxMessageBox(strMsg); DDX_Text(pDX, IDC_ALIAS_LABEL, m_strLabel); pDX->Fail(); } --- 192,200 ---- if (m_strLabel.CompareNoCase (alias_item->strLabel) == 0) { CString strMsg; ! strMsg = TFormat ("The alias label \"%s\" is already in the list of aliases.", (LPCTSTR) m_strLabel); ! ::UMessageBox(strMsg); DDX_Text(pDX, IDC_ALIAS_LABEL, m_strLabel); pDX->Fail(); } *************** *** 208,214 **** if (CheckLabel (m_strLabel)) { ! ::AfxMessageBox("The label must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_ALIAS_LABEL, m_strLabel); pDX->Fail(); --- 208,214 ---- if (CheckLabel (m_strLabel)) { ! ::TMessageBox("The label must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_ALIAS_LABEL, m_strLabel); pDX->Fail(); *************** *** 220,226 **** { if (m_iSendTo == eSendToVariable) { ! ::AfxMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 220,226 ---- { if (m_iSendTo == eSendToVariable) { ! ::TMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 233,239 **** if (CheckLabel (m_strVariable)) { ! ::AfxMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 233,239 ---- if (CheckLabel (m_strVariable)) { ! ::TMessageBox("The variable name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 253,259 **** { if (strResult [0] == '*') // error in speedwalk string? { ! ::AfxMessageBox (strResult.Mid (1)); DDX_Text(pDX, IDC_ALIAS_CONTENTS, m_contents); pDX->Fail(); } // end of error message --- 253,259 ---- { if (strResult [0] == '*') // error in speedwalk string? { ! ::UMessageBox (strResult.Mid (1)); DDX_Text(pDX, IDC_ALIAS_CONTENTS, m_contents); pDX->Fail(); } // end of error message *************** *** 263,269 **** if(m_contents.IsEmpty () && m_strProcedure.IsEmpty ()) { ! ::AfxMessageBox("The alias contents cannot be blank unless you specify a script subroutine."); DDX_Text(pDX, IDC_ALIAS_CONTENTS, m_contents); pDX->Fail(); return; --- 263,269 ---- if(m_contents.IsEmpty () && m_strProcedure.IsEmpty ()) { ! ::TMessageBox("The alias contents cannot be blank unless you specify a script subroutine."); DDX_Text(pDX, IDC_ALIAS_CONTENTS, m_contents); pDX->Fail(); return; *************** *** 277,283 **** if (CheckLabel (m_strProcedure, true)) { ! ::AfxMessageBox("The script subroutine name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_SCRIPT_NAME, m_strProcedure); pDX->Fail(); --- 277,283 ---- if (CheckLabel (m_strProcedure, true)) { ! ::TMessageBox("The script subroutine name must start with a letter and consist of letters" ", numbers or the underscore character."); DDX_Text(pDX, IDC_SCRIPT_NAME, m_strProcedure); pDX->Fail(); *************** *** 420,426 **** { if (strContents [0] == '*') // error in speedwalk string? { ! ::AfxMessageBox (strContents.Mid (1)); return; } // end of error message } // end of non-empty speedwalk --- 420,426 ---- { if (strContents [0] == '*') // error in speedwalk string? { ! ::UMessageBox (strContents.Mid (1)); return; } // end of error message } // end of non-empty speedwalk Index: chatlistensock.cpp =================================================================== RCS file: /cvs/mushclient/chatlistensock.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** chatlistensock.cpp 21 Apr 2003 01:15:46 -0000 1.3 --- chatlistensock.cpp 12 Jun 2007 04:01:56 -0000 1.4 *************** *** 63,69 **** m_pDoc->ChatNote (eChatConnection, ! CFormat ( "Accepted call from %s port %d", (LPCTSTR) pSocket->m_strServerName, ntohs (pSocket->m_ServerAddr.sin_port))); --- 63,69 ---- m_pDoc->ChatNote (eChatConnection, ! TFormat ( "Accepted call from %s port %d", (LPCTSTR) pSocket->m_strServerName, ntohs (pSocket->m_ServerAddr.sin_port))); Index: cmdhist.cpp =================================================================== RCS file: /cvs/mushclient/cmdhist.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** cmdhist.cpp 28 Nov 2004 03:53:56 -0000 1.11 --- cmdhist.cpp 12 Jun 2007 04:01:56 -0000 1.12 *************** *** 245,251 **** // edit current input window CreateTextWindow (str, // command ! CFormat ("Notepad: %s", (LPCTSTR) m_pDoc->m_mush_name), // title m_pDoc, // document m_pDoc->m_iUniqueDocumentNumber, // document number m_pDoc->m_input_font_name, --- 245,251 ---- // edit current input window CreateTextWindow (str, // command ! TFormat ("Notepad: %s", (LPCTSTR) m_pDoc->m_mush_name), // title m_pDoc, // document m_pDoc->m_iUniqueDocumentNumber, // document number m_pDoc->m_input_font_name, Index: configuration.cpp =================================================================== RCS file: /cvs/mushclient/configuration.cpp,v retrieving revision 1.45 retrieving revision 1.48 diff -c -r1.45 -r1.48 *** configuration.cpp 6 Mar 2007 01:21:49 -0000 1.45 --- configuration.cpp 12 Jun 2007 04:01:56 -0000 1.48 *************** *** 179,189 **** page7.m_iColJust [CPrefsP7::eColumnLabel] = LVCFMT_LEFT; page7.m_iColJust [CPrefsP7::eColumnGroup] = LVCFMT_LEFT; ! page7.m_strColumnHeadings [CPrefsP7::eColumnAlias] = "Alias"; ! page7.m_strColumnHeadings [CPrefsP8::eColumnSequence] = "Seq"; ! page7.m_strColumnHeadings [CPrefsP7::eColumnContents] = "Send"; ! page7.m_strColumnHeadings [CPrefsP7::eColumnLabel] = "Label"; ! page7.m_strColumnHeadings [CPrefsP7::eColumnGroup] = "Group"; } // end of CMUSHclientDoc::LoadPrefsP7 void CMUSHclientDoc:: LoadPrefsP8 (CPrefsP8 &page8) --- 179,189 ---- page7.m_iColJust [CPrefsP7::eColumnLabel] = LVCFMT_LEFT; page7.m_iColJust [CPrefsP7::eColumnGroup] = LVCFMT_LEFT; ! page7.m_strColumnHeadings [CPrefsP7::eColumnAlias] = TranslateHeading ("Alias"); ! page7.m_strColumnHeadings [CPrefsP8::eColumnSequence] = TranslateHeading ("Seq"); ! page7.m_strColumnHeadings [CPrefsP7::eColumnContents] = TranslateHeading ("Send"); ! page7.m_strColumnHeadings [CPrefsP7::eColumnLabel] = TranslateHeading ("Label"); ! page7.m_strColumnHeadings [CPrefsP7::eColumnGroup] = TranslateHeading ("Group"); } // end of CMUSHclientDoc::LoadPrefsP7 void CMUSHclientDoc:: LoadPrefsP8 (CPrefsP8 &page8) *************** *** 219,229 **** page8.m_iColJust [CPrefsP8::eColumnLabel] = LVCFMT_LEFT; page8.m_iColJust [CPrefsP8::eColumnGroup] = LVCFMT_LEFT; ! page8.m_strColumnHeadings [CPrefsP8::eColumnTrigger] = "Trigger"; ! page8.m_strColumnHeadings [CPrefsP8::eColumnSequence] = "Seq"; ! page8.m_strColumnHeadings [CPrefsP8::eColumnContents] = "Send"; ! page8.m_strColumnHeadings [CPrefsP8::eColumnLabel] = "Label"; ! page8.m_strColumnHeadings [CPrefsP8::eColumnGroup] = "Group"; } // end of CMUSHclientDoc::LoadPrefsP8 void CMUSHclientDoc:: LoadPrefsP9 (CPrefsP9 &page9) --- 219,229 ---- page8.m_iColJust [CPrefsP8::eColumnLabel] = LVCFMT_LEFT; page8.m_iColJust [CPrefsP8::eColumnGroup] = LVCFMT_LEFT; ! page8.m_strColumnHeadings [CPrefsP8::eColumnTrigger] = TranslateHeading ("Trigger"); ! page8.m_strColumnHeadings [CPrefsP8::eColumnSequence] = TranslateHeading ("Seq"); ! page8.m_strColumnHeadings [CPrefsP8::eColumnContents] = TranslateHeading ("Send"); ! page8.m_strColumnHeadings [CPrefsP8::eColumnLabel] = TranslateHeading ("Label"); ! page8.m_strColumnHeadings [CPrefsP8::eColumnGroup] = TranslateHeading ("Group"); } // end of CMUSHclientDoc::LoadPrefsP8 void CMUSHclientDoc:: LoadPrefsP9 (CPrefsP9 &page9) *************** *** 456,462 **** if (m_iConnectPhase != eConnectConnectedToMud) page15.m_strConnectionTime = "n/a"; else ! page15.m_strConnectionTime = m_tConnectTime.Format ("%A, %B %d, %Y, %#I:%M %p"); // first time spent in previous connections --- 456,462 ---- if (m_iConnectPhase != eConnectConnectedToMud) page15.m_strConnectionTime = "n/a"; else ! page15.m_strConnectionTime = m_tConnectTime.Format (TranslateTime ("%A, %B %d, %Y, %#I:%M %p")); // first time spent in previous connections *************** *** 547,557 **** page16.m_iColJust [CPrefsP16::eColumnLabel] = LVCFMT_LEFT; page16.m_iColJust [CPrefsP16::eColumnGroup] = LVCFMT_LEFT; ! page16.m_strColumnHeadings [CPrefsP16::eColumnType] = "Type"; ! page16.m_strColumnHeadings [CPrefsP16::eColumnWhen] = "When"; ! page16.m_strColumnHeadings [CPrefsP16::eColumnContents] = "Send"; ! page16.m_strColumnHeadings [CPrefsP16::eColumnLabel] = "Label"; ! page16.m_strColumnHeadings [CPrefsP16::eColumnGroup] = "Group"; } // end of CMUSHclientDoc::LoadPrefsP16 void CMUSHclientDoc:: LoadPrefsP17 (CPrefsP17 &page17) --- 547,557 ---- page16.m_iColJust [CPrefsP16::eColumnLabel] = LVCFMT_LEFT; page16.m_iColJust [CPrefsP16::eColumnGroup] = LVCFMT_LEFT; ! page16.m_strColumnHeadings [CPrefsP16::eColumnType] = TranslateHeading ("Type"); ! page16.m_strColumnHeadings [CPrefsP16::eColumnWhen] = TranslateHeading ("When"); ! page16.m_strColumnHeadings [CPrefsP16::eColumnContents] = TranslateHeading ("Send"); ! page16.m_strColumnHeadings [CPrefsP16::eColumnLabel] = TranslateHeading ("Label"); ! page16.m_strColumnHeadings [CPrefsP16::eColumnGroup] = TranslateHeading ("Group"); } // end of CMUSHclientDoc::LoadPrefsP16 void CMUSHclientDoc:: LoadPrefsP17 (CPrefsP17 &page17) *************** *** 626,633 **** page18.m_iColJust [CPrefsP18::eColumnName] = LVCFMT_LEFT; page18.m_iColJust [CPrefsP18::eColumnContents] = LVCFMT_LEFT; ! page18.m_strColumnHeadings [CPrefsP18::eColumnName] = "Name"; ! page18.m_strColumnHeadings [CPrefsP18::eColumnContents] = "Contents"; } // end of CMUSHclientDoc::LoadPrefsP18 void CMUSHclientDoc:: LoadPrefsP19 (CPrefsP19 &page19) --- 626,633 ---- page18.m_iColJust [CPrefsP18::eColumnName] = LVCFMT_LEFT; page18.m_iColJust [CPrefsP18::eColumnContents] = LVCFMT_LEFT; ! page18.m_strColumnHeadings [CPrefsP18::eColumnName] = TranslateHeading ("Name"); ! page18.m_strColumnHeadings [CPrefsP18::eColumnContents] = TranslateHeading ("Contents"); } // end of CMUSHclientDoc::LoadPrefsP18 void CMUSHclientDoc:: LoadPrefsP19 (CPrefsP19 &page19) *************** *** 1568,1574 **** { // warn in case they wonder why VBscript doesn't work if (bWine && m_strLanguage.CompareNoCase ("lua") != 0) ! ::AfxMessageBox ("Only the Lua script language is available with the /wine option", MB_ICONINFORMATION); else CreateScriptEngine (); // create scripting engine --- 1568,1574 ---- { // warn in case they wonder why VBscript doesn't work if (bWine && m_strLanguage.CompareNoCase ("lua") != 0) ! ::TMessageBox ("Only the Lua script language is available with the /wine option", MB_ICONINFORMATION); else CreateScriptEngine (); // create scripting engine Index: doc.cpp =================================================================== RCS file: /cvs/mushclient/doc.cpp,v retrieving revision 1.209 retrieving revision 1.214 diff -c -r1.209 -r1.214 *** doc.cpp 5 Jun 2007 22:10:36 -0000 1.209 --- doc.cpp 12 Jun 2007 04:01:56 -0000 1.214 *************** *** 541,547 **** { TRACE1 ("Could not allocate zlib memory: %i bytes\n", total_size); ! ::AfxMessageBox (CFormat ("Could not allocate zlib memory: %i bytes", total_size), MB_ICONEXCLAMATION); } else --- 541,547 ---- { TRACE1 ("Could not allocate zlib memory: %i bytes\n", total_size); ! ::TMessageBox (TFormat ("Could not allocate zlib memory: %i bytes", total_size), MB_ICONEXCLAMATION); } else *************** *** 634,650 **** } Note (""); ! Tell ("Welcome to MUSHclient version "); ! Tell (MUSHCLIENT_VERSION); ! Note ("!"); ! Note ("Written by Nick Gammon."); Note (""); ! Note ("For information and assistance about MUSHclient visit our forum at:"); Tell (" "); ! Hyperlink (MUSHCLIENT_FORUM_URL, FORUM_URL, "Go to forum", "deepskyblue", "black", TRUE); Note (""); Note (""); // set output window(s) to "pause" if wanted --- 634,650 ---- } Note (""); ! Note (TFormat ("Welcome to MUSHclient version %s!", MUSHCLIENT_VERSION)); ! Note (Translate ("Written by Nick Gammon.")); Note (""); ! Note (Translate ("For information and assistance about MUSHclient visit our forum at:")); Tell (" "); ! Hyperlink (MUSHCLIENT_FORUM_URL, FORUM_URL, Translate ("Go to forum"), "deepskyblue", "black", TRUE); Note (""); Note (""); + // Note ("\xC9\xB3\xC9\xA8\xC9\x95\xC9\xAE"); // Nick in funny characters + // set output window(s) to "pause" if wanted *************** *** 716,729 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! ::AfxMessageBox (CFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); --- 716,729 ---- catch (CFileException * e) { ! UMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CArchiveException* e) { ! UMessageBox (TFormat ("There was a problem loading the plugin %s. " "See the error window for more details", (LPCTSTR) strPath), MB_ICONEXCLAMATION); e->Delete (); *************** *** 808,828 **** if (m_mush_name.IsEmpty ()) { ! ::AfxMessageBox (CFormat ("Cannot connect. World name not specified", ! (const char *) m_mush_name)); return FALSE; } if (m_server.IsEmpty ()) { ! ::AfxMessageBox (CFormat ("Cannot connect to \"%s\", TCP/IP address not specified", (const char *) m_mush_name)); return FALSE; } if (m_port <= 0) { ! ::AfxMessageBox (CFormat ("Cannot connect to \"%s\", port number not specified", (const char *) m_mush_name)); return FALSE; } --- 808,827 ---- if (m_mush_name.IsEmpty ()) { ! TMessageBox ("Cannot connect. World name not specified"); return FALSE; } if (m_server.IsEmpty ()) { ! UMessageBox (TFormat ("Cannot connect to \"%s\", TCP/IP address not specified", (const char *) m_mush_name)); return FALSE; } if (m_port <= 0) { ! UMessageBox (TFormat ("Cannot connect to \"%s\", port number not specified", (const char *) m_mush_name)); return FALSE; } *************** *** 836,854 **** case eProxyServerSocks5: // socks 5 if (m_strProxyServerName.IsEmpty ()) { ! ::AfxMessageBox("The proxy server address cannot be blank."); return FALSE; } // end of proxy server name being blank if (m_iProxyServerPort == 0) { ! ::AfxMessageBox("The proxy server port must be specified."); return FALSE; } // end of proxy server port being zero break; default: ! ::AfxMessageBox(CFormat ("Unknown proxy server type: %d.", m_iSocksProcessing)); return FALSE; break; --- 835,853 ---- case eProxyServerSocks5: // socks 5 if (m_strProxyServerName.IsEmpty ()) { ! TMessageBox("The proxy server address cannot be blank."); return FALSE; } // end of proxy server name being blank if (m_iProxyServerPort == 0) { ! TMessageBox("The proxy server port must be specified."); return FALSE; } // end of proxy server port being zero break; default: ! UMessageBox(TFormat ("Unknown proxy server type: %d.", m_iSocksProcessing)); return FALSE; break; *************** *** 867,873 **** m_iUTF8ErrorCount = 0; ! str.Format ("Connecting to %s, port %d", (const char *) m_mush_name, m_port); Frame.SetStatusMessageNow (str); --- 866,872 ---- m_iUTF8ErrorCount = 0; ! str = TFormat ("Connecting to %s, port %d", (const char *) m_mush_name, m_port); Frame.SetStatusMessageNow (str); *************** *** 889,895 **** // tell them socket create failed ! ::AfxMessageBox (CFormat ("Unable to create TCP/IP socket for \"%s\", code = %i (%s)", (const char *) m_mush_name, iStatus, GetSocketError (iStatus))); --- 888,894 ---- // tell them socket create failed ! UMessageBox (TFormat ("Unable to create TCP/IP socket for \"%s\", code = %i (%s)", (const char *) m_mush_name, iStatus, GetSocketError (iStatus))); *************** *** 1263,1269 **** if ((COMPRESS_BUFFER_LENGTH - m_zCompress.avail_in) < (uInt) count) { OnConnectionDisconnect (); // close the world ! ::AfxMessageBox ("Insufficient memory in buffer to decompress text", MB_ICONEXCLAMATION); return; } // shuffle existing input to-be-processed to start of buffer --- 1262,1268 ---- if ((COMPRESS_BUFFER_LENGTH - m_zCompress.avail_in) < (uInt) count) { OnConnectionDisconnect (); // close the world ! TMessageBox ("Insufficient memory in buffer to decompress text", MB_ICONEXCLAMATION); return; } // shuffle existing input to-be-processed to start of buffer *************** *** 1321,1330 **** { OnConnectionDisconnect (); // close the world if (m_zCompress.msg) ! ::AfxMessageBox (CFormat ("Could not decompress text from MUD: %s", (LPCTSTR) m_zCompress.msg), MB_ICONEXCLAMATION); else ! ::AfxMessageBox (CFormat ("Could not decompress text from MUD: %i", iCompressResult), MB_ICONEXCLAMATION); return; } --- 1320,1329 ---- { OnConnectionDisconnect (); // close the world if (m_zCompress.msg) ! UMessageBox (TFormat ("Could not decompress text from MUD: %s", (LPCTSTR) m_zCompress.msg), MB_ICONEXCLAMATION); else ! UMessageBox (TFormat ("Could not decompress text from MUD: %i", iCompressResult), MB_ICONEXCLAMATION); return; } *************** *** 1813,1819 **** { case 0: // error starting it up OnConnectionDisconnect (); // close the world ! ::AfxMessageBox (strError, MB_ICONEXCLAMATION); break; case 1: // unexpected - do nothing break; --- 1812,1818 ---- { case 0: // error starting it up OnConnectionDisconnect (); // close the world ! UMessageBox (strError, MB_ICONEXCLAMATION); break; case 1: // unexpected - do nothing break; *************** *** 2319,2325 **** RemoveChunk (); // get rid of JUMP_SIZE lines OnConnectionDisconnect (); // close the world ! ::AfxMessageBox ("Ran out of memory. The world has been closed."); e->Delete (); --- 2318,2324 ---- RemoveChunk (); // get rid of JUMP_SIZE lines OnConnectionDisconnect (); // close the world ! TMessageBox ("Ran out of memory. The world has been closed."); e->Delete (); *************** *** 2363,2369 **** if (!m_bWarnIfScriptingInactive) // no warning return true; ColourNote ("white", "red", ! CFormat ("%s function \"%s\" cannot execute " "- scripting disabled/parse error.", sWhat, // trigger/alias/timer sScript)); // name of function --- 2362,2368 ---- if (!m_bWarnIfScriptingInactive) // no warning return true; ColourNote ("white", "red", ! TFormat ("%s function \"%s\" cannot execute " "- scripting disabled/parse error.", sWhat, // trigger/alias/timer sScript)); // name of function *************** *** 2375,2381 **** if (!m_bWarnIfScriptingInactive) // no warning return true; ColourNote ("white", "red", ! CFormat ("%s function \"%s\" not found " "or had a previous error.", sWhat, // trigger/alias/timer sScript)); // name of function --- 2374,2380 ---- if (!m_bWarnIfScriptingInactive) // no warning return true; ColourNote ("white", "red", ! TFormat ("%s function \"%s\" not found " "or had a previous error.", sWhat, // trigger/alias/timer sScript)); // name of function *************** *** 2394,2400 **** return; CString strType = "trigger"; ! CString strReason = CFormat ("processing trigger \"%s\"", (LPCTSTR) trigger_item->strLabel); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) --- 2393,2399 ---- return; CString strType = "trigger"; ! CString strReason = TFormat ("processing trigger \"%s\"", (LPCTSTR) trigger_item->strLabel); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) *************** *** 2483,2490 **** if (App.m_bConfirmLogFileClose) { CString str; ! str.Format ("Close log file %s?", (const char *) m_logfile_name); ! if (::AfxMessageBox (str, MB_OKCANCEL | MB_ICONQUESTION) == IDCANCEL) return; } // end of confirmation wanted --- 2482,2489 ---- if (App.m_bConfirmLogFileClose) { CString str; ! str = TFormat ("Close log file %s?", (const char *) m_logfile_name); ! if (UMessageBox (str, MB_OKCANCEL | MB_ICONQUESTION) == IDCANCEL) return; } // end of confirmation wanted *************** *** 2591,2598 **** { CString str; ! str.Format ("Unable to open log file \"%s\"", (LPCTSTR) m_logfile_name); ! ::AfxMessageBox (str); return; } --- 2590,2597 ---- { CString str; ! str = TFormat ("Unable to open log file \"%s\"", (LPCTSTR) m_logfile_name); ! UMessageBox (str); return; } *************** *** 2665,2671 **** // write preamble so they know what this is all about ! strTime = theTime.Format ("%A, %B %d, %Y, %#I:%M %p"); CString strPreamble = m_mush_name; strPreamble += " - "; --- 2664,2670 ---- // write preamble so they know what this is all about ! strTime = theTime.Format (TranslateTime ("%A, %B %d, %Y, %#I:%M %p")); CString strPreamble = m_mush_name; strPreamble += " - "; *************** *** 2870,2880 **** if (count != len) { CString str; ! str.Format ("An error occurred writing to log file \"%s\"", (LPCTSTR) m_logfile_name); fclose (m_logfile); m_logfile = NULL; ! ::AfxMessageBox (str); } // end of error on write } // end of WriteToLog --- 2869,2879 ---- if (count != len) { CString str; ! str = TFormat ("An error occurred writing to log file \"%s\"", (LPCTSTR) m_logfile_name); fclose (m_logfile); m_logfile = NULL; ! UMessageBox (str); } // end of error on write } // end of WriteToLog *************** *** 2984,2990 **** delete m_font [j]; // get rid of old font m_font [j] = NULL; } ! ::AfxMessageBox ("Unable to allocate memory for screen font"); return; } --- 2983,2989 ---- delete m_font [j]; // get rid of old font m_font [j] = NULL; } ! TMessageBox ("Unable to allocate memory for screen font"); return; } *************** *** 3054,3060 **** if (!m_input_font) { ! ::AfxMessageBox ("Unable to allocate memory for screen font"); return; } --- 3053,3059 ---- if (!m_input_font) { ! TMessageBox ("Unable to allocate memory for screen font"); return; } *************** *** 3294,3300 **** } catch (...) { ! ::AfxMessageBox ("An error occurred calculating amount to send to world", MB_ICONEXCLAMATION); return false; } // end of catching an exception --- 3293,3299 ---- } catch (...) { ! TMessageBox ("An error occurred calculating amount to send to world", MB_ICONEXCLAMATION); return false; } // end of catching an exception *************** *** 3446,3452 **** catch (...) { ! ::AfxMessageBox ("An error occurred when sending/pasting to this world", MB_ICONEXCLAMATION); } // end of catching an exception ar.Close (); --- 3445,3451 ---- catch (...) { ! TMessageBox ("An error occurred when sending/pasting to this world", MB_ICONEXCLAMATION); } // end of catching an exception ar.Close (); *************** *** 3503,3509 **** catch (CFileException * e) { if (e->m_cause != CFileException::endOfFile) ! ::AfxMessageBox ("Unable to open or read the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception --- 3502,3508 ---- catch (CFileException * e) { if (e->m_cause != CFileException::endOfFile) ! TMessageBox ("Unable to open or read the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception *************** *** 3526,3532 **** if (!::OpenClipboard(NULL) ) { if (bWarning) ! ::AfxMessageBox( "Cannot open the Clipboard" ); return FALSE; } --- 3525,3531 ---- if (!::OpenClipboard(NULL) ) { if (bWarning) ! TMessageBox( "Cannot open the Clipboard" ); return FALSE; } *************** *** 3558,3564 **** if ( (hData = ::GetClipboardData( CF_TEXT )) == NULL ) { if (bWarning) ! AfxMessageBox( "Unable to get Clipboard data" ); ::CloseClipboard(); return FALSE; } --- 3557,3563 ---- if ( (hData = ::GetClipboardData( CF_TEXT )) == NULL ) { if (bWarning) ! TMessageBox( "Unable to get Clipboard data" ); ::CloseClipboard(); return FALSE; } *************** *** 3570,3576 **** if (!p) { if (bWarning) ! AfxMessageBox( "Unable to lock memory for Clipboard data" ); ::CloseClipboard(); return FALSE; } --- 3569,3575 ---- if (!p) { if (bWarning) ! TMessageBox( "Unable to lock memory for Clipboard data" ); ::CloseClipboard(); return FALSE; } *************** *** 3613,3619 **** if (!::OpenClipboard(NULL) ) { ! ::AfxMessageBox( "Cannot open the Clipboard" ); return TRUE; } --- 3612,3618 ---- if (!::OpenClipboard(NULL) ) { ! TMessageBox( "Cannot open the Clipboard" ); return TRUE; } *************** *** 3628,3634 **** if (!hData) { ! ::AfxMessageBox( "Unable to allocate memory for Clipboard data" ); ::CloseClipboard(); return TRUE; } --- 3627,3633 ---- if (!hData) { ! TMessageBox( "Unable to allocate memory for Clipboard data" ); ::CloseClipboard(); return TRUE; } *************** *** 3639,3645 **** if (!p) { ! ::AfxMessageBox( "Unable to lock memory for Clipboard text data" ); ::CloseClipboard(); return TRUE; } --- 3638,3644 ---- if (!p) { ! TMessageBox( "Unable to lock memory for Clipboard text data" ); ::CloseClipboard(); return TRUE; } *************** *** 3654,3660 **** if ( ::SetClipboardData( CF_TEXT, hData ) == NULL ) { ! ::AfxMessageBox( "Unable to set Clipboard text data" ); ::CloseClipboard(); return TRUE; } --- 3653,3659 ---- if ( ::SetClipboardData( CF_TEXT, hData ) == NULL ) { ! TMessageBox( "Unable to set Clipboard text data" ); ::CloseClipboard(); return TRUE; } *************** *** 3671,3677 **** if (!hData) { ! ::AfxMessageBox( "Unable to allocate memory for Clipboard Unicode data" ); ::CloseClipboard(); return TRUE; } --- 3670,3676 ---- if (!hData) { ! TMessageBox( "Unable to allocate memory for Clipboard Unicode data" ); ::CloseClipboard(); return TRUE; } *************** *** 3682,3688 **** if (!p) { ! ::AfxMessageBox( "Unable to lock memory for Clipboard data" ); ::CloseClipboard(); return TRUE; } --- 3681,3687 ---- if (!p) { ! TMessageBox( "Unable to lock memory for Clipboard data" ); ::CloseClipboard(); return TRUE; } *************** *** 3699,3705 **** if ( ::SetClipboardData( CF_UNICODETEXT, hData ) == NULL ) { ! ::AfxMessageBox( "Unable to set Clipboard Unicode data" ); ::CloseClipboard(); return TRUE; } --- 3698,3704 ---- if ( ::SetClipboardData( CF_UNICODETEXT, hData ) == NULL ) { ! TMessageBox( "Unable to set Clipboard Unicode data" ); ::CloseClipboard(); return TRUE; } *************** *** 3791,3803 **** { CString strMsg; ! strMsg.Format ("Unable to connect to \"%s\", code = %i (%s)\n\n" "Error occurred during phase: %s", (const char *) m_mush_name, nErrorCode, GetSocketError (nErrorCode), (const char *) GetConnectionStatus (iOldPhase)); switch (iOldPhase) { case eConnectConnectingToMud: --- 3790,3803 ---- { CString strMsg; ! strMsg = TFormat ("Unable to connect to \"%s\", code = %i (%s)\n\n" "Error occurred during phase: %s", (const char *) m_mush_name, nErrorCode, GetSocketError (nErrorCode), (const char *) GetConnectionStatus (iOldPhase)); + // i18n TODO - fix this up switch (iOldPhase) { case eConnectConnectingToMud: *************** *** 3815,3821 **** if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! ::AfxMessageBox (strMsg); } // end of notification wanted return; --- 3815,3821 ---- if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! UMessageBox (strMsg); } // end of notification wanted return; *************** *** 3922,3935 **** if (App.m_bNotifyIfCannotConnect) { CString strMsg; ! strMsg.Format ("Unable to resolve host name for \"%s\", code = %i (%s)", (const char *) strWhich, WSAGETASYNCERROR (lParam), GetSocketError (WSAGETASYNCERROR (lParam))); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! ::AfxMessageBox (strMsg); } return; --- 3922,3935 ---- if (App.m_bNotifyIfCannotConnect) { CString strMsg; ! strMsg = TFormat ("Unable to resolve host name for \"%s\", code = %i (%s)", (const char *) strWhich, WSAGETASYNCERROR (lParam), GetSocketError (WSAGETASYNCERROR (lParam))); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! UMessageBox (strMsg); } return; *************** *** 3946,3952 **** m_ProxyAddr.sin_addr.s_addr = ((LPIN_ADDR)pHostent->h_addr)->s_addr; else { ! ::AfxMessageBox ("Unexpected phase in HostNameResolved function"); return; } --- 3946,3952 ---- m_ProxyAddr.sin_addr.s_addr = ((LPIN_ADDR)pHostent->h_addr)->s_addr; else { ! TMessageBox ("Unexpected phase in HostNameResolved function"); return; } *************** *** 4361,4367 **** timer_item->strContents, timer_item->bOmitFromOutput, // omit from output timer_item->bOmitFromLog, // omit from log ! CFormat ("Timer: %s", (LPCTSTR) timer_item->strLabel), timer_item->strVariable, strExtraOutput ); --- 4361,4367 ---- timer_item->strContents, timer_item->bOmitFromOutput, // omit from output timer_item->bOmitFromLog, // omit from log ! TFormat ("Timer: %s", (LPCTSTR) timer_item->strLabel), timer_item->strVariable, strExtraOutput ); *************** *** 4383,4389 **** { CString strType = "timer"; ! CString strReason = CFormat ("processing timer \"%s\"", (LPCTSTR) timer_item->strLabel); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) --- 4383,4389 ---- { CString strType = "timer"; ! CString strReason = TFormat ("processing timer \"%s\"", (LPCTSTR) timer_item->strLabel); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) *************** *** 4544,4552 **** m_iConnectPhase == eConnectConnectedToMud && App.m_bConfirmBeforeClosingWorld) { ! str.Format ("This will end your %s session.", (const char *) m_mush_name); ! if (::AfxMessageBox (str, MB_OKCANCEL | MB_ICONINFORMATION) == IDCANCEL) return FALSE; } --- 4544,4552 ---- m_iConnectPhase == eConnectConnectedToMud && App.m_bConfirmBeforeClosingWorld) { ! str = TFormat ("This will end your %s session.", (const char *) m_mush_name); ! if (UMessageBox (str, MB_OKCANCEL | MB_ICONINFORMATION) == IDCANCEL) return FALSE; } *************** *** 4574,4580 **** name = m_strPathName; } ! int i = ::AfxMessageBox (CFormat ("World internal variables (only) have changed.\n\n" "Save changes to %s?", (LPCTSTR) name), MB_YESNOCANCEL | MB_ICONQUESTION); --- 4574,4580 ---- name = m_strPathName; } ! int i = UMessageBox (TFormat ("World internal variables (only) have changed.\n\n" "Save changes to %s?", (LPCTSTR) name), MB_YESNOCANCEL | MB_ICONQUESTION); *************** *** 4699,4760 **** switch (nError) { ! case WSAEACCES: return "Permission denied"; break; ! case WSAEADDRINUSE: return "Address already in use"; break; ! case WSAEADDRNOTAVAIL: return "Cannot assign requested address"; break; ! case WSAEAFNOSUPPORT : return "Address family not supported by protocol family"; break; ! case WSAEALREADY : return "Operation already in progress. "; break; ! case WSAECONNABORTED: return "Software caused connection abort"; break; ! case WSAECONNREFUSED: return "Connection refused"; break; ! case WSAECONNRESET: return "Connection reset by peer"; break; ! case WSAEDESTADDRREQ: return "Destination address required"; break; ! case WSAEFAULT: return "Bad address"; break; ! case WSAEHOSTDOWN: return "Host is down"; break; ! case WSAEHOSTUNREACH: return "No route to host"; break; ! case WSAEINPROGRESS: return "Operation now in progress"; break; ! case WSAEINTR: return "Interrupted function call"; break; ! case WSAEINVAL: return "Invalid argument"; break; ! case WSAEISCONN: return "Socket is already connected"; break; ! case WSAEMFILE: return "Too many open files"; break; ! case WSAEMSGSIZE: return "Message too long"; break; ! case WSAENETDOWN: return "Network is down"; break; ! case WSAENETRESET: return "Network dropped connection on reset"; break; ! case WSAENETUNREACH: return "Network is unreachable"; break; ! case WSAENOBUFS: return "No buffer space available"; break; ! case WSAENOPROTOOPT : return "Bad protocol option"; break; ! case WSAENOTCONN: return "Socket is not connected"; break; ! case WSAENOTSOCK: return "Socket operation on non-socket"; break; ! case WSAEOPNOTSUPP: return "Operation not supported"; break; ! case WSAEPFNOSUPPORT: return "Protocol family not supported"; break; ! case WSAEPROCLIM: return "Too many processes"; break; ! case WSAEPROTONOSUPPORT: return "Protocol not supported"; break; ! case WSAEPROTOTYPE: return "Protocol wrong type for socket"; break; ! case WSAESHUTDOWN: return "Cannot send after socket shutdown"; break; ! case WSAESOCKTNOSUPPORT: return "Socket type not supported"; break; ! case WSAETIMEDOUT: return "Connection timed out"; break; ! case WSAEWOULDBLOCK: return "Resource temporarily unavailable"; break; ! case WSAHOST_NOT_FOUND: return "Host not found"; break; ! case WSA_INVALID_HANDLE: return "Specified event object handle is invalid"; break; ! case WSA_INVALID_PARAMETER: return "One or more parameters are invalid"; break; ! case WSAEINVALIDPROCTABLE: return "Invalid procedure table from service provider"; break; ! case WSAEINVALIDPROVIDER: return "Invalid service provider version number"; break; ! case WSA_IO_PENDING: return "Overlapped operations will complete later"; break; ! case WSA_IO_INCOMPLETE: return "Overlapped I/O event object not in signaled state"; break; ! case WSA_NOT_ENOUGH_MEMORY: return "Insufficient memory available"; break; ! case WSANOTINITIALISED: return "Successful WSAStartup not yet performed"; break; ! case WSANO_DATA: return "Valid name, no data record of requested type"; break; ! case WSANO_RECOVERY: return "This is a non-recoverable error"; break; ! case WSAEPROVIDERFAILEDINIT: return "Unable to initialize a service provider"; break; ! case WSASYSCALLFAILURE: return "System call failure"; break; ! case WSASYSNOTREADY: return "Network subsystem is unavailable"; break; ! case WSATRY_AGAIN: return "Non-authoritative host not found"; break; ! case WSAVERNOTSUPPORTED: return "WINSOCK.DLL version out of range"; break; ! case WSAEDISCON: return "Graceful shutdown in progress"; break; ! case WSA_OPERATION_ABORTED: return "Overlapped operation aborted"; break; } // end of switch ! return "Unknown error code"; } // end of CMUSHclientDoc::GetSocketError --- 4699,4760 ---- switch (nError) { ! case WSAEACCES: return Translate ("Permission denied"); break; ! case WSAEADDRINUSE: return Translate ("Address already in use"); break; ! case WSAEADDRNOTAVAIL: return Translate ("Cannot assign requested address"); break; ! case WSAEAFNOSUPPORT : return Translate ("Address family not supported by protocol family"); break; ! case WSAEALREADY : return Translate ("Operation already in progress. "); break; ! case WSAECONNABORTED: return Translate ("Software caused connection abort"); break; ! case WSAECONNREFUSED: return Translate ("Connection refused"); break; ! case WSAECONNRESET: return Translate ("Connection reset by peer"); break; ! case WSAEDESTADDRREQ: return Translate ("Destination address required"); break; ! case WSAEFAULT: return Translate ("Bad address"); break; ! case WSAEHOSTDOWN: return Translate ("Host is down"); break; ! case WSAEHOSTUNREACH: return Translate ("No route to host"); break; ! case WSAEINPROGRESS: return Translate ("Operation now in progress"); break; ! case WSAEINTR: return Translate ("Interrupted function call"); break; ! case WSAEINVAL: return Translate ("Invalid argument"); break; ! case WSAEISCONN: return Translate ("Socket is already connected"); break; ! case WSAEMFILE: return Translate ("Too many open files"); break; ! case WSAEMSGSIZE: return Translate ("Message too long"); break; ! case WSAENETDOWN: return Translate ("Network is down"); break; ! case WSAENETRESET: return Translate ("Network dropped connection on reset"); break; ! case WSAENETUNREACH: return Translate ("Network is unreachable"); break; ! case WSAENOBUFS: return Translate ("No buffer space available"); break; ! case WSAENOPROTOOPT : return Translate ("Bad protocol option"); break; ! case WSAENOTCONN: return Translate ("Socket is not connected"); break; ! case WSAENOTSOCK: return Translate ("Socket operation on non-socket"); break; ! case WSAEOPNOTSUPP: return Translate ("Operation not supported"); break; ! case WSAEPFNOSUPPORT: return Translate ("Protocol family not supported"); break; ! case WSAEPROCLIM: return Translate ("Too many processes"); break; ! case WSAEPROTONOSUPPORT: return Translate ("Protocol not supported"); break; ! case WSAEPROTOTYPE: return Translate ("Protocol wrong type for socket"); break; ! case WSAESHUTDOWN: return Translate ("Cannot send after socket shutdown"); break; ! case WSAESOCKTNOSUPPORT: return Translate ("Socket type not supported"); break; ! case WSAETIMEDOUT: return Translate ("Connection timed out"); break; ! case WSAEWOULDBLOCK: return Translate ("Resource temporarily unavailable"); break; ! case WSAHOST_NOT_FOUND: return Translate ("Host not found"); break; ! case WSA_INVALID_HANDLE: return Translate ("Specified event object handle is invalid"); break; ! case WSA_INVALID_PARAMETER: return Translate ("One or more parameters are invalid"); break; ! case WSAEINVALIDPROCTABLE: return Translate ("Invalid procedure table from service provider"); break; ! case WSAEINVALIDPROVIDER: return Translate ("Invalid service provider version number"); break; ! case WSA_IO_PENDING: return Translate ("Overlapped operations will complete later"); break; ! case WSA_IO_INCOMPLETE: return Translate ("Overlapped I/O event object not in signaled state"); break; ! case WSA_NOT_ENOUGH_MEMORY: return Translate ("Insufficient memory available"); break; ! case WSANOTINITIALISED: return Translate ("Successful WSAStartup not yet performed"); break; ! case WSANO_DATA: return Translate ("Valid name, no data record of requested type"); break; ! case WSANO_RECOVERY: return Translate ("This is a non-recoverable error"); break; ! case WSAEPROVIDERFAILEDINIT: return Translate ("Unable to initialize a service provider"); break; ! case WSASYSCALLFAILURE: return Translate ("System call failure"); break; ! case WSASYSNOTREADY: return Translate ("Network subsystem is unavailable"); break; ! case WSATRY_AGAIN: return Translate ("Non-authoritative host not found"); break; ! case WSAVERNOTSUPPORTED: return Translate ("WINSOCK.DLL version out of range"); break; ! case WSAEDISCON: return Translate ("Graceful shutdown in progress"); break; ! case WSA_OPERATION_ABORTED: return Translate ("Overlapped operation aborted"); break; } // end of switch ! return Translate ("Unknown error code"); } // end of CMUSHclientDoc::GetSocketError *************** *** 4925,4932 **** { // check they really want to ! if (::AfxMessageBox ! (CFormat ("Are you SURE you want to clear all %i lines in the output window?", m_LineList.GetCount ()), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) return; --- 4925,4932 ---- { // check they really want to ! if (UMessageBox ! (TFormat ("Are you SURE you want to clear all %i lines in the output window?", m_LineList.GetCount ()), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) return; *************** *** 5139,5148 **** CString strFindType = "text"; if (bRegexp) strFindType = "regular expression"; ! strMsg.Format ("The %s \"%s\" was not found", (LPCTSTR) strFindType, (LPCTSTR) strSearchString); ! ::AfxMessageBox (strMsg, MB_ICONINFORMATION); } return strMessage; --- 5139,5148 ---- CString strFindType = "text"; if (bRegexp) strFindType = "regular expression"; ! strMsg = TFormat ("The %s \"%s\" was not found", (LPCTSTR) strFindType, (LPCTSTR) strSearchString); ! UMessageBox (strMsg, MB_ICONINFORMATION); } return strMessage; *************** *** 5200,5206 **** if (!strMessage.IsEmpty ()) CreateTextWindow (strMessage, ! CFormat ("Recall: %s", (LPCTSTR) m_RecallFindInfo.m_strFindStringList.GetHead ()), this, m_iUniqueDocumentNumber, --- 5200,5206 ---- if (!strMessage.IsEmpty ()) CreateTextWindow (strMessage, ! TFormat ("Recall: %s", (LPCTSTR) m_RecallFindInfo.m_strFindStringList.GetHead ()), this, m_iUniqueDocumentNumber, *************** *** 5370,5388 **** return true; CString str; - str = "The connection to "; - str += m_mush_name; if (m_iConnectPhase != eConnectNotConnected) { ! str += " is currently being established."; ! ::AfxMessageBox (str, MB_ICONINFORMATION); } else { ! str += " is not open. Attempt to reconnect?"; ! if (::AfxMessageBox (str, MB_YESNO | MB_ICONQUESTION) == IDYES) { ConnectSocket (); Frame.FixUpTitleBar (); --- 5370,5388 ---- return true; CString str; if (m_iConnectPhase != eConnectNotConnected) { ! str = TFormat ("The connection to %s is currently being established.", ! (LPCTSTR) m_mush_name); ! UMessageBox (str, MB_ICONINFORMATION); } else { ! str = TFormat ("The connection to %s is not open. Attempt to reconnect?", ! (LPCTSTR) m_mush_name); ! if (UMessageBox (str, MB_YESNO | MB_ICONQUESTION) == IDYES) { ConnectSocket (); Frame.FixUpTitleBar (); *************** *** 5680,5686 **** strTitle += m_mush_name; AppendToTheNotepad (strTitle, ! CFormat ("%s%s packet: %I64d (%i bytes)%s%s", ENDLINE, sCaption, iNumber, --- 5680,5686 ---- strTitle += m_mush_name; AppendToTheNotepad (strTitle, ! TFormat ("%s%s packet: %I64d (%i bytes)%s%s", ENDLINE, sCaption, iNumber, *************** *** 5826,5832 **** } // end of having an existing notepad document else CreateTextWindow ("", // contents ! CFormat ("Notepad: %s", (LPCTSTR) m_mush_name), // title this, // document m_iUniqueDocumentNumber, // document number m_input_font_name, --- 5826,5832 ---- } // end of having an existing notepad document else CreateTextWindow ("", // contents ! TFormat ("Notepad: %s", (LPCTSTR) m_mush_name), // title this, // document m_iUniqueDocumentNumber, // document number m_input_font_name, *************** *** 6066,6072 **** { if (strLine [0] == '*') // error in speedwalk string? { ! ::AfxMessageBox (strLine.Mid (1)); } else SendMsg (strLine, bEchoIt, true, LoggingInput ()); // queue it --- 6066,6072 ---- { if (strLine [0] == '*') // error in speedwalk string? { ! UMessageBox (strLine.Mid (1)); // already translated in DoEvaluateSpeedwalk } else SendMsg (strLine, bEchoIt, true, LoggingInput ()); // queue it *************** *** 6509,6515 **** { if (strEvaluatedSpeedwalk [0] == '*') // error in speedwalk string? { ! ::AfxMessageBox (strEvaluatedSpeedwalk.Mid (1)); return; } // end of error message SendMsg (strEvaluatedSpeedwalk, --- 6509,6515 ---- { if (strEvaluatedSpeedwalk [0] == '*') // error in speedwalk string? { ! UMessageBox (strEvaluatedSpeedwalk.Mid (1)); // already translated return; } // end of error message SendMsg (strEvaluatedSpeedwalk, *************** *** 6618,6624 **** if (!m_pGetHostStruct) { ! ::AfxMessageBox ("Unable to allocate memory for host name lookup"); return true; } --- 6618,6624 ---- if (!m_pGetHostStruct) { ! TMessageBox ("Unable to allocate memory for host name lookup"); return true; } *************** *** 6633,6641 **** { CString strMsg; ! strMsg.Format ("Unable to initiate host name lookup for \"%s\"", sName); ! ::AfxMessageBox (strMsg); delete [] m_pGetHostStruct; m_pGetHostStruct = NULL; m_iConnectPhase = eConnectNotConnected; --- 6633,6641 ---- { CString strMsg; ! strMsg = TFormat ("Unable to initiate host name lookup for \"%s\"", sName); ! UMessageBox (strMsg); delete [] m_pGetHostStruct; m_pGetHostStruct = NULL; m_iConnectPhase = eConnectNotConnected; *************** *** 6692,6704 **** { CString strMsg; ! strMsg.Format ("Unable to connect to \"%s\", code = %i (%s)\n\n" "Error occurred during phase: %s", (const char *) m_mush_name, iStatus, GetSocketError (iStatus), (const char *) GetConnectionStatus (m_iConnectPhase)); switch (m_iConnectPhase) { case eConnectConnectingToMud: --- 6692,6705 ---- { CString strMsg; ! strMsg = TFormat ("Unable to connect to \"%s\", code = %i (%s)\n\n" "Error occurred during phase: %s", (const char *) m_mush_name, iStatus, GetSocketError (iStatus), (const char *) GetConnectionStatus (m_iConnectPhase)); + // i18n TODO - fix this: switch (m_iConnectPhase) { case eConnectConnectingToMud: *************** *** 6716,6722 **** if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! ::AfxMessageBox (strMsg); } // end of notification wanted TRACE ("CCMUSHclientDoc::InitiateConnection - cannot connect\n"); --- 6717,6723 ---- if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! UMessageBox (strMsg); } // end of notification wanted TRACE ("CCMUSHclientDoc::InitiateConnection - cannot connect\n"); *************** *** 6763,6769 **** { CString strConnected; ! strConnected = m_tConnectTime.Format ("--- Connected on %A, %B %d, %Y, %#I:%M %p ---"); Note (strConnected); --- 6764,6770 ---- { CString strConnected; ! strConnected = m_tConnectTime.Format (TranslateTime ("--- Connected on %A, %B %d, %Y, %#I:%M %p ---")); Note (strConnected); *************** *** 6827,6833 **** CString strName = FormatTime (theTime, m_strAutoLogFileName, m_bLogHTML); if (OpenLog (strName, true) == eCouldNotOpenFile) ! ::AfxMessageBox (CFormat ("Could not open log file \"%s\"", (LPCTSTR) strName), MB_ICONINFORMATION); else { --- 6828,6834 ---- CString strName = FormatTime (theTime, m_strAutoLogFileName, m_bLogHTML); if (OpenLog (strName, true) == eCouldNotOpenFile) ! UMessageBox (TFormat ("Could not open log file \"%s\"", (LPCTSTR) strName), MB_ICONINFORMATION); else { *************** *** 6856,6862 **** CString strTime; ! strTime = theTime.Format ("%A, %B %d, %Y, %#I:%M %p"); CString strPreamble = m_mush_name; strPreamble += " - "; --- 6857,6863 ---- CString strTime; ! strTime = theTime.Format (TranslateTime ("%A, %B %d, %Y, %#I:%M %p")); CString strPreamble = m_mush_name; strPreamble += " - "; *************** *** 7046,7058 **** OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = CFormat ("Proxy server cannot authenticate, reason: %s", (LPCTSTR) p); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! ::AfxMessageBox (strMsg, MB_ICONEXCLAMATION); } return -1; // error --- 7047,7059 ---- OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = TFormat ("Proxy server cannot authenticate, reason: %s", (LPCTSTR) p); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! UMessageBox (strMsg, MB_ICONEXCLAMATION); } return -1; // error *************** *** 7070,7076 **** if (App.m_bErrorNotificationToOutputWindow) Note ("Proxy server refused authentication"); else ! ::AfxMessageBox ("Proxy server refused authentication", MB_ICONEXCLAMATION); return -1; --- 7071,7077 ---- if (App.m_bErrorNotificationToOutputWindow) Note ("Proxy server refused authentication"); else ! TMessageBox ("Proxy server refused authentication", MB_ICONEXCLAMATION); return -1; *************** *** 7112,7124 **** OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = CFormat ("Proxy server refused connection, reason: %s", (LPCTSTR) p); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! ::AfxMessageBox (strMsg, MB_ICONEXCLAMATION); } return -1; --- 7113,7125 ---- OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = TFormat ("Proxy server refused connection, reason: %s", (LPCTSTR) p); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! UMessageBox (strMsg, MB_ICONEXCLAMATION); } return -1; *************** *** 7150,7161 **** OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = CFormat ("Proxy server refused connection, reason: %s", (LPCTSTR) p); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! ::AfxMessageBox (strMsg, MB_ICONEXCLAMATION); } return -1; --- 7151,7162 ---- OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = TFormat ("Proxy server refused connection, reason: %s", (LPCTSTR) p); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! UMessageBox (strMsg, MB_ICONEXCLAMATION); } return -1; *************** *** 7180,7192 **** OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = CFormat ("Unexpected proxy server response %i, expected %i", (int) cReceived, (int) cExpected); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! ::AfxMessageBox (strMsg, MB_ICONEXCLAMATION); } return true; // not OK } --- 7181,7193 ---- OnConnectionDisconnect (); // close the world if (App.m_bNotifyIfCannotConnect) { ! CString strMsg = TFormat ("Unexpected proxy server response %i, expected %i", (int) cReceived, (int) cExpected); if (App.m_bErrorNotificationToOutputWindow) Note (strMsg); else ! UMessageBox (strMsg, MB_ICONEXCLAMATION); } return true; // not OK } *************** *** 7227,7233 **** m_strProxyPassword.GetLength () > 255) { OnConnectionDisconnect (); // close the world ! ::AfxMessageBox ( "Proxy server username or password lengths cannot be > 255 characters", MB_ICONEXCLAMATION); return true; --- 7228,7234 ---- m_strProxyPassword.GetLength () > 255) { OnConnectionDisconnect (); // close the world ! TMessageBox ( "Proxy server username or password lengths cannot be > 255 characters", MB_ICONEXCLAMATION); return true; Index: doc.h =================================================================== RCS file: /cvs/mushclient/doc.h,v retrieving revision 1.216 retrieving revision 1.217 diff -c -r1.216 -r1.217 *** doc.h 28 May 2007 05:50:12 -0000 1.216 --- doc.h 10 Jun 2007 22:20:27 -0000 1.217 *************** *** 21,28 **** // New versions - things to change ! #define THISVERSION 408 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.08"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT --- 21,28 ---- // New versions - things to change ! #define THISVERSION 409 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.09"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT Index: doc_construct.cpp =================================================================== RCS file: /cvs/mushclient/doc_construct.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** doc_construct.cpp 22 Apr 2007 00:42:53 -0000 1.21 --- doc_construct.cpp 11 Jun 2007 21:40:12 -0000 1.22 *************** *** 561,567 **** if (App.m_TypeOfNewDocument == App.eNormalNewDocument) // only ask on normal new world { ! int i = ::AfxMessageBox ("Preload world defaults from an existing world?", MB_YESNOCANCEL | MB_ICONQUESTION); if (i == IDCANCEL) --- 561,567 ---- if (App.m_TypeOfNewDocument == App.eNormalNewDocument) // only ask on normal new world { ! int i = ::TMessageBox ("Preload world defaults from an existing world?", MB_YESNOCANCEL | MB_ICONQUESTION); if (i == IDCANCEL) *************** *** 603,609 **** } catch(CException* e) { ! ::AfxMessageBox ("Unexpected file format - invalid world file", MB_ICONEXCLAMATION); e->Delete(); ar.Close(); continue; --- 603,609 ---- } catch(CException* e) { ! ::TMessageBox ("Unexpected file format - invalid world file", MB_ICONEXCLAMATION); e->Delete(); ar.Close(); continue; *************** *** 614,620 **** } catch(CException* e) { ! ::AfxMessageBox ("Unable to open world file", MB_ICONEXCLAMATION); e->Delete(); continue; } --- 614,620 ---- } catch(CException* e) { ! ::TMessageBox ("Unable to open world file", MB_ICONEXCLAMATION); e->Delete(); continue; } *************** *** 750,762 **** if(m_mush_name.IsEmpty ()) { ! ::AfxMessageBox("Your world name cannot be blank.", MB_ICONEXCLAMATION); return FALSE; } if(m_server.IsEmpty ()) { ! ::AfxMessageBox("The world TCP/IP address cannot be blank.", MB_ICONEXCLAMATION); return FALSE; } --- 750,762 ---- if(m_mush_name.IsEmpty ()) { ! ::TMessageBox("Your world name cannot be blank.", MB_ICONEXCLAMATION); return FALSE; } if(m_server.IsEmpty ()) { ! ::TMessageBox("The world TCP/IP address cannot be blank.", MB_ICONEXCLAMATION); return FALSE; } Index: documentation.cpp =================================================================== RCS file: /cvs/mushclient/documentation.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** documentation.cpp 23 Jun 2003 22:19:31 -0000 1.1 --- documentation.cpp 12 Jun 2007 04:01:56 -0000 1.2 *************** *** 85,91 **** if (strCommand.IsEmpty ()) { if (mInfo.wID && !strOwner.IsEmpty ()) // warn if could not find non-zero ID ! TRACE (CFormat ("Could not find menu item %s, ID %i\n", (LPCTSTR) strName, mInfo.wID)); } else --- 85,91 ---- if (strCommand.IsEmpty ()) { if (mInfo.wID && !strOwner.IsEmpty ()) // warn if could not find non-zero ID ! TRACE (TFormat ("Could not find menu item %s, ID %i\n", (LPCTSTR) strName, mInfo.wID)); } else Index: editstr.cpp =================================================================== RCS file: /cvs/mushclient/editstr.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** editstr.cpp 12 Feb 2004 04:06:26 -0000 1.5 --- editstr.cpp 11 Jun 2007 21:40:12 -0000 1.6 *************** *** 40,46 **** if(m_match_on.IsEmpty ()) { ! ::AfxMessageBox("The string to match on cannot be blank."); DDX_Text(pDX, IDC_MATCH_ON, m_match_on); pDX->Fail(); return; --- 40,46 ---- if(m_match_on.IsEmpty ()) { ! ::TMessageBox("The string to match on cannot be blank."); DDX_Text(pDX, IDC_MATCH_ON, m_match_on); pDX->Fail(); return; Index: evaluate.cpp =================================================================== RCS file: /cvs/mushclient/evaluate.cpp,v retrieving revision 1.75 retrieving revision 1.77 diff -c -r1.75 -r1.77 *** evaluate.cpp 26 Apr 2007 00:28:56 -0000 1.75 --- evaluate.cpp 12 Jun 2007 04:01:56 -0000 1.77 *************** *** 47,53 **** { if (strEvaluatedSpeedwalk [0] == '*') // error in speedwalk string? { ! ::AfxMessageBox (strEvaluatedSpeedwalk.Mid (1)); return true; } // let them know if they are foolishly trying to send to a closed connection --- 47,53 ---- { if (strEvaluatedSpeedwalk [0] == '*') // error in speedwalk string? { ! ::UMessageBox (strEvaluatedSpeedwalk.Mid (1)); return true; } // let them know if they are foolishly trying to send to a closed connection *************** *** 544,550 **** if (set_type == TRIGGER && !m_TriggerMap.IsEmpty ()) { ! if (::AfxMessageBox ("Replace existing triggers?\n" "If you reply \"No\", then triggers from the file" " will be added to existing triggers", MB_YESNO | MB_ICONQUESTION) == IDNO) --- 544,550 ---- if (set_type == TRIGGER && !m_TriggerMap.IsEmpty ()) { ! if (::TMessageBox ("Replace existing triggers?\n" "If you reply \"No\", then triggers from the file" " will be added to existing triggers", MB_YESNO | MB_ICONQUESTION) == IDNO) *************** *** 553,559 **** else if (set_type == ALIAS && !m_AliasMap.IsEmpty ()) { ! if (::AfxMessageBox ("Replace existing aliases?\n" "If you reply \"No\", then aliases from the file" " will be added to existing aliases", MB_YESNO | MB_ICONQUESTION) == IDNO) --- 553,559 ---- else if (set_type == ALIAS && !m_AliasMap.IsEmpty ()) { ! if (::TMessageBox ("Replace existing aliases?\n" "If you reply \"No\", then aliases from the file" " will be added to existing aliases", MB_YESNO | MB_ICONQUESTION) == IDNO) *************** *** 562,568 **** else if (set_type == TIMER && !m_TimerMap.IsEmpty ()) { ! if (::AfxMessageBox ("Replace existing timers?\n" "If you reply \"No\", then timers from the file" " will be added to existing timers", MB_YESNO | MB_ICONQUESTION) == IDNO) --- 562,568 ---- else if (set_type == TIMER && !m_TimerMap.IsEmpty ()) { ! if (::TMessageBox ("Replace existing timers?\n" "If you reply \"No\", then timers from the file" " will be added to existing timers", MB_YESNO | MB_ICONQUESTION) == IDNO) *************** *** 617,623 **** } // end of XML load else { ! ::AfxMessageBox ("File does not have a valid MUSHclient XML signature.", MB_ICONSTOP); AfxThrowArchiveException (CArchiveException::badSchema); } // end of not XML --- 617,623 ---- } // end of XML load else { ! ::TMessageBox ("File does not have a valid MUSHclient XML signature.", MB_ICONSTOP); AfxThrowArchiveException (CArchiveException::badSchema); } // end of not XML *************** *** 629,648 **** catch (CFileException * e) { ! ::AfxMessageBox (CFormat ("Unable to open or read %s", (LPCTSTR) strFileName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::AfxMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception catch (CArchiveException * e) { ! ::AfxMessageBox (CFormat ("The file %s is not in the correct format", (LPCTSTR) strFileName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching an archive exception --- 629,648 ---- catch (CFileException * e) { ! ::UMessageBox (TFormat ("Unable to open or read %s", (LPCTSTR) strFileName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::TMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception catch (CArchiveException * e) { ! ::UMessageBox (TFormat ("The file %s is not in the correct format", (LPCTSTR) strFileName), MB_ICONEXCLAMATION); e->Delete (); } // end of catching an archive exception *************** *** 727,745 **** catch (CFileException * e) { ! ::AfxMessageBox ("Unable to create the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::AfxMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception catch (CArchiveException * e) { ! ::AfxMessageBox ("There was a problem in the data format", MB_ICONEXCLAMATION); e->Delete (); } // end of catching an archive exception --- 727,745 ---- catch (CFileException * e) { ! ::TMessageBox ("Unable to create the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::TMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception catch (CArchiveException * e) { ! ::TMessageBox ("There was a problem in the data format", MB_ICONEXCLAMATION); e->Delete (); } // end of catching an archive exception *************** *** 891,897 **** strSendText, alias_item->bOmitFromOutput, alias_item->bOmitFromLog, ! CFormat ("Alias: %s", (LPCTSTR) alias_item->strLabel), alias_item->strVariable, strExtraOutput); alias_item->bExecutingScript = false; // can be deleted now --- 891,897 ---- strSendText, alias_item->bOmitFromOutput, alias_item->bOmitFromLog, ! TFormat ("Alias: %s", (LPCTSTR) alias_item->strLabel), alias_item->strVariable, strExtraOutput); alias_item->bExecutingScript = false; // can be deleted now *************** *** 922,928 **** { CString strType = "alias"; ! CString strReason = CFormat ("processing alias \"%s\"", (LPCTSTR) alias_item->strLabel); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) --- 922,928 ---- { CString strType = "alias"; ! CString strReason = TFormat ("processing alias \"%s\"", (LPCTSTR) alias_item->strLabel); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) Index: genprint.cpp =================================================================== RCS file: /cvs/mushclient/genprint.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** genprint.cpp 27 Nov 2004 09:11:31 -0000 1.5 --- genprint.cpp 11 Jun 2007 21:40:12 -0000 1.6 *************** *** 203,209 **** pcb.font [i] = CreateFontIndirect (&lf); if (!pcb.font [i]) { ! ::AfxMessageBox ("Unable to create a font for printing"); return TRUE; } } --- 203,209 ---- pcb.font [i] = CreateFontIndirect (&lf); if (!pcb.font [i]) { ! ::TMessageBox ("Unable to create a font for printing"); return TRUE; } } *************** *** 279,285 **** if (err <= 0) { ! ::AfxMessageBox ("Error occurred starting a new page"); pcb.ok = FALSE; return TRUE; } --- 279,285 ---- if (err <= 0) { ! ::TMessageBox ("Error occurred starting a new page"); pcb.ok = FALSE; return TRUE; } *************** *** 379,385 **** if (err <= 0) { ! ::AfxMessageBox ("Error occurred starting a new page"); pcb.ok = FALSE; return TRUE; } --- 379,385 ---- if (err <= 0) { ! ::TMessageBox ("Error occurred starting a new page"); pcb.ok = FALSE; return TRUE; } *************** *** 404,410 **** err = EndDoc (pcb.hDC); if (err <= 0) ! ::AfxMessageBox ("Error occurred closing printer"); } // end of having started the document --- 404,410 ---- err = EndDoc (pcb.hDC); if (err <= 0) ! ::TMessageBox ("Error occurred closing printer"); } // end of having started the document Index: genpropertypage.cpp =================================================================== RCS file: /cvs/mushclient/genpropertypage.cpp,v retrieving revision 1.23 retrieving revision 1.25 diff -c -r1.23 -r1.25 *** genpropertypage.cpp 26 Apr 2007 02:55:45 -0000 1.23 --- genpropertypage.cpp 12 Jun 2007 04:01:56 -0000 1.25 *************** *** 111,121 **** { CString strMsg; ! strMsg.Format ("The %s named \"%s\" is already in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) GetObjectName (&dlg), (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); return; } --- 111,121 ---- { CString strMsg; ! strMsg = TFormat ("The %s named \"%s\" is already in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) GetObjectName (&dlg), (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); return; } *************** *** 155,161 **** GetLabel (pItem), strMessage)); if (!strMessage.IsEmpty ()) ! ::AfxMessageBox (strMessage, MB_ICONINFORMATION); } } // end of CGenPropertyPage::OnAddItem --- 155,161 ---- GetLabel (pItem), strMessage)); if (!strMessage.IsEmpty ()) ! ::UMessageBox (strMessage, MB_ICONINFORMATION); } } // end of CGenPropertyPage::OnAddItem *************** *** 187,202 **** // in the case of one-shot timers, unnamed items might be removed from the list if (pstrObjectName->Left (1) == "*") ! strMsg.Format ("The %s you selected is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) m_strObjectType); else ! strMsg.Format ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; --- 187,202 ---- // in the case of one-shot timers, unnamed items might be removed from the list if (pstrObjectName->Left (1) == "*") ! strMsg = TFormat ("The %s you selected is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) m_strObjectType); else ! strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; *************** *** 221,237 **** // in the case of one-shot timers, unnamed items might be removed from the list if (pstrObjectName->Left (1) == "*") ! strMsg.Format ("The %s you selected is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) m_strObjectType); else ! strMsg.Format ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); delete pstrObjectName; // and get rid of its name string ! ::AfxMessageBox (strMsg); continue; } --- 221,237 ---- // in the case of one-shot timers, unnamed items might be removed from the list if (pstrObjectName->Left (1) == "*") ! strMsg = TFormat ("The %s you selected is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) m_strObjectType); else ! strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); delete pstrObjectName; // and get rid of its name string ! ::UMessageBox (strMsg); continue; } *************** *** 240,249 **** if (CheckIfIncluded (pItem)) { ! strMsg.Format ("The %s named \"%s\" has been included from an include file. You cannot modify it here.", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName); ! ::AfxMessageBox (strMsg); return; // can't modify included items } --- 240,249 ---- if (CheckIfIncluded (pItem)) { ! strMsg = TFormat ("The %s named \"%s\" has been included from an include file. You cannot modify it here.", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName); ! ::UMessageBox (strMsg); return; // can't modify included items } *************** *** 251,260 **** // (it might have been modified while we looked at the list box) if (GetModificationNumber (pItem) != m_nUpdateNumber) { ! strMsg.Format ("The %s named \"%s\" has already been modified by a script subroutine", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName); ! ::AfxMessageBox (strMsg); continue; } --- 251,260 ---- // (it might have been modified while we looked at the list box) if (GetModificationNumber (pItem) != m_nUpdateNumber) { ! strMsg = TFormat ("The %s named \"%s\" has already been modified by a script subroutine", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName); ! ::UMessageBox (strMsg); continue; } *************** *** 273,283 **** CObject * new_pItem; if (m_ObjectMap->Lookup (strObjectName, new_pItem)) { ! strMsg.Format ("The %s named \"%s\" already exists in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) strObjectName, (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); continue; } --- 273,283 ---- CObject * new_pItem; if (m_ObjectMap->Lookup (strObjectName, new_pItem)) { ! strMsg = TFormat ("The %s named \"%s\" already exists in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) strObjectName, (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); continue; } *************** *** 325,331 **** GetLabel (pItem), strMessage)); if (!strMessage.IsEmpty ()) ! ::AfxMessageBox (strMessage, MB_ICONINFORMATION); } } // end of dealing with each selected item --- 325,331 ---- GetLabel (pItem), strMessage)); if (!strMessage.IsEmpty ()) ! ::UMessageBox (strMessage, MB_ICONINFORMATION); } } // end of dealing with each selected item *************** *** 374,380 **** else sName += "s"; ! if (::AfxMessageBox (CFormat ("Delete %i %s - are you sure?", iCount, sName), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES ) return; --- 374,380 ---- else sName += "s"; ! if (::UMessageBox (TFormat ("Delete %i %s - are you sure?", iCount, sName), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES ) return; *************** *** 431,451 **** if (iIncluded) { CString strMsg; ! strMsg.Format ("%i item%s %s included from an include file. You cannot delete %s here.", PLURAL (iIncluded), iIncluded == 1 ? "was" : "were", iIncluded == 1 ? "it" : "them"); ! ::AfxMessageBox (strMsg); } if (iExecuting) { CString strMsg; ! strMsg.Format ("%i item%s %s currently executing a script. You cannot delete %s now.", PLURAL (iExecuting), iExecuting == 1 ? "is" : "are", iExecuting == 1 ? "it" : "them"); ! ::AfxMessageBox (strMsg); } } // end of CGenPropertyPage::OnDeleteItem --- 431,451 ---- if (iIncluded) { CString strMsg; ! strMsg = TFormat ("%i item%s %s included from an include file. You cannot delete %s here.", PLURAL (iIncluded), iIncluded == 1 ? "was" : "were", iIncluded == 1 ? "it" : "them"); ! ::UMessageBox (strMsg); } if (iExecuting) { CString strMsg; ! strMsg = TFormat ("%i item%s %s currently executing a script. You cannot delete %s now.", PLURAL (iExecuting), iExecuting == 1 ? "is" : "are", iExecuting == 1 ? "it" : "them"); ! ::UMessageBox (strMsg); } } // end of CGenPropertyPage::OnDeleteItem *************** *** 658,667 **** m_ctlList->SetItemState (0, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED); ! CString strSummary = CFormat ("%i item%s.", PLURAL (iCount)); if (iNotShown) ! strSummary += CFormat (" (%i item%s hidden by filter)", PLURAL (iNotShown)); m_ctlSummary->SetWindowText (strSummary); delete m_ScriptEngine; --- 658,667 ---- m_ctlList->SetItemState (0, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED); ! CString strSummary = TFormat ("%i item%s.", PLURAL (iCount)); if (iNotShown) ! strSummary += TFormat (" (%i item%s hidden by filter)", PLURAL (iNotShown)); m_ctlSummary->SetWindowText (strSummary); delete m_ScriptEngine; *************** *** 876,891 **** // in the case of one-shot timers, unnamed items might be removed from the list if (pstrObjectName->Left (1) == "*") ! strMsg.Format ("The %s you selected is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) m_strObjectType); else ! strMsg.Format ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; --- 876,891 ---- // in the case of one-shot timers, unnamed items might be removed from the list if (pstrObjectName->Left (1) == "*") ! strMsg = TFormat ("The %s you selected is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) m_strObjectType); else ! strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; *************** *** 953,959 **** } catch (CArchiveException* ) { ! ::AfxMessageBox ("There was a problem parsing the XML on the clipboard. " "See the error window for more details"); } --- 953,959 ---- } catch (CArchiveException* ) { ! ::TMessageBox ("There was a problem parsing the XML on the clipboard. " "See the error window for more details"); } Index: globaloptions.cpp =================================================================== RCS file: /cvs/mushclient/globaloptions.cpp,v retrieving revision 1.23 retrieving revision 1.26 diff -c -r1.23 -r1.26 *** globaloptions.cpp 1 Apr 2007 04:44:31 -0000 1.23 --- globaloptions.cpp 12 Jun 2007 04:01:56 -0000 1.26 *************** *** 102,107 **** --- 102,108 ---- { "word_delimiters_dbl_click", ".,()[]\"\'", A(m_strWordDelimitersDblClick)}, { "trayiconfilename", "", A(m_strTrayIconFileName)}, { "lua_script", "", A(m_strLuaScript)}, + { "locale", "EN", A(m_strLocale)}, {NULL} // end of table marker }; // end of AlphaGlobalOptionsTable *************** *** 197,203 **** } else ! ::AfxMessageBox ("Not in XML format"); } // end of try block catch (CException* e) --- 198,204 ---- } else ! ::TMessageBox ("Not in XML format"); } // end of try block catch (CException* e) *************** *** 231,237 **** continue; LoadError (node.strName, ! CFormat ("Attribute not used: %s=\"%s\"", (LPCTSTR) strName, (LPCTSTR) attribute->strValue), attribute->iLine); --- 232,238 ---- continue; LoadError (node.strName, ! TFormat ("Attribute not used: %s=\"%s\"", (LPCTSTR) strName, (LPCTSTR) attribute->strValue), attribute->iLine); *************** *** 247,253 **** continue; LoadError (node.strName, ! CFormat ("Tag not used: <%s>", (LPCTSTR) pElement->strName), pElement->iLine); --- 248,254 ---- continue; LoadError (node.strName, ! TFormat ("Tag not used: <%s>", (LPCTSTR) pElement->strName), pElement->iLine); *************** *** 274,280 **** if (iLine == 0) iLine = iLineLastItemFound; ! CString str = CFormat ("Line %4i: %s (%s)%s", iLine, // which line sMessage, // what message sType, // type of thing (eg, trigger) --- 275,281 ---- if (iLine == 0) iLine = iLineLastItemFound; ! CString str = TFormat ("Line %4i: %s (%s)%s", iLine, // which line sMessage, // what message sType, // type of thing (eg, trigger) *************** *** 538,544 **** } catch (CException* e) { ! HandleLoadException (CFormat ("option '%s' not set", (LPCTSTR) GlobalOptionsTable [i].pName), e); } // end of catch } --- 539,545 ---- } catch (CException* e) { ! HandleLoadException (TFormat ("option '%s' not set", (LPCTSTR) GlobalOptionsTable [i].pName), e); } // end of catch } *************** *** 575,581 **** } // end of try block catch (CException* e) { ! HandleLoadException (CFormat ("option '%s' not set", (LPCTSTR) AlphaGlobalOptionsTable [i].pName), e); } // end of catch } // end of single-line options --- 576,582 ---- } // end of try block catch (CException* e) { ! HandleLoadException (TFormat ("option '%s' not set", (LPCTSTR) AlphaGlobalOptionsTable [i].pName), e); } // end of catch } // end of single-line options *************** *** 705,711 **** // when did we save it? ar->WriteString (CFormat ("" NL, FixHTMLString (CTime::GetCurrentTime().Format ! ("%A, %B %d, %Y, %#I:%M %p")))); // which version was it? ar->WriteString (CFormat --- 706,712 ---- // when did we save it? ar->WriteString (CFormat ("" NL, FixHTMLString (CTime::GetCurrentTime().Format ! (TranslateTime ("%A, %B %d, %Y, %#I:%M %p"))))); // which version was it? ar->WriteString (CFormat *************** *** 728,748 **** catch (CFileException * e) { ! ::AfxMessageBox ("Unable to create the requested file", MB_ICONEXCLAMATION); e->Delete (); bOK = false; } // end of catching a file exception catch (CMemoryException * e) { ! ::AfxMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); bOK = false; } // end of catching a memory exception catch (CArchiveException * e) { ! ::AfxMessageBox ("There was a problem in the data format", MB_ICONEXCLAMATION); e->Delete (); bOK = false; } // end of catching an archive exception --- 729,749 ---- catch (CFileException * e) { ! ::TMessageBox ("Unable to create the requested file", MB_ICONEXCLAMATION); e->Delete (); bOK = false; } // end of catching a file exception catch (CMemoryException * e) { ! ::TMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); bOK = false; } // end of catching a memory exception catch (CArchiveException * e) { ! ::TMessageBox ("There was a problem in the data format", MB_ICONEXCLAMATION); e->Delete (); bOK = false; } // end of catching an archive exception *************** *** 773,778 **** --- 774,786 ---- void CMUSHclientApp::GetGlobalPrefsFromRegistry (void) { + + char localeBuf [10]; + + // find 2-character country ID + GetLocaleInfo (GetUserDefaultLCID (), LOCALE_SABBREVLANGNAME, localeBuf, sizeof (localeBuf)); + localeBuf [2] = 0; // truncate to 2 characters + // read global prefs from the Registry m_bAutoConnectWorlds = GetProfileInt ("Global prefs", "AutoConnectWorlds", 1); *************** *** 826,831 **** --- 834,840 ---- m_bTriggerRemoveCheck = GetProfileInt ("Global prefs", "TriggerRemoveCheck", 1); m_bF1macro = GetProfileInt ("Global prefs", "F1macro", 1); m_bAllTypingToCommandWindow = GetProfileInt ("Global prefs", "AllTypingToCommandWindow", 0); + m_strLocale = GetProfileString ("Global prefs", "Locale", localeBuf); // defaults m_strDefaultColoursFile = GetProfileString ("Global prefs", "DefaultColoursFile", ""); Index: globalregistryoptions.cpp =================================================================== RCS file: /cvs/mushclient/globalregistryoptions.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** globalregistryoptions.cpp 1 Apr 2007 04:44:31 -0000 1.10 --- globalregistryoptions.cpp 11 Jun 2007 23:44:15 -0000 1.11 *************** *** 96,101 **** --- 96,102 ---- { GLB_ALPHA_OPT (m_strWordDelimitersDblClick ), "WordDelimitersDblClick", ".,()[]\"\'" }, { GLB_ALPHA_OPT (m_strWorldList ), "WorldList", "" }, { GLB_ALPHA_OPT (m_strLuaScript ), "LuaScript", "" }, + { GLB_ALPHA_OPT (m_strLocale ), "Locale", "EN" }, {NULL} // end of table marker Index: logdlg.cpp =================================================================== RCS file: /cvs/mushclient/logdlg.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** logdlg.cpp 12 Feb 2004 04:06:26 -0000 1.9 --- logdlg.cpp 11 Jun 2007 21:40:12 -0000 1.10 *************** *** 49,55 **** { // check if output is not logged, sounds strange. if (!m_bLogOutput) ! if (::AfxMessageBox ("You are not logging output from the MUD - is this intentional?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) pDX->Fail(); --- 49,55 ---- { // check if output is not logged, sounds strange. if (!m_bLogOutput) ! if (::TMessageBox ("You are not logging output from the MUD - is this intentional?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) pDX->Fail(); Index: lua_methods.cpp =================================================================== RCS file: /cvs/mushclient/lua_methods.cpp,v retrieving revision 1.69 retrieving revision 1.71 diff -c -r1.69 -r1.71 *** lua_methods.cpp 31 May 2007 01:44:30 -0000 1.69 --- lua_methods.cpp 11 Jun 2007 21:40:12 -0000 1.71 *************** *** 309,315 **** ! static const bool optboolean (lua_State *L, const int narg, const int def) { // that argument not present, take default if (lua_gettop (L) < narg) --- 309,315 ---- ! const bool optboolean (lua_State *L, const int narg, const int def) { // that argument not present, take default if (lua_gettop (L) < narg) *************** *** 5260,5330 **** int_flags_pair error_descriptions[] = { ! { 0, "No error" }, ! { 30001, "The world is already open" }, ! { 30002, "The world is closed, this action cannot be performed" }, ! { 30003, "No name has been specified where one is required" }, ! { 30004, "The sound file could not be played" }, ! { 30005, "The specified trigger name does not exist" }, ! { 30006, "Attempt to add a trigger that already exists" }, ! { 30007, "The trigger \"match\" string cannot be empty" }, ! { 30008, "The name of this object is invalid" }, ! { 30009, "Script name is not in the script file" }, ! { 30010, "The specified alias name does not exist" }, ! { 30011, "Attempt to add a alias that already exists" }, ! { 30012, "The alias \"match\" string cannot be empty" }, ! { 30013, "Unable to open requested file" }, ! { 30014, "Log file was not open" }, ! { 30015, "Log file was already open" }, ! { 30016, "Bad write to log file" }, ! { 30017, "The specified timer name does not exist" }, ! { 30018, "Attempt to add a timer that already exists" }, ! { 30019, "Attempt to delete a variable that does not exist" }, ! { 30020, "Attempt to use SetCommand with a non-empty command window" }, ! { 30021, "Bad regular expression syntax" }, ! { 30022, "Time given to AddTimer is invalid" }, ! { 30023, "Direction given to AddToMapper is invalid" }, ! { 30024, "No items in mapper" }, ! { 30025, "Option name not found" }, ! { 30026, "New value for option is out of range" }, ! { 30027, "Trigger sequence value invalid" }, ! { 30028, "Where to send trigger text to is invalid" }, ! { 30029, "Trigger label not specified/invalid for 'send to variable'" }, ! { 30030, "File name specified for plugin not found" }, ! { 30031, "There was a parsing or other problem loading the plugin" }, ! { 30032, "Plugin is not allowed to set this option" }, ! { 30033, "Plugin is not allowed to get this option" }, ! { 30034, "Requested plugin is not installed" }, ! { 30035, "Only a plugin can do this" }, ! { 30036, "Plugin does not support that subroutine (subroutine not in script)" }, ! { 30037, "Plugin does not support saving state" }, ! { 30037, "Plugin could not save state (eg. no state directory)" }, ! { 30039, "Plugin is currently disabled" }, ! { 30040, "Could not call plugin routine" }, ! { 30041, "Calls to \"Execute\" nested too deeply" }, ! { 30042, "Unable to create socket for chat connection" }, ! { 30043, "Unable to do DNS (domain name) lookup for chat connection" }, ! { 30044, "No chat connections open" }, ! { 30045, "Requested chat person not connected" }, ! { 30046, "General problem with a parameter to a script call" }, ! { 30047, "Already listening for incoming chats" }, ! { 30048, "Chat session with that ID not found" }, ! { 30049, "Already connected to that server/port" }, ! { 30050, "Cannot get (text from the) clipboard" }, ! { 30051, "Cannot open the specified file" }, ! { 30052, "Already transferring a file" }, ! { 30053, "Not transferring a file" }, ! { 30054, "There is not a command of that name" }, ! { 30055, "That array already exists" }, ! { 30056, "That array does not exist" }, ! { 30057, "Values to be imported into array are not in pairs" }, ! { 30058, "Import succeeded, however some values were overwritten" }, ! { 30059, "Import/export delimiter must be a single character, other than backslash" }, ! { 30060, "Array element set, existing value overwritten" }, ! { 30061, "Array key does not exist" }, ! { 30062, "Cannot import because cannot find unused temporary character" }, ! { 30063, "Cannot delete trigger/alias/timer because it is executing a script" }, ! { 30064, "Spell checker is not active" }, { NULL, 0 } }; --- 5260,5330 ---- int_flags_pair error_descriptions[] = { ! { 0, Translate_NoOp ("No error") }, ! { 30001, Translate_NoOp ("The world is already open") }, ! { 30002, Translate_NoOp ("The world is closed, this action cannot be performed") }, ! { 30003, Translate_NoOp ("No name has been specified where one is required") }, ! { 30004, Translate_NoOp ("The sound file could not be played") }, ! { 30005, Translate_NoOp ("The specified trigger name does not exist") }, ! { 30006, Translate_NoOp ("Attempt to add a trigger that already exists") }, ! { 30007, Translate_NoOp ("The trigger \"match\" string cannot be empty") }, ! { 30008, Translate_NoOp ("The name of this object is invalid") }, ! { 30009, Translate_NoOp ("Script name is not in the script file") }, ! { 30010, Translate_NoOp ("The specified alias name does not exist") }, ! { 30011, Translate_NoOp ("Attempt to add a alias that already exists") }, ! { 30012, Translate_NoOp ("The alias \"match\" string cannot be empty") }, ! { 30013, Translate_NoOp ("Unable to open requested file") }, ! { 30014, Translate_NoOp ("Log file was not open") }, ! { 30015, Translate_NoOp ("Log file was already open") }, ! { 30016, Translate_NoOp ("Bad write to log file") }, ! { 30017, Translate_NoOp ("The specified timer name does not exist") }, ! { 30018, Translate_NoOp ("Attempt to add a timer that already exists") }, ! { 30019, Translate_NoOp ("Attempt to delete a variable that does not exist") }, ! { 30020, Translate_NoOp ("Attempt to use SetCommand with a non-empty command window") }, ! { 30021, Translate_NoOp ("Bad regular expression syntax") }, ! { 30022, Translate_NoOp ("Time given to AddTimer is invalid") }, ! { 30023, Translate_NoOp ("Direction given to AddToMapper is invalid") }, ! { 30024, Translate_NoOp ("No items in mapper") }, ! { 30025, Translate_NoOp ("Option name not found") }, ! { 30026, Translate_NoOp ("New value for option is out of range") }, ! { 30027, Translate_NoOp ("Trigger sequence value invalid") }, ! { 30028, Translate_NoOp ("Where to send trigger text to is invalid") }, ! { 30029, Translate_NoOp ("Trigger label not specified/invalid for 'send to variable'") }, ! { 30030, Translate_NoOp ("File name specified for plugin not found") }, ! { 30031, Translate_NoOp ("There was a parsing or other problem loading the plugin") }, ! { 30032, Translate_NoOp ("Plugin is not allowed to set this option") }, ! { 30033, Translate_NoOp ("Plugin is not allowed to get this option") }, ! { 30034, Translate_NoOp ("Requested plugin is not installed") }, ! { 30035, Translate_NoOp ("Only a plugin can do this") }, ! { 30036, Translate_NoOp ("Plugin does not support that subroutine (subroutine not in script)") }, ! { 30037, Translate_NoOp ("Plugin does not support saving state") }, ! { 30037, Translate_NoOp ("Plugin could not save state (eg. no state directory)") }, ! { 30039, Translate_NoOp ("Plugin is currently disabled") }, ! { 30040, Translate_NoOp ("Could not call plugin routine") }, ! { 30041, Translate_NoOp ("Calls to \"Execute\" nested too deeply") }, ! { 30042, Translate_NoOp ("Unable to create socket for chat connection") }, ! { 30043, Translate_NoOp ("Unable to do DNS (domain name) lookup for chat connection") }, ! { 30044, Translate_NoOp ("No chat connections open") }, ! { 30045, Translate_NoOp ("Requested chat person not connected") }, ! { 30046, Translate_NoOp ("General problem with a parameter to a script call") }, ! { 30047, Translate_NoOp ("Already listening for incoming chats") }, ! { 30048, Translate_NoOp ("Chat session with that ID not found") }, ! { 30049, Translate_NoOp ("Already connected to that server/port") }, ! { 30050, Translate_NoOp ("Cannot get (text from the) clipboard") }, ! { 30051, Translate_NoOp ("Cannot open the specified file") }, ! { 30052, Translate_NoOp ("Already transferring a file") }, ! { 30053, Translate_NoOp ("Not transferring a file") }, ! { 30054, Translate_NoOp ("There is not a command of that name") }, ! { 30055, Translate_NoOp ("That array already exists") }, ! { 30056, Translate_NoOp ("That array does not exist") }, ! { 30057, Translate_NoOp ("Values to be imported into array are not in pairs") }, ! { 30058, Translate_NoOp ("Import succeeded, however some values were overwritten") }, ! { 30059, Translate_NoOp ("Import/export delimiter must be a single character, other than backslash") }, ! { 30060, Translate_NoOp ("Array element set, existing value overwritten") }, ! { 30061, Translate_NoOp ("Array key does not exist") }, ! { 30062, Translate_NoOp ("Cannot import because cannot find unused temporary character") }, ! { 30063, Translate_NoOp ("Cannot delete trigger/alias/timer because it is executing a script") }, ! { 30064, Translate_NoOp ("Spell checker is not active") }, { NULL, 0 } }; *************** *** 5336,5342 **** static int l_errorhandler (lua_State *L) { ! ::AfxMessageBox ("errorhandler"); return 0; } // end of l_errorhandler --- 5336,5342 ---- static int l_errorhandler (lua_State *L) { ! ::TMessageBox ("errorhandler"); return 0; } // end of l_errorhandler Index: lua_scripting.cpp =================================================================== RCS file: /cvs/mushclient/lua_scripting.cpp,v retrieving revision 1.36 retrieving revision 1.38 diff -c -r1.36 -r1.38 *** lua_scripting.cpp 10 May 2007 01:19:25 -0000 1.36 --- lua_scripting.cpp 12 Jun 2007 04:01:56 -0000 1.38 *************** *** 25,65 **** LUALIB_API int luaopen_progress_dialog(lua_State *L); - LONG WINAPI DelayLoadDllExceptionFilterLua(PEXCEPTION_POINTERS pep) { - // Assume we recognize this exception - LONG lDisposition = EXCEPTION_EXECUTE_HANDLER; - // If this is a Delay-load problem, ExceptionInformation[0] points - // to a DelayLoadInfo structure that has detailed error info - PDelayLoadInfo pdli = PDelayLoadInfo(pep->ExceptionRecord - ->ExceptionInformation[0]); - // Create a buffer where we construct error messages - char sz[500] = { 0 }; - switch (pep->ExceptionRecord->ExceptionCode) { - case VcppException(ERROR_SEVERITY_ERROR, ERROR_MOD_NOT_FOUND): - // The DLL module was not found at runtime - wsprintf(sz, "The DLL \"%s\" was not found\n\n" - "Please ensure it is in your path, or disable Lua scripting.", pdli->szDll); - break; - case VcppException(ERROR_SEVERITY_ERROR, ERROR_PROC_NOT_FOUND): - // The DLL module was found but it doesn’t contain the function - if (pdli->dlp.fImportByName) { - wsprintf(sz, "Function %s was not found in %s", - pdli->dlp.szProcName, pdli->szDll); - } else { - wsprintf(sz, "Function ordinal %d was not found in %s", - pdli->dlp.dwOrdinal, pdli->szDll); - } - break; - default: - lDisposition = EXCEPTION_CONTINUE_SEARCH; // We don’t recognize this // exception - break; - } - if (lDisposition == EXCEPTION_EXECUTE_HANDLER) { - // We recognized this error and constructed a message, show it - MessageBox(NULL, sz, NULL, MB_OK); - } - return(lDisposition); - } // end of DelayLoadDllExceptionFilterLua static void BuildOneLuaFunction (lua_State * L, const char * sTableName) { --- 25,30 ---- *************** *** 197,217 **** void CScriptEngine::OpenLua () { - // Wrap all calls to delay-load DLL functions inside SEH - __try - { OpenLuaDelayed (); - } - - __except (DelayLoadDllExceptionFilterLua(GetExceptionInformation())) - { - // Nothing to do in here, thread continues to run normally - L = NULL; - } - - } // end of CScriptEngine::OpenLua void CScriptEngine::CloseLua () --- 162,170 ---- *************** *** 405,411 **** LARGE_INTEGER start, finish; ! m_pDoc->Trace (CFormat ("Executing %s script \"%s\"", szType, szProcedure)); if (App.m_iCounterFrequency) QueryPerformanceCounter (&start); --- 358,364 ---- LARGE_INTEGER start, finish; ! m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure)); if (App.m_iCounterFrequency) QueryPerformanceCounter (&start); *************** *** 627,633 **** LARGE_INTEGER start, finish; ! m_pDoc->Trace (CFormat ("Executing %s script \"%s\"", szType, szProcedure)); if (App.m_iCounterFrequency) QueryPerformanceCounter (&start); --- 580,586 ---- LARGE_INTEGER start, finish; ! m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure)); if (App.m_iCounterFrequency) QueryPerformanceCounter (&start); Index: mainfrm.cpp =================================================================== RCS file: /cvs/mushclient/mainfrm.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -c -r1.59 -r1.60 *** mainfrm.cpp 17 Apr 2007 06:07:16 -0000 1.59 --- mainfrm.cpp 11 Jun 2007 21:40:12 -0000 1.60 *************** *** 214,220 **** if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) { ! ::AfxMessageBox ("Failed to create MDI Frame Window", MB_ICONSTOP); return -1; } --- 214,220 ---- if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) { ! ::TMessageBox ("Failed to create MDI Frame Window", MB_ICONSTOP); return -1; } *************** *** 223,229 **** !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); ! ::AfxMessageBox ("Failed to create toolbar", MB_ICONSTOP); return -1; // fail to create } --- 223,229 ---- !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) { TRACE0("Failed to create toolbar\n"); ! ::TMessageBox ("Failed to create toolbar", MB_ICONSTOP); return -1; // fail to create } *************** *** 233,239 **** sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); ! ::AfxMessageBox ("Failed to create status bar", MB_ICONSTOP); return -1; // fail to create } --- 233,239 ---- sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); ! ::TMessageBox ("Failed to create status bar", MB_ICONSTOP); return -1; // fail to create } *************** *** 243,249 **** !m_wndGameToolBar.LoadToolBar(IDR_GAME_TOOLBAR)) { TRACE0("Failed to create game toolbar\n"); ! ::AfxMessageBox ("Failed to create game toolbar", MB_ICONSTOP); return -1; // fail to create } --- 243,249 ---- !m_wndGameToolBar.LoadToolBar(IDR_GAME_TOOLBAR)) { TRACE0("Failed to create game toolbar\n"); ! ::TMessageBox ("Failed to create game toolbar", MB_ICONSTOP); return -1; // fail to create } *************** *** 253,259 **** !m_wndActivityToolBar.LoadToolBar(IDR_ACTIVITY_TOOLBAR)) { TRACE0("Failed to create activity toolbar\n"); ! ::AfxMessageBox ("Failed to create activity toolbar", MB_ICONSTOP); return -1; // fail to create } --- 253,259 ---- !m_wndActivityToolBar.LoadToolBar(IDR_ACTIVITY_TOOLBAR)) { TRACE0("Failed to create activity toolbar\n"); ! ::TMessageBox ("Failed to create activity toolbar", MB_ICONSTOP); return -1; // fail to create } *************** *** 263,269 **** if (!m_wndInfoBar.Create (this, IDD_INFO, CBRS_BOTTOM | CBRS_SIZE_DYNAMIC, ID_VIEW_INFOBAR)) { //TRACE0("Failed to create info bar\n"); ! //::AfxMessageBox ("Failed to create info bar", MB_ICONSTOP); m_wndInfoBar.m_hWnd = NULL; // we will use this to flag that it wasn't created } --- 263,269 ---- if (!m_wndInfoBar.Create (this, IDD_INFO, CBRS_BOTTOM | CBRS_SIZE_DYNAMIC, ID_VIEW_INFOBAR)) { //TRACE0("Failed to create info bar\n"); ! //::TMessageBox ("Failed to create info bar", MB_ICONSTOP); m_wndInfoBar.m_hWnd = NULL; // we will use this to flag that it wasn't created } *************** *** 1083,1089 **** void CMainFrame::OnWebPage() { if ((long) ShellExecute (Frame, _T("open"), MY_WEB_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the Gammon Software Solutions web page: " MY_WEB_PAGE, MB_ICONEXCLAMATION); --- 1083,1089 ---- void CMainFrame::OnWebPage() { if ((long) ShellExecute (Frame, _T("open"), MY_WEB_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the Gammon Software Solutions web page: " MY_WEB_PAGE, MB_ICONEXCLAMATION); *************** *** 1093,1099 **** void CMainFrame::OnHelpForum() { if ((long) ShellExecute (Frame, _T("open"), MUSHCLIENT_FORUM_URL, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the MUSHclient forum web page: " MUSHCLIENT_FORUM_URL, MB_ICONEXCLAMATION); --- 1093,1099 ---- void CMainFrame::OnHelpForum() { if ((long) ShellExecute (Frame, _T("open"), MUSHCLIENT_FORUM_URL, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the MUSHclient forum web page: " MUSHCLIENT_FORUM_URL, MB_ICONEXCLAMATION); *************** *** 1102,1108 **** void CMainFrame::OnHelpFunctionswebpage() { if ((long) ShellExecute (Frame, _T("open"), MUSHCLIENT_FUNCTIONS_URL, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the MUSHclient forum web page: " MUSHCLIENT_FUNCTIONS_URL, MB_ICONEXCLAMATION); --- 1102,1108 ---- void CMainFrame::OnHelpFunctionswebpage() { if ((long) ShellExecute (Frame, _T("open"), MUSHCLIENT_FUNCTIONS_URL, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the MUSHclient forum web page: " MUSHCLIENT_FUNCTIONS_URL, MB_ICONEXCLAMATION); *************** *** 1127,1133 **** void CMainFrame::OnHelpMudlists() { if ((long) ShellExecute (Frame, _T("open"), MUD_LIST, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the MUD lists web page: " MUD_LIST, MB_ICONEXCLAMATION); --- 1127,1133 ---- void CMainFrame::OnHelpMudlists() { if ((long) ShellExecute (Frame, _T("open"), MUD_LIST, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the MUD lists web page: " MUD_LIST, MB_ICONEXCLAMATION); *************** *** 1273,1279 **** char sMessage [128]; mciGetErrorString (dwCode, sMessage, sizeof (sMessage)); ! ::AfxMessageBox (CFormat ("Unable to play file %s, reason: %s", (LPCTSTR) strSound, sMessage), MB_ICONEXCLAMATION); --- 1273,1279 ---- char sMessage [128]; mciGetErrorString (dwCode, sMessage, sizeof (sMessage)); ! ::UMessageBox (TFormat ("Unable to play file %s, reason: %s", (LPCTSTR) strSound, sMessage), MB_ICONEXCLAMATION); *************** *** 1282,1288 **** void CMainFrame::OnHelpBugreportsuggestion() { if ((long) ShellExecute (Frame, _T("open"), BUG_REPORT_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the Gammon Software Solutions Bug Report web page: " BUG_REPORT_PAGE, MB_ICONEXCLAMATION); --- 1282,1288 ---- void CMainFrame::OnHelpBugreportsuggestion() { if ((long) ShellExecute (Frame, _T("open"), BUG_REPORT_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the Gammon Software Solutions Bug Report web page: " BUG_REPORT_PAGE, MB_ICONEXCLAMATION); *************** *** 1723,1729 **** void CMainFrame::OnHelpDocumentationwebpage() { if ((long) ShellExecute (Frame, _T("open"), DOCUMENTATION_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the MUSHclient documentation web page: " DOCUMENTATION_PAGE, MB_ICONEXCLAMATION); --- 1723,1729 ---- void CMainFrame::OnHelpDocumentationwebpage() { if ((long) ShellExecute (Frame, _T("open"), DOCUMENTATION_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the MUSHclient documentation web page: " DOCUMENTATION_PAGE, MB_ICONEXCLAMATION); *************** *** 1733,1739 **** void CMainFrame::OnHelpRegularexpressionswebpage() { if ((long) ShellExecute (Frame, _T("open"), REGEXP_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the regular expressions web page: " REGEXP_PAGE, MB_ICONEXCLAMATION); --- 1733,1739 ---- void CMainFrame::OnHelpRegularexpressionswebpage() { if ((long) ShellExecute (Frame, _T("open"), REGEXP_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the regular expressions web page: " REGEXP_PAGE, MB_ICONEXCLAMATION); *************** *** 2081,2087 **** void CMainFrame::OnHelpPluginslist() { if ((long) ShellExecute (Frame, _T("open"), PLUGINS_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox( "Unable to open the plugins web page: " PLUGINS_PAGE, MB_ICONEXCLAMATION); --- 2081,2087 ---- void CMainFrame::OnHelpPluginslist() { if ((long) ShellExecute (Frame, _T("open"), PLUGINS_PAGE, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox( "Unable to open the plugins web page: " PLUGINS_PAGE, MB_ICONEXCLAMATION); Index: methods.cpp =================================================================== RCS file: /cvs/mushclient/methods.cpp,v retrieving revision 1.190 retrieving revision 1.195 diff -c -r1.190 -r1.195 *** methods.cpp 28 May 2007 05:50:12 -0000 1.190 --- methods.cpp 12 Jun 2007 04:01:56 -0000 1.195 *************** *** 1301,1307 **** pNewDoc->SetTheFont (); } else ! ::AfxMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); return; } // end of using inbuilt notepad --- 1301,1307 ---- pNewDoc->SetTheFont (); } else ! ::TMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); return; } // end of using inbuilt notepad *************** *** 1309,1315 **** if ((long) ShellExecute (Frame, _T("open"), m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) m_strScriptFilename), NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); --- 1309,1315 ---- if ((long) ShellExecute (Frame, _T("open"), m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) m_strScriptFilename), NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); *************** *** 1755,1761 **** if (!::OpenClipboard(NULL) ) { ! ::AfxMessageBox( "Cannot open the Clipboard" ); return; } --- 1755,1761 ---- if (!::OpenClipboard(NULL) ) { ! ::TMessageBox( "Cannot open the Clipboard" ); return; } *************** *** 2381,2386 **** --- 2381,2396 ---- // rewritten 17th August 2002 to make it easier to follow and less buggy :) // (and support comments) + CString MakeSpeedWalkErrorString (LPCTSTR sMsg) + { + CString strResult = "*"; + + strResult += sMsg; + + return strResult; + + } // end of MakeSpeedWalkErrorString + CString CMUSHclientDoc::DoEvaluateSpeedwalk(LPCTSTR SpeedWalkString) { CString strResult, *************** *** 2401,2407 **** p++; if (*p != '}') ! return "*Comment code of \'{\' not terminated by a \'}\'"; p++; // skip } symbol continue; // back to start of loop } // end of comment --- 2411,2417 ---- p++; if (*p != '}') ! return MakeSpeedWalkErrorString (Translate ("Comment code of \'{\' not terminated by a \'}\'")); p++; // skip } symbol continue; // back to start of loop } // end of comment *************** *** 2412,2418 **** { count = (count * 10) + (*p++ - '0'); if (count > 99) ! return "*Speed walk counter exceeds 99"; } // end of having digit(s) // no counter, assume do once --- 2422,2428 ---- { count = (count * 10) + (*p++ - '0'); if (count > 99) ! return MakeSpeedWalkErrorString (Translate ("Speed walk counter exceeds 99")); } // end of having digit(s) // no counter, assume do once *************** *** 2424,2433 **** p++; if (count > 1 && *p == 0) ! return "*Speed walk counter not followed by an action"; if (count > 1 && *p == '{') ! return "*Speed walk counter may not be followed by a comment"; // might have had trailing space if (*p == 0) --- 2434,2443 ---- p++; if (count > 1 && *p == 0) ! return MakeSpeedWalkErrorString (Translate ("Speed walk counter not followed by an action")); if (count > 1 && *p == '{') ! return MakeSpeedWalkErrorString (Translate ("Speed walk counter may not be followed by a comment")); // might have had trailing space if (*p == 0) *************** *** 2436,2443 **** if (strchr ("COLK", toupper (*p))) { if (count > 1) ! return "*Action code of C, O, L or K must not follow " ! "a speed walk count (1-99)"; switch (toupper (*p++)) { --- 2446,2453 ---- if (strchr ("COLK", toupper (*p))) { if (count > 1) ! return MakeSpeedWalkErrorString (Translate ("Action code of C, O, L or K must not follow " ! "a speed walk count (1-99)")); switch (toupper (*p++)) { *************** *** 2454,2461 **** if (*p == 0 || toupper (*p) == 'F' || *p == '{') ! return "*Action code of C, O, L or K must be followed " ! "by a direction"; } // end of C, O, L, K --- 2464,2471 ---- if (*p == 0 || toupper (*p) == 'F' || *p == '{') ! return MakeSpeedWalkErrorString (Translate ("Action code of C, O, L or K must be followed " ! "by a direction")); } // end of C, O, L, K *************** *** 2480,2495 **** str += *p++; // add to string if (*p != ')') ! return "*Action code of \'(\' not terminated by a \')\'"; int iSlash = str.Find ("/"); // only use up to the slash if (iSlash != -1) str = str.Left (iSlash); } break; // end of (blahblah/blah blah) default: ! return CFormat ("*Invalid direction \'%c\' in speed walk, must be " "N, S, E, W, U, D, F, or (something)", ! *p); } // end of switch on character p++; // bypass whatever that character was (or the trailing bracket) --- 2490,2505 ---- str += *p++; // add to string if (*p != ')') ! return MakeSpeedWalkErrorString (Translate ("Action code of \'(\' not terminated by a \')\'")); int iSlash = str.Find ("/"); // only use up to the slash if (iSlash != -1) str = str.Left (iSlash); } break; // end of (blahblah/blah blah) default: ! return MakeSpeedWalkErrorString (TFormat ("*Invalid direction \'%c\' in speed walk, must be " "N, S, E, W, U, D, F, or (something)", ! *p)); } // end of switch on character p++; // bypass whatever that character was (or the trailing bracket) *************** *** 2543,2549 **** str += *p++; // add to string if (*p != '}') ! return "*Comment code of \'{\' not terminated by a \'}\'"; p++; // skip } symbol --- 2553,2559 ---- str += *p++; // add to string if (*p != '}') ! return MakeSpeedWalkErrorString (Translate ("Comment code of \'{\' not terminated by a \'}\'")); p++; // skip } symbol *************** *** 2559,2565 **** { count = (count * 10) + (*p++ - '0'); if (count > 99) ! return "*Speed walk counter exceeds 99"; } // end of having digit(s) // no counter, assume do once --- 2569,2575 ---- { count = (count * 10) + (*p++ - '0'); if (count > 99) ! return MakeSpeedWalkErrorString (Translate ("Speed walk counter exceeds 99")); } // end of having digit(s) // no counter, assume do once *************** *** 2571,2580 **** p++; if (count > 1 && *p == 0) ! return "*Speed walk counter not followed by an action"; if (count > 1 && *p == '{') ! return "*Speed walk counter may not be followed by a comment"; // might have had trailing space if (*p == 0) --- 2581,2590 ---- p++; if (count > 1 && *p == 0) ! return MakeSpeedWalkErrorString (Translate ("Speed walk counter not followed by an action")); if (count > 1 && *p == '{') ! return MakeSpeedWalkErrorString (Translate ("Speed walk counter may not be followed by a comment")); // might have had trailing space if (*p == 0) *************** *** 2583,2590 **** if (strchr ("COLK", toupper (*p))) { if (count > 1) ! return "*Action code of C, O, L or K must not follow " ! "a speed walk count (1-99)"; strAction = *p++; // remember action --- 2593,2600 ---- if (strchr ("COLK", toupper (*p))) { if (count > 1) ! return MakeSpeedWalkErrorString (Translate ("Action code of C, O, L or K must not follow " ! "a speed walk count (1-99)")); strAction = *p++; // remember action *************** *** 2595,2602 **** if (*p == 0 || toupper (*p) == 'F' || *p == '{') ! return "*Action code of C, O, L or K must be followed " ! "by a direction"; } // end of C, O, L, K else --- 2605,2612 ---- if (*p == 0 || toupper (*p) == 'F' || *p == '{') ! return MakeSpeedWalkErrorString (Translate ("Action code of C, O, L or K must be followed " ! "by a direction")); } // end of C, O, L, K else *************** *** 2623,2629 **** str += (char) tolower (*p++); // add to string if (*p != ')') ! return "*Action code of \'(\' not terminated by a \')\'"; int iSlash = str.Find ("/"); // only use up to the slash // if no slash try to convert whole thing (eg. ne becomes sw) if (iSlash == -1) --- 2633,2639 ---- str += (char) tolower (*p++); // add to string if (*p != ')') ! return MakeSpeedWalkErrorString (Translate ("Action code of \'(\' not terminated by a \')\'")); int iSlash = str.Find ("/"); // only use up to the slash // if no slash try to convert whole thing (eg. ne becomes sw) if (iSlash == -1) *************** *** 2644,2652 **** } break; // end of (blahblah/blah blah) default: ! return CFormat ("*Invalid direction \'%c\' in speed walk, must be " "N, S, E, W, U, D, F, or (something)", ! *p); } // end of switch on character p++; // bypass whatever that character was (or the trailing bracket) --- 2654,2662 ---- } break; // end of (blahblah/blah blah) default: ! return MakeSpeedWalkErrorString (TFormat ("Invalid direction \'%c\' in speed walk, must be " "N, S, E, W, U, D, F, or (something)", ! *p)); } // end of switch on character p++; // bypass whatever that character was (or the trailing bracket) *************** *** 3082,3088 **** void CMUSHclientDoc::OnUpdateInputDiscardqueuedcommands(CCmdUI* pCmdUI) { DoFixMenus (pCmdUI); // remove accelerators from menus ! pCmdUI->SetText (CFormat ("&Discard %i Queued Command%s\tCtrl+D", PLURAL (m_QueuedCommandsList.GetCount ()))); pCmdUI->Enable (!m_QueuedCommandsList.IsEmpty ()); --- 3092,3098 ---- void CMUSHclientDoc::OnUpdateInputDiscardqueuedcommands(CCmdUI* pCmdUI) { DoFixMenus (pCmdUI); // remove accelerators from menus ! pCmdUI->SetText (TFormat ("&Discard %i Queued Command%s\tCtrl+D", PLURAL (m_QueuedCommandsList.GetCount ()))); pCmdUI->Enable (!m_QueuedCommandsList.IsEmpty ()); *************** *** 4084,4089 **** --- 4094,4100 ---- { 66, "MUSHclient application directory" }, { 67, "World file directory" }, { 68, "Startup directory" }, + { 69, "Translation file" }, // (booleans - calculated at runtime) *************** *** 4279,4284 **** --- 4290,4296 ---- case 66: SetUpVariantString (vaResult, ExtractDirectory (App.m_strMUSHclientFileName)); break; case 67: SetUpVariantString (vaResult, ExtractDirectory (GetPathName ())); break; case 68: SetUpVariantString (vaResult, working_dir); break; + case 69: SetUpVariantString (vaResult, App.m_strTranslatorFile); break; case 101: SetUpVariantBool (vaResult, m_bNoEcho); break; case 102: SetUpVariantBool (vaResult, m_bDebugIncomingPackets); break; *************** *** 5118,5125 **** CPlugin * pSavedPlugin = m_CurrentPlugin; m_CurrentPlugin = pPlugin; ! CString strType = CFormat ("Plugin %s", (LPCTSTR) pPlugin->m_strName); ! CString strReason = CFormat ("Executing plugin %s sub %s", (LPCTSTR) pPlugin->m_strName, Routine ); --- 5130,5137 ---- CPlugin * pSavedPlugin = m_CurrentPlugin; m_CurrentPlugin = pPlugin; ! CString strType = TFormat ("Plugin %s", (LPCTSTR) pPlugin->m_strName); ! CString strReason = TFormat ("Executing plugin %s sub %s", (LPCTSTR) pPlugin->m_strName, Routine ); *************** *** 7158,7164 **** m_strOurChatName = ""; ChatNote (eChatNameChange, ! CFormat ("Your chat name changed from %s to %s", (LPCTSTR) m_strOurChatName, (LPCTSTR) strNewName)); --- 7170,7176 ---- m_strOurChatName = ""; ChatNote (eChatNameChange, ! TFormat ("Your chat name changed from %s to %s", (LPCTSTR) m_strOurChatName, (LPCTSTR) strNewName)); *************** *** 7183,7189 **** Message, (LPCTSTR) AnsiCode (ANSI_TEXT_RED)); else ! strMessage = CFormat ("\n%s chats to everybody, '%s%s%s%s'\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 7195,7201 ---- Message, (LPCTSTR) AnsiCode (ANSI_TEXT_RED)); else ! strMessage = TFormat ("\n%s chats to everybody, '%s%s%s%s'\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 7201,7207 **** { if (Emote) ChatNote (eChatOutgoingEverybody, ! CFormat ("You emote to everybody: %s%s%s %s%s", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), (LPCTSTR) m_strOurChatName, --- 7213,7219 ---- { if (Emote) ChatNote (eChatOutgoingEverybody, ! TFormat ("You emote to everybody: %s%s%s %s%s", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), (LPCTSTR) m_strOurChatName, *************** *** 7209,7215 **** (LPCTSTR) AnsiCode (ANSI_TEXT_RED))); else ChatNote (eChatOutgoingEverybody, ! CFormat ("You chat to everybody, '%s%s%s%s'", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), Message, --- 7221,7227 ---- (LPCTSTR) AnsiCode (ANSI_TEXT_RED))); else ChatNote (eChatOutgoingEverybody, ! TFormat ("You chat to everybody, '%s%s%s%s'", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), Message, *************** *** 7219,7225 **** else { ChatNote (eChatOutgoingEverybody, ! "No (relevant) chat connections."); return eNoChatConnections; } } --- 7231,7237 ---- else { ChatNote (eChatOutgoingEverybody, ! Translate ("No (relevant) chat connections.")); return eNoChatConnections; } } *************** *** 7238,7249 **** if (!pSocket) { ! ChatNote (eChatOutgoingPersonal, CFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } if (Emote) ! strMessage = CFormat ("\nTo you, %s%s%s %s%s\n", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), (LPCTSTR) m_strOurChatName, --- 7250,7261 ---- if (!pSocket) { ! ChatNote (eChatOutgoingPersonal, TFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } if (Emote) ! strMessage = TFormat ("\nTo you, %s%s%s %s%s\n", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), (LPCTSTR) m_strOurChatName, *************** *** 7251,7257 **** (LPCTSTR) AnsiCode (ANSI_TEXT_RED) ); else ! strMessage = CFormat ("\n%s chats to you, '%s%s%s%s'\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 7263,7269 ---- (LPCTSTR) AnsiCode (ANSI_TEXT_RED) ); else ! strMessage = TFormat ("\n%s chats to you, '%s%s%s%s'\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 7264,7270 **** if (Emote) ChatNote (eChatOutgoingPersonal, ! CFormat ("You emote to %s: %s%s%s %s%s", (LPCTSTR) pSocket->m_strRemoteUserName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 7276,7282 ---- if (Emote) ChatNote (eChatOutgoingPersonal, ! TFormat ("You emote to %s: %s%s%s %s%s", (LPCTSTR) pSocket->m_strRemoteUserName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 7273,7279 **** (LPCTSTR) AnsiCode (ANSI_TEXT_RED))); else ChatNote (eChatOutgoingPersonal, ! CFormat ("You chat to %s, '%s%s%s%s'", (LPCTSTR) pSocket->m_strRemoteUserName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 7285,7291 ---- (LPCTSTR) AnsiCode (ANSI_TEXT_RED))); else ChatNote (eChatOutgoingPersonal, ! TFormat ("You chat to %s, '%s%s%s%s'", (LPCTSTR) pSocket->m_strRemoteUserName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 7306,7317 **** if (iCount == 0) { ! ChatNote (eChatOutgoingPersonal, CFormat ("%s is not connected.", Who)); return eChatPersonNotFound; } else if (iCount > 1) ! ChatNote (eChatOutgoingPersonal, CFormat ("%i matches.", iCount)); return eOK; } --- 7318,7329 ---- if (iCount == 0) { ! ChatNote (eChatOutgoingPersonal, TFormat ("%s is not connected.", Who)); return eChatPersonNotFound; } else if (iCount > 1) ! ChatNote (eChatOutgoingPersonal, TFormat ("%i matches.", iCount)); return eOK; } *************** *** 7324,7330 **** CString strMessage; if (Emote) ! strMessage = CFormat ("%-15s\nTo the group, %s%s%s %s%s\n", Group, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 7336,7342 ---- CString strMessage; if (Emote) ! strMessage = TFormat ("%-15s\nTo the group, %s%s%s %s%s\n", Group, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 7332,7338 **** Message, (LPCTSTR) AnsiCode (ANSI_TEXT_RED)); else ! strMessage = CFormat ("%-15s\n%s chats to the group, '%s%s%s%s'\n", Group, (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), --- 7344,7350 ---- Message, (LPCTSTR) AnsiCode (ANSI_TEXT_RED)); else ! strMessage = TFormat ("%-15s\n%s chats to the group, '%s%s%s%s'\n", Group, (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), *************** *** 7351,7357 **** { if (Emote) ChatNote (eChatOutgoingGroup, ! CFormat ("You emote to the group %s: %s%s%s %s%s", Group, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 7363,7369 ---- { if (Emote) ChatNote (eChatOutgoingGroup, ! TFormat ("You emote to the group %s: %s%s%s %s%s", Group, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 7360,7366 **** (LPCTSTR) AnsiCode (ANSI_TEXT_RED))); else ChatNote (eChatOutgoingGroup, ! CFormat ("You chat to the group %s, '%s%s%s%s'", Group, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 7372,7378 ---- (LPCTSTR) AnsiCode (ANSI_TEXT_RED))); else ChatNote (eChatOutgoingGroup, ! TFormat ("You chat to the group %s, '%s%s%s%s'", Group, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 7372,7378 **** else { ChatNote (eChatOutgoingGroup, ! CFormat ("No chat connections in the group %s.", Group)); return eNoChatConnections; } --- 7384,7390 ---- else { ChatNote (eChatOutgoingGroup, ! TFormat ("No chat connections in the group %s.", Group)); return eNoChatConnections; } *************** *** 7400,7406 **** if (strMessage.GetLength () > m_iMaxChatBytesPerMessage) { strMessage = strMessage.Left (m_iMaxChatBytesPerMessage); ! strMessage += CFormat ("\n[Chat message truncated, exceeds %i bytes]", m_iMaxChatBytesPerMessage); } } // end of byte count check wanted --- 7412,7418 ---- if (strMessage.GetLength () > m_iMaxChatBytesPerMessage) { strMessage = strMessage.Left (m_iMaxChatBytesPerMessage); ! strMessage += TFormat ("\n[Chat message truncated, exceeds %i bytes]", m_iMaxChatBytesPerMessage); } } // end of byte count check wanted *************** *** 7425,7431 **** } // end of buffer scan strMessage.ReleaseBuffer (-1); if (iLines >= m_iMaxChatLinesPerMessage && p [1]) ! strMessage += CFormat ("\n[Chat message truncated, exceeds %i lines]", m_iMaxChatLinesPerMessage); } // end of line count check wanted --- 7437,7443 ---- } // end of buffer scan strMessage.ReleaseBuffer (-1); if (iLines >= m_iMaxChatLinesPerMessage && p [1]) ! strMessage += TFormat ("\n[Chat message truncated, exceeds %i lines]", m_iMaxChatLinesPerMessage); } // end of line count check wanted *************** *** 7501,7507 **** m_bAcceptIncomingChatConnections = true; } ! Frame.SetStatusMessageNow (CFormat ("Accepting chat calls on port %d", m_IncomingChatPort)); m_pChatListenSocket = new CChatListenSocket (this); --- 7513,7519 ---- m_bAcceptIncomingChatConnections = true; } ! Frame.SetStatusMessageNow (TFormat ("Accepting chat calls on port %d", m_IncomingChatPort)); m_pChatListenSocket = new CChatListenSocket (this); *************** *** 7515,7521 **** delete m_pChatListenSocket; m_pChatListenSocket = NULL; ChatNote (eChatConnection, ! CFormat ( "Cannot accept calls on port %i, code = %i (%s)", m_IncomingChatPort, nError, --- 7527,7533 ---- delete m_pChatListenSocket; m_pChatListenSocket = NULL; ChatNote (eChatConnection, ! TFormat ( "Cannot accept calls on port %i, code = %i (%s)", m_IncomingChatPort, nError, *************** *** 7526,7532 **** m_pChatListenSocket->Listen (); ChatNote (eChatConnection, ! CFormat ( "Listening for chat connections on port %d", m_IncomingChatPort)); return eOK; --- 7538,7544 ---- m_pChatListenSocket->Listen (); ChatNote (eChatConnection, ! TFormat ( "Listening for chat connections on port %d", m_IncomingChatPort)); return eOK; *************** *** 7682,7688 **** if (App.m_iCounterFrequency) QueryPerformanceCounter (&pSocket->m_iPingStartTime); ! CString strMessage = CTime::GetCurrentTime().Format ("%A, %B %d, %Y, %#I:%M %p"); pSocket->SendChatMessage (CHAT_PING_REQUEST, strMessage); --- 7694,7700 ---- if (App.m_iCounterFrequency) QueryPerformanceCounter (&pSocket->m_iPingStartTime); ! CString strMessage = CTime::GetCurrentTime().Format (TranslateTime ("%A, %B %d, %Y, %#I:%M %p")); pSocket->SendChatMessage (CHAT_PING_REQUEST, strMessage); *************** *** 7721,7727 **** return eChatIDNotFound; ChatNote (eChatConnection, ! CFormat ("Connection to %s dropped.", (LPCTSTR) pSocket->m_strRemoteUserName)); pSocket->OnClose (0); // close connection --- 7733,7739 ---- return eChatIDNotFound; ChatNote (eChatConnection, ! TFormat ("Connection to %s dropped.", (LPCTSTR) pSocket->m_strRemoteUserName)); pSocket->OnClose (0); // close connection *************** *** 7742,7748 **** } } // end of all chat sessions ChatNote (eChatConnection, ! CFormat ("%i connection%s closed.", PLURAL (iCount))); return iCount; --- 7754,7760 ---- } } // end of all chat sessions ChatNote (eChatConnection, ! TFormat ("%i connection%s closed.", PLURAL (iCount))); return iCount; *************** *** 7962,8012 **** if (strOptionName == "can_send_commands") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("You can now send %s commands", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("You can no longer send %s commands", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "can_send_files") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("You can now send %s files", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("You can no longer send %s files", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "can_snoop") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("You can now snoop %s", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("You can no longer snoop %s", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "ignore") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("%s is ignoring you", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("%s is no longer ignoring you", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "private") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("%s has marked your connection as private", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("%s has marked your connection as public", (LPCTSTR) m_strOurChatName)); } // end of succesfully changing the option --- 7974,8024 ---- if (strOptionName == "can_send_commands") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("You can now send %s commands", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("You can no longer send %s commands", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "can_send_files") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("You can now send %s files", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("You can no longer send %s files", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "can_snoop") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("You can now snoop %s", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("You can no longer snoop %s", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "ignore") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("%s is ignoring you", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("%s is no longer ignoring you", (LPCTSTR) m_strOurChatName)); else if (strOptionName == "private") if (iValue) chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("%s has marked your connection as private", (LPCTSTR) m_strOurChatName)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("%s has marked your connection as public", (LPCTSTR) m_strOurChatName)); } // end of succesfully changing the option *************** *** 8046,8056 **** if (strOptionName == "group") if (strlen (Value) > 0) chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("%s has added you to the group %s", (LPCTSTR) m_strOurChatName, Value)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! CFormat ("%s has removed you from the chat group", (LPCTSTR) m_strOurChatName)); } // end of succesfully changing the option --- 8058,8068 ---- if (strOptionName == "group") if (strlen (Value) > 0) chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("%s has added you to the group %s", (LPCTSTR) m_strOurChatName, Value)); else chat_item->SendChatMessage (CHAT_MESSAGE, ! TFormat ("%s has removed you from the chat group", (LPCTSTR) m_strOurChatName)); } // end of succesfully changing the option *************** *** 8083,8089 **** if (GetChatSocket (id) == NULL) { ChatNote (eChatInformation, ! CFormat ("Chat ID %ld is not connected.", id)); return 0; } --- 8095,8101 ---- if (GetChatSocket (id) == NULL) { ChatNote (eChatInformation, ! TFormat ("Chat ID %ld is not connected.", id)); return 0; } *************** *** 8100,8106 **** } // end of all chat sessions ChatNote (eChatInformation, ! CFormat ("Cannot find connection \"%s\".", (LPCTSTR) strWho)); return 0; // not found --- 8112,8118 ---- } // end of all chat sessions ChatNote (eChatInformation, ! TFormat ("Cannot find connection \"%s\".", (LPCTSTR) strWho)); return 0; // not found *************** *** 8118,8124 **** if (!pSocket) { ! ChatNote (eChatOutgoingPersonal, CFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } --- 8130,8136 ---- if (!pSocket) { ! ChatNote (eChatOutgoingPersonal, TFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } *************** *** 8129,8135 **** CString strMessage; ! strMessage = CFormat ("\n%s pastes to you: \n\n%s%s%s%s\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 8141,8147 ---- CString strMessage; ! strMessage = TFormat ("\n%s pastes to you: \n\n%s%s%s%s\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 8139,8145 **** pSocket->SendChatMessage (CHAT_TEXT_PERSONAL, strMessage); ChatNote (eChatOutgoingPersonal, ! CFormat ("You paste to %s: \n\n%s%s%s%s", (LPCTSTR) pSocket->m_strRemoteUserName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 8151,8157 ---- pSocket->SendChatMessage (CHAT_TEXT_PERSONAL, strMessage); ChatNote (eChatOutgoingPersonal, ! TFormat ("You paste to %s: \n\n%s%s%s%s", (LPCTSTR) pSocket->m_strRemoteUserName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 8158,8164 **** CString strMessage; ! strMessage = CFormat ("\n%s pastes to everybody: \n\n%s%s%s%s\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), --- 8170,8176 ---- CString strMessage; ! strMessage = TFormat ("\n%s pastes to everybody: \n\n%s%s%s%s\n", (LPCTSTR) m_strOurChatName, (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), *************** *** 8176,8182 **** 0)) // use our stamp { ChatNote (eChatOutgoingEverybody, ! CFormat ("You paste to everybody: \n\n%s%s%s%s", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), (LPCTSTR) strContents, --- 8188,8194 ---- 0)) // use our stamp { ChatNote (eChatOutgoingEverybody, ! TFormat ("You paste to everybody: \n\n%s%s%s%s", (LPCTSTR) AnsiCode (ANSI_BOLD), (LPCTSTR) AnsiCode (ANSI_TEXT_CYAN), (LPCTSTR) strContents, *************** *** 8205,8221 **** if (!pSocket) { ! ChatNote (eChatFile, CFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } if (pSocket->m_bDoingFileTransfer) { if (pSocket->m_bSendFile) ! ChatNote (eChatFile, CFormat ("Already sending file %s", (LPCTSTR) pSocket->m_strOurFileName)); else ! ChatNote (eChatFile, CFormat ("Already receiving file %s", (LPCTSTR) pSocket->m_strOurFileName)); return eAlreadyTransferringFile; --- 8217,8233 ---- if (!pSocket) { ! ChatNote (eChatFile, TFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } if (pSocket->m_bDoingFileTransfer) { if (pSocket->m_bSendFile) ! ChatNote (eChatFile, TFormat ("Already sending file %s", (LPCTSTR) pSocket->m_strOurFileName)); else ! ChatNote (eChatFile, TFormat ("Already receiving file %s", (LPCTSTR) pSocket->m_strOurFileName)); return eAlreadyTransferringFile; *************** *** 8256,8262 **** catch (CFileException * e) { ! ChatNote (eChatFile, CFormat ("File %s cannot be opened.", (LPCTSTR) strName)); e->Delete (); // reset the two fields we changed so far pSocket->m_strOurFileName.Empty (); --- 8268,8274 ---- catch (CFileException * e) { ! ChatNote (eChatFile, TFormat ("File %s cannot be opened.", (LPCTSTR) strName)); e->Delete (); // reset the two fields we changed so far pSocket->m_strOurFileName.Empty (); *************** *** 8273,8279 **** // ask them to receive the file pSocket->SendChatMessage (CHAT_FILE_START, ! CFormat ("%s,%ld", (LPCTSTR) pSocket->m_strSenderFileName, pSocket->m_iFileSize)); --- 8285,8291 ---- // ask them to receive the file pSocket->SendChatMessage (CHAT_FILE_START, ! TFormat ("%s,%ld", (LPCTSTR) pSocket->m_strSenderFileName, pSocket->m_iFileSize)); *************** *** 8289,8295 **** shsInit (&pSocket->m_shsInfo); double K = pSocket->m_iFileSize / 1024.0; ! ChatNote (eChatFile, CFormat ( "Initiated transfer of file %s, %ld bytes (%1.1f Kb).", (LPCTSTR) strName, pSocket->m_iFileSize, --- 8301,8307 ---- shsInit (&pSocket->m_shsInfo); double K = pSocket->m_iFileSize / 1024.0; ! ChatNote (eChatFile, TFormat ( "Initiated transfer of file %s, %ld bytes (%1.1f Kb).", (LPCTSTR) strName, pSocket->m_iFileSize, *************** *** 8310,8316 **** if (!pSocket) { ! ChatNote (eChatOutgoingPersonal, CFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } --- 8322,8328 ---- if (!pSocket) { ! ChatNote (eChatOutgoingPersonal, TFormat ("Chat ID %i is not connected.", ID)); return eChatIDNotFound; } Index: mushclient.clw =================================================================== RCS file: /cvs/mushclient/mushclient.clw,v retrieving revision 1.329 retrieving revision 1.334 diff -c -r1.329 -r1.334 *** mushclient.clw 8 Jun 2007 01:30:36 -0000 1.329 --- mushclient.clw 12 Jun 2007 04:01:56 -0000 1.334 *************** *** 2,8 **** [General Info] Version=1 ! LastClass=CPluginsDlg LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "mushclient.h" --- 2,8 ---- [General Info] Version=1 ! LastClass=CGlobalPrefsP2 LastTemplate=CDialog NewFileInclude1=#include "stdafx.h" NewFileInclude2=#include "mushclient.h" *************** *** 146,269 **** Class131=CWorldConfiguration ResourceCount=129 ! Resource1=IDD_TAB_COMPLETION_DEFAULTS_DLG ! Resource2=IDD_MAP_MOVE ! Resource3=IDD_IMMEDIATE ! Resource4=IDR_NORMALTYPE ! Resource5=IDD_PREFS_P9 ! Resource6=IDD_CHAT_CALL ! Resource7=IDD_PLUGINWIZARDPAGE6 ! Resource8=IDD_LINE_COUNT ! Resource9=IDD_EDIT_ALIAS ! Resource10=IDD_PLUGINWIZARDPAGE8 ! Resource11=CG_IDR_POPUP_MAIN_FRAME ! Resource12=IDD_PLUGINS ! Resource13=IDD_PREFS_P2 ! Resource14=IDD_MXP_SCRIPTS ! Resource15=IDR_ACTIVITYTYPE ! Resource16=IDD_PREFS_P16 ! Resource17=IDD_SEND_TO_ALL ! Resource18=IDD_CHAT_SAY_ALL ! Resource19=IDD_SCRIPT_ERROR ! Resource20=IDD_GLOBAL_PREFSP4 ! Resource21=IDD_PLUGINWIZARDPAGE3 ! Resource22=IDD_GLOBAL_PREFSP6 ! Resource23=IDD_REGEXP_PROBLEM ! Resource24=IDD_LUA_CHOOSE ! Resource25=CG_IDR_POPUP_ACTIVITY_VIEW ! Resource26=IDD_LUA_GSUB ! Resource27=IDD_PREFS_P21 ! Resource28=IDD_INSERT_UNICODE ! Resource29=IDD_GENERATED_NAME ! Resource30=IDD_EDIT ! Resource31=IDD_CHAT_EMOTE_ALL ! Resource32=IDD_PROXY_PASSWORD ! Resource33=IDD_GLOBAL_PREFSP11 ! Resource34=IDD_IMPORT_XML ! Resource35=IDD_PASSWORD ! Resource36=IDD_COLOUR_PICKER ! Resource37=IDD_GLOBAL_PREFSP7 ! Resource38=IDD_LUA_CHOOSE_LIST_MULTI ! Resource39=IDD_PREFS_P6 ! Resource40=IDR_RIGHT_TRAY_MENU ! Resource41=IDD_GLOBAL_CHANGE ! Resource42=IDD_GLOBAL_PREFSP9 ! Resource43=IDD_TEXT_ATTRIBUTES ! Resource44=IDD_TEST_RESULT ! Resource45=IDD_PREFS_P8 ! Resource46=IDD_ASCII_ART ! Resource47=IDD_COMPLETE_WORD ! Resource48=IDD_GENERATE_UNIQUE_ID ! Resource49=IDD_PREFS_P22 ! Resource50=IDD_PREFS_P10 ! Resource51=IDR_COLOUR_POPUP ! Resource52=IDD_FUNCTION_LIST ! Resource53=IDD_PLUGINWIZARDPAGE2 ! Resource54=IDD_GLOBAL_PREFSP3 ! Resource55=CG_IDD_PROGRESS ! Resource56=IDD_LUA_INPUTEDIT ! Resource57=IDD_COMMAND_OPTIONS ! Resource58=IDD_MAPPER ! Resource59=IDD_PREFS_P23 ! Resource60=IDD_GLOBAL_PREFSP10 ! Resource61=CG_IDR_POPUP_SEND_VIEW ! Resource62=IDD_CHAT_LIST ! Resource63=IDD_LUA_CHOOSE_LIST ! Resource64=IDD_HIGHLIGHT ! Resource65=IDD_PREFS_P11 ! Resource66=IDD_PLUGINWIZARDPAGE1 ! Resource67=IDR_NON_MENU_ITEMS ! Resource68=IDD_EDIT_VARIABLE ! Resource69=IDD_PREFS_P18 ! Resource70=IDD_PREFS_P17 ! Resource71=IDD_INFO ! Resource72=IDD_CREDITS ! Resource73=IDD_WINSOCK_INFO ! Resource74=IDD_QUICK_CONNECT ! Resource75=IDD_PREFS_P4 ! Resource76=IDD_RECALL ! Resource77=IDD_EDIT_TRIGGER ! Resource78=IDR_MAINFRAME ! Resource79=IDD_FIND ! Resource80=IDD_PLUGINWIZARDPAGE4 ! Resource81=IDD_TEST_TRIGGER ! Resource82=IDD_PREFS_P19 ! Resource83=IDD_CHAT_DETAILS ! Resource84=IDD_PREFS_P13 ! Resource85=CG_IDR_POPUP_MUSHVIEW ! Resource86=IDD_COMMAND_HISTORY ! Resource87=IDR_GAME_TOOLBAR ! Resource88=IDD_GOTO ! Resource89=IDD_LUA_INPUTBOX ! Resource90=IDD_MAP_COMMENT ! Resource91=IDD_SPELLCHECK_DIALOG ! Resource92=IDD_PREFS_P3 ! Resource93=IDR_MUSHCLTYPE ! Resource94=IDR_MXP_MENU ! Resource95=IDD_PASTE_PREAMBLES ! Resource96=IDD_PREFS_P14 ! Resource97=IDD_PREFS_P1 ! Resource98=IDD_WELCOME ! Resource99=IDD_PLUGINWIZARDPAGE7 ! Resource100=IDD_EDIT_MULTILINE ! Resource101=IDD_GLOBAL_PREFSP13 ! Resource102=IDD_MISSING_ENTRY_POINTS ! Resource103=IDD_PREFS_P20 ! Resource104=ID_RECALL_WINDOW ! Resource105=IDD_PREFERENCES ! Resource106=IDD_PLUGINWIZARDPAGE5 ! Resource107=IDD_GLOBAL_PREFSP5 ! Resource108=IDD_GLOBAL_PREFSP12 ! Resource109=IDD_PREFS_P12 ! Resource110=IDD_EDIT_TIMER ! Resource111=IDD_WELCOME1 ! Resource112=IDR_REGEXP_MENU ! Resource113=IDD_PREFS_P5 ! Resource114=IDD_LUA_DEBUG ! Resource115=IDD_CHOOSE_NOTEPAD ! Resource116=IDD_KEY_NAME ! Resource117=IDD_GLOBAL_PREFSP2 ! Resource118=IDR_PANETYPE Class132=CChatListDlg Class133=CChatCallDlg Class134=CChatToAllDlg --- 146,269 ---- Class131=CWorldConfiguration ResourceCount=129 ! Resource1=IDD_GENERATE_UNIQUE_ID ! Resource2=CG_IDR_POPUP_SEND_VIEW ! Resource3=IDD_MAP_COMMENT ! Resource4=IDD_PREFS_P10 ! Resource5=IDD_RECALL ! Resource6=IDD_PLUGINWIZARDPAGE5 ! Resource7=IDD_PREFS_P18 ! Resource8=IDD_PREFS_P20 ! Resource9=IDD_SEND_TO_ALL ! Resource10=IDD_FIND ! Resource11=IDD_PREFS_P13 ! Resource12=IDR_MAINFRAME ! Resource13=IDD_WELCOME ! Resource14=IDR_ACTIVITYTYPE ! Resource15=IDR_MXP_MENU ! Resource16=IDD_COMMAND_OPTIONS ! Resource17=IDD_LUA_GSUB ! Resource18=IDD_PLUGINWIZARDPAGE6 ! Resource19=IDD_LUA_CHOOSE_LIST_MULTI ! Resource20=IDD_IMPORT_XML ! Resource21=IDD_GLOBAL_PREFSP6 ! Resource22=IDD_EDIT_MULTILINE ! Resource23=IDD_COMMAND_HISTORY ! Resource24=IDD_PREFS_P5 ! Resource25=IDD_PREFS_P14 ! Resource26=IDD_PREFS_P7 ! Resource27=IDD_GLOBAL_PREFSP11 ! Resource28=IDD_TEST_RESULT ! Resource29=IDD_COMPLETE_WORD ! Resource30=CG_IDR_POPUP_MUSHVIEW ! Resource31=IDD_PLUGINWIZARDPAGE7 ! Resource32=IDD_MISSING_ENTRY_POINTS ! Resource33=IDD_ABOUTBOX ! Resource34=IDR_PANETYPE ! Resource35=IDD_CREDITS ! Resource36=IDD_PASTE_PREAMBLES ! Resource37=IDD_PROXY_PASSWORD ! Resource38=IDD_EDIT_TRIGGER ! Resource39=IDD_GLOBAL_CHANGE ! Resource40=IDD_EDIT_TIMER ! Resource41=IDD_MULTILINE_TRIGGER ! Resource42=IDD_LUA_INPUTEDIT ! Resource43=IDD_KEY_NAME ! Resource44=IDD_SCRIPT_ERROR ! Resource45=ID_RECALL_WINDOW ! Resource46=IDD_MXP_SCRIPTS ! Resource47=IDD_PREFS_P8 ! Resource48=IDD_PREFS_P3 ! Resource49=IDR_RIGHT_TRAY_MENU ! Resource50=IDD_GOTO ! Resource51=IDD_PREFS_P15 ! Resource52=IDD_EDIT_MACRO ! Resource53=IDD_WINSOCK_INFO ! Resource54=IDD_PREFS_P22 ! Resource55=IDD_CHAT_SAY_ALL ! Resource56=IDD_PREFS_P9 ! Resource57=CG_IDR_POPUP_ACTIVITY_VIEW ! Resource58=IDD_EDIT ! Resource59=IDD_PLUGINWIZARDPAGE3 ! Resource60=IDD_SPELLCHECK_DIALOG ! Resource61=IDD_PREFS_P12 ! Resource62=IDD_PLUGINWIZARDPAGE4 ! Resource63=IDD_PREFS_P6 ! Resource64=IDD_PREFS_P2 ! Resource65=IDD_GLOBAL_PREFSP10 ! Resource66=IDD_GLOBAL_PREFSP4 ! Resource67=IDD_PREFS_P11 ! Resource68=IDD_CHAT_LIST ! Resource69=IDD_PREFS_P23 ! Resource70=IDD_INFO ! Resource71=IDD_PLUGINWIZARDPAGE2 ! Resource72=IDD_GLOBAL_PREFSP13 ! Resource73=IDR_NORMALTYPE ! Resource74=IDD_HIGHLIGHT ! Resource75=IDD_QUICK_CONNECT ! Resource76=IDD_FUNCTION_LIST ! Resource77=IDD_GENERATED_NAME ! Resource78=IDD_GLOBAL_PREFSP2 ! Resource79=IDD_CHAT_CALL ! Resource80=IDD_IMMEDIATE ! Resource81=IDD_TEXT_ATTRIBUTES ! Resource82=IDD_CHAT_EMOTE_ALL ! Resource83=IDD_PLUGINWIZARDPAGE8 ! Resource84=IDD_MAPPER ! Resource85=IDD_TIP ! Resource86=IDD_GLOBAL_PREFSP7 ! Resource87=IDD_GLOBAL_PREFSP3 ! Resource88=IDD_LUA_DEBUG ! Resource89=IDD_PREFS_P4 ! Resource90=IDD_PLUGINWIZARDPAGE1 ! Resource91=IDD_TEST_TRIGGER ! Resource92=IDD_WELCOME1 ! Resource93=IDR_REGEXP_MENU ! Resource94=IDD_PREFS_P16 ! Resource95=IDR_NON_MENU_ITEMS ! Resource96=IDD_MAP_MOVE ! Resource97=IDD_PREFS_P21 ! Resource98=IDD_GLOBAL_PREFSP12 ! Resource99=IDD_EDIT_VARIABLE ! Resource100=IDR_GAME_TOOLBAR ! Resource101=IDD_PREFS_P1 ! Resource102=CG_IDD_PROGRESS ! Resource103=IDD_CHAT_DETAILS ! Resource104=IDD_LUA_CHOOSE_LIST ! Resource105=IDD_LUA_INPUTBOX ! Resource106=IDD_PREFS_P17 ! Resource107=IDD_PLUGINS ! Resource108=IDD_LINE_COUNT ! Resource109=IDD_CHOOSE_NOTEPAD ! Resource110=CG_IDR_POPUP_MAIN_FRAME ! Resource111=IDD_REGEXP_PROBLEM ! Resource112=IDR_MUSHCLTYPE ! Resource113=IDD_TAB_COMPLETION_DEFAULTS_DLG ! Resource114=IDD_TEST_COMMAND ! Resource115=IDD_INSERT_UNICODE ! Resource116=IDD_EDIT_ALIAS ! Resource117=IDD_COLOUR_PICKER ! Resource118=IDD_GLOBAL_PREFSP1 Class132=CChatListDlg Class133=CChatCallDlg Class134=CChatToAllDlg *************** *** 279,300 **** Class144=CGlobalPrefsP13 Class145=UDPsocket Class146=CRegisterMUSHclient ! Resource119=IDD_TIP Class147=CHighlightPhraseDlg ! Resource120=IDD_ABOUTBOX Class148=CUniqueIDDlg ! Resource121=IDD_PREFS_P7 ! Resource122=IDD_EDIT_MACRO Class149=CMultiLineTriggerDlg ! Resource123=IDD_MULTILINE_TRIGGER Class150=CLuaInputBox ! Resource124=IDD_DEBUG_INPUT Class151=CLuaChooseBox ! Resource125=IDD_PREFS_P15 Class152=CLuaChooseList ! Resource126=IDD_GLOBAL_PREFSP1 Class153=CFunctionListDlg ! Resource127=IDD_PREFS_P0 Class154=CLuaGsubDlg Class155=CCompleteWordDlg Class156=CLuaInputEditDlg --- 279,300 ---- Class144=CGlobalPrefsP13 Class145=UDPsocket Class146=CRegisterMUSHclient ! Resource119=IDD_GLOBAL_PREFSP5 Class147=CHighlightPhraseDlg ! Resource120=IDD_PREFS_P19 Class148=CUniqueIDDlg ! Resource121=IDD_PREFS_P0 ! Resource122=IDD_PREFERENCES Class149=CMultiLineTriggerDlg ! Resource123=IDD_PASSWORD Class150=CLuaInputBox ! Resource124=IDR_COLOUR_POPUP Class151=CLuaChooseBox ! Resource125=IDD_ASCII_ART Class152=CLuaChooseList ! Resource126=IDD_DEBUG_INPUT Class153=CFunctionListDlg ! Resource127=IDD_LUA_CHOOSE Class154=CLuaGsubDlg Class155=CCompleteWordDlg Class156=CLuaInputEditDlg *************** *** 302,308 **** Class158=CLuaChooseListMulti Class159=CDebugLuaDlg Class160=CSpellCheckDlg ! Resource128=IDD_TEST_COMMAND Class161=CInsertUnicodeDlg Resource129=IDR_ACTIVITY_TOOLBAR --- 302,308 ---- Class158=CLuaChooseListMulti Class159=CDebugLuaDlg Class160=CSpellCheckDlg ! Resource128=IDD_GLOBAL_PREFSP9 Class161=CInsertUnicodeDlg Resource129=IDR_ACTIVITY_TOOLBAR *************** *** 1552,1558 **** [DLG:IDD_GLOBAL_PREFSP2] Type=1 Class=CGlobalPrefsP2 ! ControlCount=27 Control1=IDC_AUTO_CONNECT,button,1342242819 Control2=IDC_RECONNECT,button,1342242819 Control3=IDC_OPEN_WORLDS_MAXIMISED,button,1342242819 --- 1552,1558 ---- [DLG:IDD_GLOBAL_PREFSP2] Type=1 Class=CGlobalPrefsP2 ! ControlCount=29 Control1=IDC_AUTO_CONNECT,button,1342242819 Control2=IDC_RECONNECT,button,1342242819 Control3=IDC_OPEN_WORLDS_MAXIMISED,button,1342242819 *************** *** 1579,1585 **** Control24=IDC_STATIC,button,1342177287 Control25=IDC_ENABLE_SPELL_CHECK,button,1342242819 Control26=IDC_STATIC,static,1342308352 ! Control27=IDC_TABS,combobox,1344339971 [DLG:IDD_GLOBAL_PREFSP3] Type=1 --- 1579,1587 ---- Control24=IDC_STATIC,button,1342177287 Control25=IDC_ENABLE_SPELL_CHECK,button,1342242819 Control26=IDC_STATIC,static,1342308352 ! Control27=IDC_LOCALE,edit,1350631560 ! Control28=IDC_STATIC,static,1342308352 ! Control29=IDC_TABS,combobox,1344339971 [DLG:IDD_GLOBAL_PREFSP3] Type=1 Index: mushclient.hlp =================================================================== RCS file: /cvs/mushclient/mushclient.hlp,v retrieving revision 1.78 retrieving revision 1.79 diff -c -r1.78 -r1.79 Binary files /tmp/cvszODhXf and /tmp/cvslaExMM differ Index: mushview.cpp =================================================================== RCS file: /cvs/mushclient/mushview.cpp,v retrieving revision 1.81 retrieving revision 1.84 diff -c -r1.81 -r1.84 *** mushview.cpp 31 May 2007 01:44:30 -0000 1.81 --- mushview.cpp 12 Jun 2007 04:02:02 -0000 1.84 *************** *** 1584,1602 **** { case eNoSuchPlugin: pDoc->ColourNote ("white", "red", ! CFormat ("Plugin \"%s\" is not installed", (LPCTSTR) strName)); break; case eNoSuchRoutine: pDoc->ColourNote ("white", "red", ! CFormat ("Script routine \"%s\" is not in plugin %s", (LPCTSTR) strScriptName, (LPCTSTR) strName)); break; case eErrorCallingPluginRoutine: pDoc->ColourNote ("white", "red", ! CFormat ("An error occurred calling plugin %s", (LPCTSTR) strName)); break; --- 1584,1602 ---- { case eNoSuchPlugin: pDoc->ColourNote ("white", "red", ! TFormat ("Plugin \"%s\" is not installed", (LPCTSTR) strName)); break; case eNoSuchRoutine: pDoc->ColourNote ("white", "red", ! TFormat ("Script routine \"%s\" is not in plugin %s", (LPCTSTR) strScriptName, (LPCTSTR) strName)); break; case eErrorCallingPluginRoutine: pDoc->ColourNote ("white", "red", ! TFormat ("An error occurred calling plugin %s", (LPCTSTR) strName)); break; *************** *** 1648,1659 **** if (strAction.Left (7).CompareNoCase ("http://") != 0 && strAction.Left (8).CompareNoCase ("https://") != 0 && strAction.Left (7).CompareNoCase ("mailto:") != 0) ! ::AfxMessageBox(CFormat ("Hyperlink action \"%s\" - permission denied.", (const char *) strAction), MB_ICONEXCLAMATION); else if ((long) ShellExecute (Frame, _T("open"), strAction, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to open the hyperlink \"%s\"", (const char *) strAction), MB_ICONEXCLAMATION); return; --- 1648,1659 ---- if (strAction.Left (7).CompareNoCase ("http://") != 0 && strAction.Left (8).CompareNoCase ("https://") != 0 && strAction.Left (7).CompareNoCase ("mailto:") != 0) ! ::UMessageBox(TFormat ("Hyperlink action \"%s\" - permission denied.", (const char *) strAction), MB_ICONEXCLAMATION); else if ((long) ShellExecute (Frame, _T("open"), strAction, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::UMessageBox(TFormat ("Unable to open the hyperlink \"%s\"", (const char *) strAction), MB_ICONEXCLAMATION); return; *************** *** 3071,3077 **** print_font (pcb, FONT_BOLD | FONT_UNDERLINE); CString strTime; ! strTime = pLine->m_theTime.Format ("%A, %B %d, %Y, %#I:%M %p"); if (print_printline (pcb, 2, "%s - %s", (LPCTSTR) pDoc->m_mush_name, --- 3071,3077 ---- print_font (pcb, FONT_BOLD | FONT_UNDERLINE); CString strTime; ! strTime = pLine->m_theTime.Format (TranslateTime ("%A, %B %d, %Y, %#I:%M %p")); if (print_printline (pcb, 2, "%s - %s", (LPCTSTR) pDoc->m_mush_name, *************** *** 3205,3211 **** print_end_document (pcb); if (pcb.cancelled) ! ::AfxMessageBox ("Printing cancelled"); pDoc->ShowStatusLine (); --- 3205,3211 ---- print_end_document (pcb); if (pcb.cancelled) ! ::TMessageBox ("Printing cancelled"); pDoc->ShowStatusLine (); *************** *** 3660,3668 **** strSelectionUpper.MakeUpper (); if (strSelection.IsEmpty ()) ! ::AfxMessageBox ("No URL selected", MB_ICONEXCLAMATION); else if (strSelection.GetLength () > 512) ! ::AfxMessageBox ("URL too long", MB_ICONEXCLAMATION); else { if (strSelectionUpper.Left (15).Find ("://") == -1) --- 3660,3668 ---- strSelectionUpper.MakeUpper (); if (strSelection.IsEmpty ()) ! ::TMessageBox ("No URL selected", MB_ICONEXCLAMATION); else if (strSelection.GetLength () > 512) ! ::TMessageBox ("URL too long", MB_ICONEXCLAMATION); else { if (strSelectionUpper.Left (15).Find ("://") == -1) *************** *** 3672,3678 **** strSelection.Replace ("\"", "\\\""); if ((long) ShellExecute (Frame, _T("open"), strSelection, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to open the URL \"%s\"", (const char *) strSelection), MB_ICONEXCLAMATION); } // end of non-empty selection --- 3672,3678 ---- strSelection.Replace ("\"", "\\\""); if ((long) ShellExecute (Frame, _T("open"), strSelection, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::UMessageBox(TFormat ("Unable to open the URL \"%s\"", (const char *) strSelection), MB_ICONEXCLAMATION); } // end of non-empty selection *************** *** 3702,3712 **** strSelectionUpper.MakeUpper (); if (strSelection.IsEmpty ()) ! ::AfxMessageBox ("No email address selected", MB_ICONEXCLAMATION); else if (strSelection.GetLength () > 128) ! ::AfxMessageBox ("Email address too long", MB_ICONEXCLAMATION); else if (strSelection.Find ('@') == -1) ! ::AfxMessageBox (CFormat ("Email address \"%s\" invalid - does not contain a \"@\"", (const char *) strSelection), MB_ICONEXCLAMATION); else { --- 3702,3712 ---- strSelectionUpper.MakeUpper (); if (strSelection.IsEmpty ()) ! ::TMessageBox ("No email address selected", MB_ICONEXCLAMATION); else if (strSelection.GetLength () > 128) ! ::TMessageBox ("Email address too long", MB_ICONEXCLAMATION); else if (strSelection.Find ('@') == -1) ! ::UMessageBox (TFormat ("Email address \"%s\" invalid - does not contain a \"@\"", (const char *) strSelection), MB_ICONEXCLAMATION); else { *************** *** 3714,3720 **** strSelection = "mailto:" + strSelection; if ((long) ShellExecute (Frame, _T("open"), strSelection, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to send mail to \"%s\"", (const char *) strSelection), MB_ICONEXCLAMATION); } // end of non-empty selection --- 3714,3720 ---- strSelection = "mailto:" + strSelection; if ((long) ShellExecute (Frame, _T("open"), strSelection, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::UMessageBox(TFormat ("Unable to send mail to \"%s\"", (const char *) strSelection), MB_ICONEXCLAMATION); } // end of non-empty selection *************** *** 4367,4373 **** if (!pDoc->FindStyle (pStartLine, startcol + 1, iCol, pStyle, foundpos)) { ! ::AfxMessageBox ("Cannot find style of this character"); return; } --- 4367,4373 ---- if (!pDoc->FindStyle (pStartLine, startcol + 1, iCol, pStyle, foundpos)) { ! ::TMessageBox ("Cannot find style of this character"); return; } *************** *** 4471,4477 **** // edit current input window CreateTextWindow (strSelection, // contents ! CFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name), // title pDoc, // document pDoc->m_iUniqueDocumentNumber, // document number pDoc->m_input_font_name, --- 4471,4477 ---- // edit current input window CreateTextWindow (strSelection, // contents ! TFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name), // title pDoc, // document pDoc->m_iUniqueDocumentNumber, // document number pDoc->m_input_font_name, *************** *** 4524,4530 **** pDoc->m_strRecallLinePreamble); // default preamble CreateTextWindow (strMessage, ! CFormat ("Recall: %s", (LPCTSTR) strSelection), pDoc, pDoc->m_iUniqueDocumentNumber, --- 4524,4530 ---- pDoc->m_strRecallLinePreamble); // default preamble CreateTextWindow (strMessage, ! TFormat ("Recall: %s", (LPCTSTR) strSelection), pDoc, pDoc->m_iUniqueDocumentNumber, *************** *** 4628,4639 **** // don't let them slip in arbitrary OS commands if (strAction.Left (7).CompareNoCase ("http://") != 0 && strAction.Left (7).CompareNoCase ("mailto:") != 0) ! ::AfxMessageBox(CFormat ("Hyperlink action \"%s\" - permission denied.", (const char *) strAction), MB_ICONEXCLAMATION); else if ((long) ShellExecute (Frame, _T("open"), strAction, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox(CFormat ("Unable to open the hyperlink \"%s\"", (const char *) strAction), MB_ICONEXCLAMATION); --- 4628,4639 ---- // don't let them slip in arbitrary OS commands if (strAction.Left (7).CompareNoCase ("http://") != 0 && strAction.Left (7).CompareNoCase ("mailto:") != 0) ! ::UMessageBox(TFormat ("Hyperlink action \"%s\" - permission denied.", (const char *) strAction), MB_ICONEXCLAMATION); else if ((long) ShellExecute (Frame, _T("open"), strAction, NULL, NULL, SW_SHOWNORMAL) <= 32) ! ::UMessageBox(TFormat ("Unable to open the hyperlink \"%s\"", (const char *) strAction), MB_ICONEXCLAMATION); *************** *** 4782,4788 **** if (strName.IsEmpty ()) { ! ::AfxMessageBox("@ must be followed by a variable name"); pDoc->m_CurrentPlugin = NULL; return; } --- 4782,4788 ---- if (strName.IsEmpty ()) { ! ::TMessageBox("@ must be followed by a variable name"); pDoc->m_CurrentPlugin = NULL; return; } *************** *** 4792,4798 **** strName.MakeLower (); if (!pDoc->m_VariableMap.Lookup (strName, variable_item)) { ! ::AfxMessageBox(CFormat ("Variable '%s' is not defined.", (LPCTSTR) strName)); pDoc->m_CurrentPlugin = NULL; return; } --- 4792,4798 ---- strName.MakeLower (); if (!pDoc->m_VariableMap.Lookup (strName, variable_item)) { ! ::UMessageBox(TFormat ("Variable '%s' is not defined.", (LPCTSTR) strName)); pDoc->m_CurrentPlugin = NULL; return; } *************** *** 4820,4826 **** CString strType = "alias"; ! CString strReason = CFormat ("processing alias \"%s\"", (LPCTSTR) pAlias->strLabel); if (pDoc->GetScriptEngine () && pDoc->GetScriptEngine ()->IsLua ()) --- 4820,4826 ---- CString strType = "alias"; ! CString strReason = TFormat ("processing alias \"%s\"", (LPCTSTR) pAlias->strLabel); if (pDoc->GetScriptEngine () && pDoc->GetScriptEngine ()->IsLua ()) *************** *** 4890,4896 **** strAction, pAlias->bOmitFromOutput, pAlias->bOmitFromLog, ! CFormat ("Alias: %s", (LPCTSTR) pAlias->strLabel), pAlias->strVariable, strExtraOutput ); --- 4890,4896 ---- strAction, pAlias->bOmitFromOutput, pAlias->bOmitFromLog, ! TFormat ("Alias: %s", (LPCTSTR) pAlias->strLabel), pAlias->strVariable, strExtraOutput ); *************** *** 5388,5394 **** catch(CException* e) { e->Delete (); ! ::AfxMessageBox ("Cannot compile regular expression"); return; } // end of catch --- 5388,5394 ---- catch(CException* e) { e->Delete (); ! ::TMessageBox ("Cannot compile regular expression"); return; } // end of catch *************** *** 5472,5478 **** catch(CException* e) { e->Delete (); ! ::AfxMessageBox ("Cannot compile regular expression"); return; } // end of catch --- 5472,5478 ---- catch(CException* e) { e->Delete (); ! ::TMessageBox ("Cannot compile regular expression"); return; } // end of catch Index: mxp.cpp =================================================================== RCS file: /cvs/mushclient/mxp.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** mxp.cpp 12 Apr 2002 05:01:20 -0000 1.2 --- mxp.cpp 12 Jun 2007 04:02:02 -0000 1.3 *************** *** 45,56 **** // TRACE1 ("MXP collected element: <%s>\n", (LPCTSTR) m_strMXPstring); MXP_error (DBG_ALL, msgMXP_CollectedElement, ! CFormat ("MXP element: <%s>", (LPCTSTR) m_strMXPstring)); if (m_strMXPstring.IsEmpty ()) { ! MXP_error (DBG_ERROR, errMXP_EmptyElement, "Empty MXP element supplied."); return; } --- 45,56 ---- // TRACE1 ("MXP collected element: <%s>\n", (LPCTSTR) m_strMXPstring); MXP_error (DBG_ALL, msgMXP_CollectedElement, ! TFormat ("MXP element: <%s>", (LPCTSTR) m_strMXPstring)); if (m_strMXPstring.IsEmpty ()) { ! MXP_error (DBG_ERROR, errMXP_EmptyElement, Translate ("Empty MXP element supplied.")); return; } *************** *** 65,71 **** if (!isalnum (c) && m_strMXPstring.GetLength () < 2) { MXP_error (DBG_ERROR, errMXP_ElementTooShort, ! CFormat ("MXP element too short: <%s>", (LPCTSTR) m_strMXPstring)); return; } --- 65,71 ---- if (!isalnum (c) && m_strMXPstring.GetLength () < 2) { MXP_error (DBG_ERROR, errMXP_ElementTooShort, ! TFormat ("MXP element too short: <%s>", (LPCTSTR) m_strMXPstring)); return; } Index: mxpClose.cpp =================================================================== RCS file: /cvs/mushclient/mxpClose.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** mxpClose.cpp 29 Nov 2006 01:57:47 -0000 1.14 --- mxpClose.cpp 12 Jun 2007 04:02:02 -0000 1.15 *************** *** 59,65 **** if (!bFoundit) { MXP_error (DBG_WARNING, wrnMXP_OpenTagNotInOutputBuffer, ! CFormat ("Opening MXP tag <%s> not found in output buffer", (LPCTSTR) strTag)); return; } --- 59,65 ---- if (!bFoundit) { MXP_error (DBG_WARNING, wrnMXP_OpenTagNotInOutputBuffer, ! TFormat ("Opening MXP tag <%s> not found in output buffer", (LPCTSTR) strTag)); return; } *************** *** 134,140 **** long nInvocationCount = 0; CString strType = "MXP close tag"; ! CString strReason = CFormat ("closing MXP tag %s", (LPCTSTR) strTag); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) { --- 134,140 ---- long nInvocationCount = 0; CString strType = "MXP close tag"; ! CString strReason = TFormat ("closing MXP tag %s", (LPCTSTR) strTag); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) { *************** *** 241,247 **** long nInvocationCount = 0; CString strType = "MXP set variable"; ! CString strReason = CFormat ("setting MXP variable %s", (LPCTSTR) strVariable); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) { --- 241,247 ---- long nInvocationCount = 0; CString strType = "MXP set variable"; ! CString strReason = TFormat ("setting MXP variable %s", (LPCTSTR) strVariable); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) { *************** *** 350,356 **** if (!m_CustomElementMap.Lookup (strTag, pElement)) { MXP_error (DBG_ERROR, errMXP_ClosingUnknownTag, ! CFormat ("Unknown MXP element: <%s>" , (LPCTSTR) m_strMXPstring)); return; } --- 350,356 ---- if (!m_CustomElementMap.Lookup (strTag, pElement)) { MXP_error (DBG_ERROR, errMXP_ClosingUnknownTag, ! TFormat ("Unknown MXP element: <%s>" , (LPCTSTR) m_strMXPstring)); return; } *************** *** 412,418 **** CString strTag = pTag->strName; MXP_error (DBG_WARNING, wrnMXP_OpenTagClosedAtEndOfLine, ! CFormat ("End-of-line closure of open MXP tag: <%s>", (LPCTSTR) strTag)); MXP_CloseTag (strTag); --- 412,418 ---- CString strTag = pTag->strName; MXP_error (DBG_WARNING, wrnMXP_OpenTagClosedAtEndOfLine, ! TFormat ("End-of-line closure of open MXP tag: <%s>", (LPCTSTR) strTag)); MXP_CloseTag (strTag); *************** *** 433,439 **** return; MXP_error (DBG_WARNING, wrnMXP_TagClosedAtReset, ! CFormat (" closure of MXP tag: <%s>", (LPCTSTR) pTag->strName)); MXP_CloseTag (pTag->strName); m_ActiveTagList.RemoveTail (); --- 433,439 ---- return; MXP_error (DBG_WARNING, wrnMXP_TagClosedAtReset, ! TFormat (" closure of MXP tag: <%s>", (LPCTSTR) pTag->strName)); MXP_CloseTag (pTag->strName); m_ActiveTagList.RemoveTail (); Index: mxpDefs.cpp =================================================================== RCS file: /cvs/mushclient/mxpDefs.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** mxpDefs.cpp 27 Aug 2006 00:22:16 -0000 1.5 --- mxpDefs.cpp 12 Jun 2007 04:02:02 -0000 1.6 *************** *** 36,42 **** !bSecure) { MXP_error (DBG_ERROR, errMXP_DefinitionWhenNotSecure, ! CFormat ("MXP definition ignored when not in secure mode: " , (LPCTSTR) strTag)); return; } --- 36,42 ---- !bSecure) { MXP_error (DBG_ERROR, errMXP_DefinitionWhenNotSecure, ! TFormat ("MXP definition ignored when not in secure mode: " , (LPCTSTR) strTag)); return; } *************** *** 51,57 **** if (!IsValidName (strDefinition)) { MXP_error (DBG_ERROR, errMXP_InvalidDefinition, ! CFormat ("Invalid MXP definition name: ", (LPCTSTR) m_strMXPstring)); return; } --- 51,57 ---- if (!IsValidName (strDefinition)) { MXP_error (DBG_ERROR, errMXP_InvalidDefinition, ! TFormat ("Invalid MXP definition name: ", (LPCTSTR) m_strMXPstring)); return; } *************** *** 67,73 **** if (!IsValidName (strName)) { MXP_error (DBG_ERROR, errMXP_InvalidElementName, ! CFormat ("Invalid MXP element/entity name: \"%s\"", (LPCTSTR) strName)); return; } --- 67,73 ---- if (!IsValidName (strName)) { MXP_error (DBG_ERROR, errMXP_InvalidElementName, ! TFormat ("Invalid MXP element/entity name: \"%s\"", (LPCTSTR) strName)); return; } *************** *** 76,82 **** if (m_bPuebloActive) { MXP_error (DBG_ERROR, errMXP_DefinitionAttemptInPueblo, ! CFormat ("Defining elements/entities not valid in Pueblo: <%s>", (LPCTSTR) strName)); return; } --- 76,82 ---- if (m_bPuebloActive) { MXP_error (DBG_ERROR, errMXP_DefinitionAttemptInPueblo, ! TFormat ("Defining elements/entities not valid in Pueblo: <%s>", (LPCTSTR) strName)); return; } *************** *** 85,91 **** // debugging MXP_error (DBG_INFO, msgMXP_GotDefinition, ! CFormat ("Got Definition: !%s %s %s", (LPCTSTR) strDefinition, (LPCTSTR) strName, (LPCTSTR) strTag)); --- 85,91 ---- // debugging MXP_error (DBG_INFO, msgMXP_GotDefinition, ! TFormat ("Got Definition: !%s %s %s", (LPCTSTR) strDefinition, (LPCTSTR) strName, (LPCTSTR) strTag)); *************** *** 103,109 **** MXP_Attlist (strName, strTag); else MXP_error (DBG_ERROR, errMXP_InvalidDefinition, ! CFormat ("Unknown definition type: ", (LPCTSTR) strDefinition)); } // end of CMUSHclientDoc::MXP_Definition --- 103,109 ---- MXP_Attlist (strName, strTag); else MXP_error (DBG_ERROR, errMXP_InvalidDefinition, ! TFormat ("Unknown definition type: ", (LPCTSTR) strDefinition)); } // end of CMUSHclientDoc::MXP_Definition *************** *** 132,138 **** if (App.m_ElementMap.Lookup (strName, element_item)) { MXP_error (DBG_ERROR, errMXP_CannotRedefineElement, ! CFormat ("Cannot redefine built-in MXP element: <%s>" , (LPCTSTR) strName)); return; } --- 132,138 ---- if (App.m_ElementMap.Lookup (strName, element_item)) { MXP_error (DBG_ERROR, errMXP_CannotRedefineElement, ! TFormat ("Cannot redefine built-in MXP element: <%s>" , (LPCTSTR) strName)); return; } *************** *** 142,148 **** { if (!bDelete) MXP_error (DBG_WARNING, wrnMXP_ReplacingElement, ! CFormat ("Replacing previously-defined MXP element: <%s>", (LPCTSTR) strName)); DELETE_LIST (pElement->ElementItemList); DELETE_LIST (pElement->AttributeList); --- 142,148 ---- { if (!bDelete) MXP_error (DBG_WARNING, wrnMXP_ReplacingElement, ! TFormat ("Replacing previously-defined MXP element: <%s>", (LPCTSTR) strName)); DELETE_LIST (pElement->ElementItemList); DELETE_LIST (pElement->AttributeList); *************** *** 184,190 **** if (*p != '<') { MXP_error (DBG_ERROR, errMXP_NoTagInDefinition, ! CFormat ("No opening \"<\" in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } --- 184,190 ---- if (*p != '<') { MXP_error (DBG_ERROR, errMXP_NoTagInDefinition, ! TFormat ("No opening \"<\" in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } *************** *** 198,204 **** if (*p == '<') { MXP_error (DBG_ERROR, errMXP_UnexpectedDefinitionSymbol, ! CFormat ("Unexpected \"<\" in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } --- 198,204 ---- if (*p == '<') { MXP_error (DBG_ERROR, errMXP_UnexpectedDefinitionSymbol, ! TFormat ("Unexpected \"<\" in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } *************** *** 210,216 **** if (*p != c) { MXP_error (DBG_ERROR, errMXP_NoClosingDefinitionQuote, ! CFormat ("No closing quote in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } --- 210,216 ---- if (*p != c) { MXP_error (DBG_ERROR, errMXP_NoClosingDefinitionQuote, ! TFormat ("No closing quote in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } *************** *** 222,228 **** if (*p != '>') { MXP_error (DBG_ERROR, errMXP_NoClosingDefinitionTag, ! CFormat ("No closing \">\" in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } --- 222,228 ---- if (*p != '>') { MXP_error (DBG_ERROR, errMXP_NoClosingDefinitionTag, ! TFormat ("No closing \">\" in MXP element definition \"%s\"", (LPCTSTR) strArgument)); return; } *************** *** 234,240 **** if (GetWord (strAtomName, strAtom)) { MXP_error (DBG_ERROR, errMXP_NoDefinitionTag, ! CFormat ("No element name in MXP element definition \"<%s>\"", (LPCTSTR) CString (pStart, p - pStart))); return; } --- 234,240 ---- if (GetWord (strAtomName, strAtom)) { MXP_error (DBG_ERROR, errMXP_NoDefinitionTag, ! TFormat ("No element name in MXP element definition \"<%s>\"", (LPCTSTR) CString (pStart, p - pStart))); return; } *************** *** 244,250 **** GetWord (strAtomName, strAtom); // try to get next word strAtomName.MakeLower (); // case insensitive? MXP_error (DBG_ERROR, errMXP_DefinitionCannotCloseElement, ! CFormat ("Element definitions cannot close other elements: " , (LPCTSTR) strAtomName)); return; } --- 244,250 ---- GetWord (strAtomName, strAtom); // try to get next word strAtomName.MakeLower (); // case insensitive? MXP_error (DBG_ERROR, errMXP_DefinitionCannotCloseElement, ! TFormat ("Element definitions cannot close other elements: " , (LPCTSTR) strAtomName)); return; } *************** *** 254,260 **** GetWord (strAtomName, strAtom); // try to get next word strAtomName.MakeLower (); // case insensitive? MXP_error (DBG_ERROR, errMXP_DefinitionCannotDefineElement, ! CFormat ("Element definitions cannot define other elements: " , (LPCTSTR) strAtomName)); return; } --- 254,260 ---- GetWord (strAtomName, strAtom); // try to get next word strAtomName.MakeLower (); // case insensitive? MXP_error (DBG_ERROR, errMXP_DefinitionCannotDefineElement, ! TFormat ("Element definitions cannot define other elements: " , (LPCTSTR) strAtomName)); return; } *************** *** 268,274 **** if (!App.m_ElementMap.Lookup (strAtomName, element_item)) { MXP_error (DBG_ERROR, errMXP_NoInbuiltDefinitionTag, ! CFormat ("Unknown MXP element: <%s>" , (LPCTSTR) strAtomName)); return; } --- 268,274 ---- if (!App.m_ElementMap.Lookup (strAtomName, element_item)) { MXP_error (DBG_ERROR, errMXP_NoInbuiltDefinitionTag, ! TFormat ("Unknown MXP element: <%s>" , (LPCTSTR) strAtomName)); return; } *************** *** 344,350 **** if (CheckObjectName (pElement->strFlag) != eOK) { MXP_error (DBG_ERROR, errMXP_BadVariableName, ! CFormat ("Bad variable name \"%s\" - for MXP FLAG definition", (LPCTSTR) pElement->strFlag)); pElement->strFlag.Empty (); } --- 344,350 ---- if (CheckObjectName (pElement->strFlag) != eOK) { MXP_error (DBG_ERROR, errMXP_BadVariableName, ! TFormat ("Bad variable name \"%s\" - for MXP FLAG definition", (LPCTSTR) pElement->strFlag)); pElement->strFlag.Empty (); } *************** *** 369,375 **** if (!m_CustomElementMap.Lookup (strName, pElement)) { MXP_error (DBG_ERROR, errMXP_UnknownElementInAttlist, ! CFormat ("Cannot add attributes to undefined MXP element: <%s>", (LPCTSTR) strName)); return; } // end of no element matching --- 369,375 ---- if (!m_CustomElementMap.Lookup (strName, pElement)) { MXP_error (DBG_ERROR, errMXP_UnknownElementInAttlist, ! TFormat ("Cannot add attributes to undefined MXP element: <%s>", (LPCTSTR) strName)); return; } // end of no element matching *************** *** 401,407 **** if (App.m_EntityMap.Lookup (strName, strEntityContents)) { MXP_error (DBG_ERROR, errMXP_CannotRedefineEntity, ! CFormat ("Cannot redefine entity: &%s;", (LPCTSTR) strName)); return; } --- 401,407 ---- if (App.m_EntityMap.Lookup (strName, strEntityContents)) { MXP_error (DBG_ERROR, errMXP_CannotRedefineEntity, ! TFormat ("Cannot redefine entity: &%s;", (LPCTSTR) strName)); return; } *************** *** 434,440 **** if (*p != ';') { MXP_error (DBG_ERROR, errMXP_NoClosingSemicolon, ! CFormat ("No closing \";\" in MXP entity argument \"%s\"", (LPCTSTR) strEntityContents)); return; } --- 434,440 ---- if (*p != ';') { MXP_error (DBG_ERROR, errMXP_NoClosingSemicolon, ! TFormat ("No closing \";\" in MXP entity argument \"%s\"", (LPCTSTR) strEntityContents)); return; } *************** *** 510,516 **** else { MXP_error (DBG_WARNING, errMXP_UnexpectedEntityArguments, ! CFormat ("Unexpected word \"%s\" in entity definition for &%s; ignored", (LPCTSTR) strKeyword, (LPCTSTR) strName)); return; --- 510,516 ---- else { MXP_error (DBG_WARNING, errMXP_UnexpectedEntityArguments, ! TFormat ("Unexpected word \"%s\" in entity definition for &%s; ignored", (LPCTSTR) strKeyword, (LPCTSTR) strName)); return; Index: mxpEnd.cpp =================================================================== RCS file: /cvs/mushclient/mxpEnd.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** mxpEnd.cpp 12 Apr 2002 05:04:58 -0000 1.1 --- mxpEnd.cpp 12 Jun 2007 04:02:02 -0000 1.2 *************** *** 33,39 **** if (!IsValidName (strName)) { MXP_error (DBG_ERROR, errMXP_InvalidElementName, ! CFormat ("Invalid MXP tag name: ", (LPCTSTR) m_strMXPstring)); return; } --- 33,39 ---- if (!IsValidName (strName)) { MXP_error (DBG_ERROR, errMXP_InvalidElementName, ! TFormat ("Invalid MXP tag name: ", (LPCTSTR) m_strMXPstring)); return; } *************** *** 43,49 **** // should just have tag name, not if (!strTag.IsEmpty ()) MXP_error (DBG_WARNING, wrnMXP_ArgumentsToClosingTag, ! CFormat ("Closing MXP tag has inappropriate arguments", (LPCTSTR) strName, (LPCTSTR) strTag)); --- 43,49 ---- // should just have tag name, not if (!strTag.IsEmpty ()) MXP_error (DBG_WARNING, wrnMXP_ArgumentsToClosingTag, ! TFormat ("Closing MXP tag has inappropriate arguments", (LPCTSTR) strName, (LPCTSTR) strTag)); *************** *** 66,72 **** if (!bSecure && pTag->bSecure) { MXP_error (DBG_WARNING, wrnMXP_OpenTagBlockedBySecureTag, ! CFormat ("Cannot close open MXP tag <%s> " "- blocked by secure tag <%s>", (LPCTSTR) strName, (LPCTSTR) pTag->strName)); --- 66,72 ---- if (!bSecure && pTag->bSecure) { MXP_error (DBG_WARNING, wrnMXP_OpenTagBlockedBySecureTag, ! TFormat ("Cannot close open MXP tag <%s> " "- blocked by secure tag <%s>", (LPCTSTR) strName, (LPCTSTR) pTag->strName)); *************** *** 80,86 **** if (!pTag) { MXP_error (DBG_WARNING, wrnMXP_OpenTagNotThere, ! CFormat ("Closing MXP tag does not have corresponding opening tag", (LPCTSTR) strName)); return; } --- 80,86 ---- if (!pTag) { MXP_error (DBG_WARNING, wrnMXP_OpenTagNotThere, ! TFormat ("Closing MXP tag does not have corresponding opening tag", (LPCTSTR) strName)); return; } *************** *** 88,94 **** if (!bSecure && pTag->bSecure) { MXP_error (DBG_WARNING, wrnMXP_TagOpenedInSecureMode, ! CFormat ("Cannot close open MXP tag <%s> " "- it was opened in secure mode.", (LPCTSTR) strName)); return; --- 88,94 ---- if (!bSecure && pTag->bSecure) { MXP_error (DBG_WARNING, wrnMXP_TagOpenedInSecureMode, ! TFormat ("Cannot close open MXP tag <%s> " "- it was opened in secure mode.", (LPCTSTR) strName)); return; *************** *** 107,113 **** if (strTag != strName) MXP_error (DBG_WARNING, wrnMXP_ClosingOutOfSequenceTag, ! CFormat ("Closing out-of-sequence MXP tag: <%s>", (LPCTSTR) strTag)); MXP_CloseTag (strTag); --- 107,113 ---- if (strTag != strName) MXP_error (DBG_WARNING, wrnMXP_ClosingOutOfSequenceTag, ! TFormat ("Closing out-of-sequence MXP tag: <%s>", (LPCTSTR) strTag)); MXP_CloseTag (strTag); Index: mxpEntities.cpp =================================================================== RCS file: /cvs/mushclient/mxpEntities.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** mxpEntities.cpp 4 May 2007 04:00:22 -0000 1.4 --- mxpEntities.cpp 12 Jun 2007 04:02:02 -0000 1.5 *************** *** 32,44 **** // TRACE1 ("MXP collected entity %s\n", (LPCTSTR) m_strMXPstring); MXP_error (DBG_ALL, msgMXP_CollectedEntity, ! CFormat ("MXP entity: &%s;", (LPCTSTR) m_strMXPstring)); if (!IsValidName (m_strMXPstring) && m_strMXPstring.Left (1) != "#") { MXP_error (DBG_ERROR, errMXP_InvalidEntityName, ! CFormat ("Invalid MXP entity name \"%s\" supplied.", m_strMXPstring)); return; } --- 32,44 ---- // TRACE1 ("MXP collected entity %s\n", (LPCTSTR) m_strMXPstring); MXP_error (DBG_ALL, msgMXP_CollectedEntity, ! TFormat ("MXP entity: &%s;", (LPCTSTR) m_strMXPstring)); if (!IsValidName (m_strMXPstring) && m_strMXPstring.Left (1) != "#") { MXP_error (DBG_ERROR, errMXP_InvalidEntityName, ! TFormat ("Invalid MXP entity name \"%s\" supplied.", m_strMXPstring)); return; } *************** *** 77,83 **** if (!isxdigit (strName [i])) { MXP_error (DBG_ERROR, errMXP_InvalidEntityNumber, ! CFormat ("Invalid hex number in MXP entity: &%s;" , (LPCTSTR) strName)); return ""; --- 77,83 ---- if (!isxdigit (strName [i])) { MXP_error (DBG_ERROR, errMXP_InvalidEntityNumber, ! TFormat ("Invalid hex number in MXP entity: &%s;" , (LPCTSTR) strName)); return ""; *************** *** 89,95 **** if (iResult & 0xF0) { MXP_error (DBG_ERROR, errMXP_InvalidEntityNumber, ! CFormat ("Invalid hex number in MXP entity: &%s;" "- maximum of 2 hex digits", (LPCTSTR) strName)); return ""; --- 89,95 ---- if (iResult & 0xF0) { MXP_error (DBG_ERROR, errMXP_InvalidEntityNumber, ! TFormat ("Invalid hex number in MXP entity: &%s;" "- maximum of 2 hex digits", (LPCTSTR) strName)); return ""; *************** *** 103,109 **** if (!isdigit (strName [i])) { MXP_error (DBG_ERROR, errMXP_InvalidEntityNumber, ! CFormat ("Invalid number in MXP entity: &%s;" , (LPCTSTR) strName)); return ""; } --- 103,109 ---- if (!isdigit (strName [i])) { MXP_error (DBG_ERROR, errMXP_InvalidEntityNumber, ! TFormat ("Invalid number in MXP entity: &%s;" , (LPCTSTR) strName)); return ""; } *************** *** 115,121 **** iResult > 255) // don't allow characters more than 1 byte { MXP_error (DBG_ERROR, errMXP_DisallowedEntityNumber, ! CFormat ("Disallowed number in MXP entity: &%s;" , (LPCTSTR) strName)); return ""; } --- 115,121 ---- iResult > 255) // don't allow characters more than 1 byte { MXP_error (DBG_ERROR, errMXP_DisallowedEntityNumber, ! TFormat ("Disallowed number in MXP entity: &%s;" , (LPCTSTR) strName)); return ""; } *************** *** 132,138 **** return strEntityContents; MXP_error (DBG_ERROR, errMXP_UnknownEntity, ! CFormat ("Unknown MXP entity: &%s;" , (LPCTSTR) strName)); return ""; --- 132,138 ---- return strEntityContents; MXP_error (DBG_ERROR, errMXP_UnknownEntity, ! TFormat ("Unknown MXP entity: &%s;" , (LPCTSTR) strName)); return ""; Index: mxpError.cpp =================================================================== RCS file: /cvs/mushclient/mxpError.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** mxpError.cpp 29 Nov 2006 01:57:47 -0000 1.12 --- mxpError.cpp 12 Jun 2007 04:02:02 -0000 1.13 *************** *** 172,178 **** } // end of switch MXP_error (DBG_ERROR, i, // error level ! CFormat ("Unterminated MXP %s: %s (%s)", (LPCTSTR) p, (LPCTSTR) m_strMXPstring, pReason)); --- 172,178 ---- } // end of switch MXP_error (DBG_ERROR, i, // error level ! TFormat ("Unterminated MXP %s: %s (%s)", (LPCTSTR) p, (LPCTSTR) m_strMXPstring, pReason)); Index: mxpMode.cpp =================================================================== RCS file: /cvs/mushclient/mxpMode.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** mxpMode.cpp 12 Apr 2002 05:04:58 -0000 1.1 --- mxpMode.cpp 12 Jun 2007 04:02:02 -0000 1.2 *************** *** 60,74 **** if (m_iMXP_mode >= 0 && m_iMXP_mode < NUMITEMS (sMode)) strOldMode = sMode [m_iMXP_mode]; else ! strOldMode = CFormat ("unknown mode %i", m_iMXP_mode); if (iNewMode >= 0 && iNewMode < NUMITEMS (sMode)) strNewMode = sMode [iNewMode]; else ! strNewMode = CFormat ("unknown mode %i", iNewMode); MXP_error (DBG_INFO, infoMXP_ModeChange, ! CFormat ("MXP mode change from '%s' to '%s'", (LPCTSTR) strOldMode, (LPCTSTR) strNewMode)); --- 60,74 ---- if (m_iMXP_mode >= 0 && m_iMXP_mode < NUMITEMS (sMode)) strOldMode = sMode [m_iMXP_mode]; else ! strOldMode = TFormat ("unknown mode %i", m_iMXP_mode); if (iNewMode >= 0 && iNewMode < NUMITEMS (sMode)) strNewMode = sMode [iNewMode]; else ! strNewMode = TFormat ("unknown mode %i", iNewMode); MXP_error (DBG_INFO, infoMXP_ModeChange, ! TFormat ("MXP mode change from '%s' to '%s'", (LPCTSTR) strOldMode, (LPCTSTR) strNewMode)); Index: mxpOpenAtomic.cpp =================================================================== RCS file: /cvs/mushclient/mxpOpenAtomic.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** mxpOpenAtomic.cpp 1 Apr 2007 03:47:36 -0000 1.12 --- mxpOpenAtomic.cpp 12 Jun 2007 04:02:02 -0000 1.13 *************** *** 135,141 **** if (!m_bIgnoreMXPcolourChanges) if (SetColour (strArgument, pStyle->iForeColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! CFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strArgument)); // background colour --- 135,141 ---- if (!m_bIgnoreMXPcolourChanges) if (SetColour (strArgument, pStyle->iForeColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! TFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strArgument)); // background colour *************** *** 143,149 **** if (!m_bIgnoreMXPcolourChanges) if (SetColour (strArgument, pStyle->iBackColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! CFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strArgument)); } break; // end of COLOR --- 143,149 ---- if (!m_bIgnoreMXPcolourChanges) if (SetColour (strArgument, pStyle->iBackColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! TFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strArgument)); } break; // end of COLOR *************** *** 264,270 **** if (!m_bIgnoreMXPcolourChanges) if (SetColour (strItem, pStyle->iForeColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! CFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strItem)); } // end of colour --- 264,270 ---- if (!m_bIgnoreMXPcolourChanges) if (SetColour (strItem, pStyle->iForeColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! TFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strItem)); } // end of colour *************** *** 277,283 **** if (!m_bIgnoreMXPcolourChanges) if (SetColour (strArgument, pStyle->iBackColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! CFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strArgument)); // get font size argument to avoid warnings about unused arguments --- 277,283 ---- if (!m_bIgnoreMXPcolourChanges) if (SetColour (strArgument, pStyle->iBackColour)) MXP_error (DBG_ERROR, errMXP_UnknownColour, ! TFormat ("Unknown colour: \"%s\"" , (LPCTSTR) strArgument)); // get font size argument to avoid warnings about unused arguments *************** *** 297,303 **** SendPacket (strVersion, strVersion.GetLength ()); // send version info back MXP_error (DBG_INFO, infoMXP_VersionSent, ! CFormat ("Sent version response: %s" , (LPCTSTR) strVersion.Mid (4))); } --- 297,303 ---- SendPacket (strVersion, strVersion.GetLength ()); // send version info back MXP_error (DBG_INFO, infoMXP_VersionSent, ! TFormat ("Sent version response: %s" , (LPCTSTR) strVersion.Mid (4))); } *************** *** 318,324 **** SendPacket (strAFK, strAFK.GetLength ()); // send AFK info back MXP_error (DBG_INFO, infoMXP_AFKSent, ! CFormat ("Sent AFK response: %s" , (LPCTSTR) strAFK.Mid (4))); } // end of AFK break; --- 318,324 ---- SendPacket (strAFK, strAFK.GetLength ()); // send AFK info back MXP_error (DBG_INFO, infoMXP_AFKSent, ! TFormat ("Sent AFK response: %s" , (LPCTSTR) strAFK.Mid (4))); } // end of AFK break; *************** *** 368,374 **** if (questionlist.GetCount () > 2) { MXP_error (DBG_ERROR, errMXP_InvalidSupportArgument, ! CFormat ("Invalid argument: %s" , (LPCTSTR) pArgument->strValue)); return; } --- 368,374 ---- if (questionlist.GetCount () > 2) { MXP_error (DBG_ERROR, errMXP_InvalidSupportArgument, ! TFormat ("Invalid argument: %s" , (LPCTSTR) pArgument->strValue)); return; } *************** *** 380,386 **** if (!IsValidName (strTag)) { MXP_error (DBG_ERROR, errMXP_InvalidSupportArgument, ! CFormat ("Invalid argument: %s" , (LPCTSTR) strTag)); return; } --- 380,386 ---- if (!IsValidName (strTag)) { MXP_error (DBG_ERROR, errMXP_InvalidSupportArgument, ! TFormat ("Invalid argument: %s" , (LPCTSTR) strTag)); return; } *************** *** 428,434 **** if (!IsValidName (strSubtag)) { MXP_error (DBG_ERROR, errMXP_InvalidSupportArgument, ! CFormat ("Invalid argument: %s" , (LPCTSTR) strSubtag)); return; } --- 428,434 ---- if (!IsValidName (strSubtag)) { MXP_error (DBG_ERROR, errMXP_InvalidSupportArgument, ! TFormat ("Invalid argument: %s" , (LPCTSTR) strSubtag)); return; } *************** *** 458,464 **** SendPacket (strMessage, strMessage.GetLength ()); // send version info back MXP_error (DBG_INFO, infoMXP_SupportsSent, ! CFormat ("Sent supports response: %s" , (LPCTSTR) strMessage.Mid (4))); } --- 458,464 ---- SendPacket (strMessage, strMessage.GetLength ()); // send version info back MXP_error (DBG_INFO, infoMXP_SupportsSent, ! TFormat ("Sent supports response: %s" , (LPCTSTR) strMessage.Mid (4))); } *************** *** 504,510 **** SendPacket (strMessage, strMessage.GetLength ()); // send version info back MXP_error (DBG_INFO, infoMXP_OptionsSent, ! CFormat ("Sent options response: %s" , (LPCTSTR) strMessage.Mid (4))); } --- 504,510 ---- SendPacket (strMessage, strMessage.GetLength ()); // send version info back MXP_error (DBG_INFO, infoMXP_OptionsSent, ! TFormat ("Sent options response: %s" , (LPCTSTR) strMessage.Mid (4))); } *************** *** 528,550 **** if (iResult != eOK) MXP_error (DBG_ERROR, errMXP_InvalidOptionArgument, ! CFormat ("Option named '%s' not known.", (LPCTSTR) pArgument->strName)); else if (!(OptionsTable [iItem].iFlags & OPT_SERVER_CAN_WRITE)) MXP_error (DBG_ERROR, errMXP_CannotChangeOption, ! CFormat ("Option named '%s' cannot be changed.", (LPCTSTR) pArgument->strName)); else { iResult = SetOptionItem (iItem, atol (pArgument->strValue), true, false); if (iResult == eOK) MXP_error (DBG_INFO, infoMXP_OptionChanged, ! CFormat ("Option named '%s' changed to '%s'.", (LPCTSTR) pArgument->strName, (LPCTSTR) pArgument->strValue)); else MXP_error (DBG_ERROR, errMXP_OptionOutOfRange, ! CFormat ("Option named '%s' could not be changed to '%s' (out of range).", (LPCTSTR) pArgument->strName, (LPCTSTR) pArgument->strValue)); } --- 528,550 ---- if (iResult != eOK) MXP_error (DBG_ERROR, errMXP_InvalidOptionArgument, ! TFormat ("Option named '%s' not known.", (LPCTSTR) pArgument->strName)); else if (!(OptionsTable [iItem].iFlags & OPT_SERVER_CAN_WRITE)) MXP_error (DBG_ERROR, errMXP_CannotChangeOption, ! TFormat ("Option named '%s' cannot be changed.", (LPCTSTR) pArgument->strName)); else { iResult = SetOptionItem (iItem, atol (pArgument->strValue), true, false); if (iResult == eOK) MXP_error (DBG_INFO, infoMXP_OptionChanged, ! TFormat ("Option named '%s' changed to '%s'.", (LPCTSTR) pArgument->strName, (LPCTSTR) pArgument->strValue)); else MXP_error (DBG_ERROR, errMXP_OptionOutOfRange, ! TFormat ("Option named '%s' could not be changed to '%s' (out of range).", (LPCTSTR) pArgument->strName, (LPCTSTR) pArgument->strValue)); } *************** *** 564,578 **** CString strPacket = m_name + ENDLINE; SendPacket (strPacket, strPacket.GetLength ()); // send name to MUD MXP_error (DBG_INFO, infoMXP_CharacterNameSent, ! CFormat ("Sent character name: %s" , (LPCTSTR) m_name)); } else if (m_connect_now != eConnectMXP) MXP_error (DBG_WARNING, wrnMXP_CharacterNameRequestedButNotDefined, ! "Character name requested but auto-connect not set to MXP."); else MXP_error (DBG_WARNING, wrnMXP_CharacterNameRequestedButNotDefined, ! CFormat ("Character name requested but none defined.")); break; // end of USER case MXP_ACTION_PASSWORD: --- 564,578 ---- CString strPacket = m_name + ENDLINE; SendPacket (strPacket, strPacket.GetLength ()); // send name to MUD MXP_error (DBG_INFO, infoMXP_CharacterNameSent, ! TFormat ("Sent character name: %s" , (LPCTSTR) m_name)); } else if (m_connect_now != eConnectMXP) MXP_error (DBG_WARNING, wrnMXP_CharacterNameRequestedButNotDefined, ! Translate ("Character name requested but auto-connect not set to MXP.")); else MXP_error (DBG_WARNING, wrnMXP_CharacterNameRequestedButNotDefined, ! Translate ("Character name requested but none defined.")); break; // end of USER case MXP_ACTION_PASSWORD: *************** *** 811,817 **** if (!IsValidName (strVariable)) { MXP_error (DBG_ERROR, errMXP_InvalidDefinition, ! CFormat ("Invalid MXP entity name: ", (LPCTSTR) strVariable)); strVariable.Empty (); return; --- 811,817 ---- if (!IsValidName (strVariable)) { MXP_error (DBG_ERROR, errMXP_InvalidDefinition, ! TFormat ("Invalid MXP entity name: ", (LPCTSTR) strVariable)); strVariable.Empty (); return; *************** *** 823,829 **** if (App.m_EntityMap.Lookup (strVariable, strEntityContents)) { MXP_error (DBG_ERROR, errMXP_CannotRedefineEntity, ! CFormat ("Cannot redefine entity: &%s;", (LPCTSTR) strVariable)); strVariable.Empty (); return; --- 823,829 ---- if (App.m_EntityMap.Lookup (strVariable, strEntityContents)) { MXP_error (DBG_ERROR, errMXP_CannotRedefineEntity, ! TFormat ("Cannot redefine entity: &%s;", (LPCTSTR) strVariable)); strVariable.Empty (); return; *************** *** 837,843 **** { // warn them it is not implemented MXP_error (DBG_WARNING, wrnMXP_TagNotImplemented, ! CFormat ("MXP tag <%s> is not implemented" , (LPCTSTR) strTag)); } // end of default --- 837,843 ---- { // warn them it is not implemented MXP_error (DBG_WARNING, wrnMXP_TagNotImplemented, ! TFormat ("MXP tag <%s> is not implemented" , (LPCTSTR) strTag)); } // end of default Index: mxpStart.cpp =================================================================== RCS file: /cvs/mushclient/mxpStart.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** mxpStart.cpp 29 Nov 2006 01:57:47 -0000 1.15 --- mxpStart.cpp 12 Jun 2007 04:02:02 -0000 1.16 *************** *** 46,52 **** if (!IsValidName (strName)) { MXP_error (DBG_ERROR, errMXP_InvalidElementName, ! CFormat ("Invalid MXP element name \"%s\" supplied.", strName)); return; } --- 46,52 ---- if (!IsValidName (strName)) { MXP_error (DBG_ERROR, errMXP_InvalidElementName, ! TFormat ("Invalid MXP element name \"%s\" supplied.", strName)); return; } *************** *** 103,109 **** !m_bPuebloActive) { MXP_error (DBG_ERROR, errMXP_PuebloOnly, ! CFormat ("Using Pueblo-only element in MXP mode: <%s>" , (LPCTSTR) strName)); return; } --- 103,109 ---- !m_bPuebloActive) { MXP_error (DBG_ERROR, errMXP_PuebloOnly, ! TFormat ("Using Pueblo-only element in MXP mode: <%s>" , (LPCTSTR) strName)); return; } *************** *** 112,118 **** m_bPuebloActive) { MXP_error (DBG_ERROR, errMXP_MXPOnly, ! CFormat ("Using MXP-only element in Pueblo mode: <%s>" , (LPCTSTR) strName)); return; } --- 112,118 ---- m_bPuebloActive) { MXP_error (DBG_ERROR, errMXP_MXPOnly, ! TFormat ("Using MXP-only element in Pueblo mode: <%s>" , (LPCTSTR) strName)); return; } *************** *** 125,131 **** if (!m_CustomElementMap.Lookup (strName, pElement)) { MXP_error (DBG_ERROR, errMXP_UnknownElement, ! CFormat ("Unknown MXP element: <%s>" , (LPCTSTR) strName)); return; } --- 125,131 ---- if (!m_CustomElementMap.Lookup (strName, pElement)) { MXP_error (DBG_ERROR, errMXP_UnknownElement, ! TFormat ("Unknown MXP element: <%s>" , (LPCTSTR) strName)); return; } *************** *** 143,149 **** SECURE_ELEMENT_CHECK) { MXP_error (DBG_ERROR, errMXP_ElementWhenNotSecure, ! CFormat ("Secure MXP tag ignored when not in secure mode: <%s>" , (LPCTSTR) strName)); return; } --- 143,149 ---- SECURE_ELEMENT_CHECK) { MXP_error (DBG_ERROR, errMXP_ElementWhenNotSecure, ! TFormat ("Secure MXP tag ignored when not in secure mode: <%s>" , (LPCTSTR) strName)); return; } *************** *** 214,220 **** m_ActiveTagList.GetCount () != m_iLastOutstandingTagCount) { MXP_error (DBG_WARNING, wrnMXP_ManyOutstandingTags, ! CFormat ( "Now have %i outstanding MXP tags" , m_ActiveTagList.GetCount ())); m_iLastOutstandingTagCount = m_ActiveTagList.GetCount (); --- 214,220 ---- m_ActiveTagList.GetCount () != m_iLastOutstandingTagCount) { MXP_error (DBG_WARNING, wrnMXP_ManyOutstandingTags, ! TFormat ( "Now have %i outstanding MXP tags" , m_ActiveTagList.GetCount ())); m_iLastOutstandingTagCount = m_ActiveTagList.GetCount (); *************** *** 284,290 **** if (*p != ';') { MXP_error (DBG_ERROR, errMXP_NoClosingSemicolonInArgument, ! CFormat ("No closing \";\" in MXP element argument \"%s\"", (LPCTSTR) pArgument->strValue)); return; } --- 284,290 ---- if (*p != ';') { MXP_error (DBG_ERROR, errMXP_NoClosingSemicolonInArgument, ! TFormat ("No closing \";\" in MXP element argument \"%s\"", (LPCTSTR) pArgument->strValue)); return; } *************** *** 420,426 **** if (*p != ';') { MXP_error (DBG_ERROR, errMXP_NoClosingSemicolonInArgument, ! CFormat ("No closing \";\" in MXP element argument \"%s\"", (LPCTSTR) pArgument->strValue)); return; } --- 420,426 ---- if (*p != ';') { MXP_error (DBG_ERROR, errMXP_NoClosingSemicolonInArgument, ! TFormat ("No closing \";\" in MXP element argument \"%s\"", (LPCTSTR) pArgument->strValue)); return; } *************** *** 471,477 **** // stil empty? Warn them. if (strReplacement.IsEmpty ()) MXP_error (DBG_WARNING, wrnMXP_ArgumentNotSupplied, ! CFormat ("Non-default argument \"%s\" not supplied to <%s>", (LPCTSTR) strEntity, (LPCTSTR) strName )); --- 471,477 ---- // stil empty? Warn them. if (strReplacement.IsEmpty ()) MXP_error (DBG_WARNING, wrnMXP_ArgumentNotSupplied, ! TFormat ("Non-default argument \"%s\" not supplied to <%s>", (LPCTSTR) strEntity, (LPCTSTR) strName )); *************** *** 578,584 **** long iCount = ArgumentList.GetCount (); CString strType = "MXP open tag"; ! CString strReason = CFormat ("opening MXP tag %s", (LPCTSTR) strName); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) { --- 578,584 ---- long iCount = ArgumentList.GetCount (); CString strType = "MXP open tag"; ! CString strReason = TFormat ("opening MXP tag %s", (LPCTSTR) strName); if (GetScriptEngine () && GetScriptEngine ()->IsLua ()) { Index: mxputils.cpp =================================================================== RCS file: /cvs/mushclient/mxputils.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** mxputils.cpp 3 Apr 2007 23:10:18 -0000 1.8 --- mxputils.cpp 12 Jun 2007 04:02:02 -0000 1.9 *************** *** 137,143 **** if (!strTag.IsEmpty ()) { MXP_error (DBG_ERROR, errMXP_InvalidArgumentName, ! CFormat ("Invalid parameter name: \"%s\"", (LPCTSTR) strArgumentName)); return true; } --- 137,143 ---- if (!strTag.IsEmpty ()) { MXP_error (DBG_ERROR, errMXP_InvalidArgumentName, ! TFormat ("Invalid parameter name: \"%s\"", (LPCTSTR) strArgumentName)); return true; } *************** *** 158,164 **** if (!IsValidName (strArgumentName)) // check name valid { MXP_error (DBG_ERROR, errMXP_InvalidArgumentName, ! CFormat ("Invalid parameter name: \"%s\"", (LPCTSTR) strArgumentName)); return true; } --- 158,164 ---- if (!IsValidName (strArgumentName)) // check name valid { MXP_error (DBG_ERROR, errMXP_InvalidArgumentName, ! TFormat ("Invalid parameter name: \"%s\"", (LPCTSTR) strArgumentName)); return true; } *************** *** 167,173 **** if (bEnd) { MXP_error (DBG_ERROR, errMXP_NoArgument, ! CFormat ("No argument value supplied for: \"%s\"", (LPCTSTR) strArgumentName)); return true; } --- 167,173 ---- if (bEnd) { MXP_error (DBG_ERROR, errMXP_NoArgument, ! TFormat ("No argument value supplied for: \"%s\"", (LPCTSTR) strArgumentName)); return true; } *************** *** 518,531 **** { if (pArgument->strName.IsEmpty ()) MXP_error (DBG_WARNING, wrnMXP_UnusedArgument, ! CFormat ("Unused argument (%i) for <%s>: %s", pArgument->iPosition, (LPCTSTR) strTag, (LPCTSTR) pArgument->strValue )); else MXP_error (DBG_WARNING, wrnMXP_UnusedArgument, ! CFormat ("Unused argument for <%s>: %s=\"%s\"", (LPCTSTR) strTag, (LPCTSTR) pArgument->strName, (LPCTSTR) pArgument->strValue --- 518,531 ---- { if (pArgument->strName.IsEmpty ()) MXP_error (DBG_WARNING, wrnMXP_UnusedArgument, ! TFormat ("Unused argument (%i) for <%s>: %s", pArgument->iPosition, (LPCTSTR) strTag, (LPCTSTR) pArgument->strValue )); else MXP_error (DBG_WARNING, wrnMXP_UnusedArgument, ! TFormat ("Unused argument for <%s>: %s=\"%s\"", (LPCTSTR) strTag, (LPCTSTR) pArgument->strName, (LPCTSTR) pArgument->strValue Index: password.cpp =================================================================== RCS file: /cvs/mushclient/password.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** password.cpp 20 Apr 2007 02:51:41 -0000 1.6 --- password.cpp 11 Jun 2007 21:40:12 -0000 1.7 *************** *** 39,45 **** m_password.TrimRight (); if(m_password.IsEmpty ()) { ! ::AfxMessageBox("Your password cannot be blank."); DDX_Text(pDX, IDC_PASSWORD, m_password); pDX->Fail(); } // end of password being blank --- 39,45 ---- m_password.TrimRight (); if(m_password.IsEmpty ()) { ! ::TMessageBox("Your password cannot be blank."); DDX_Text(pDX, IDC_PASSWORD, m_password); pDX->Fail(); } // end of password being blank Index: pcre_compile.c =================================================================== RCS file: /cvs/mushclient/pcre_compile.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** pcre_compile.c 8 Jun 2007 01:30:36 -0000 1.5 --- pcre_compile.c 11 Jun 2007 23:44:15 -0000 1.6 *************** *** 174,250 **** they are documented. Always add a new error instead. Messages marked DEAD below are no longer used. */ static const char *error_texts[] = { ! "no error", ! "\\ at end of pattern", ! "\\c at end of pattern", ! "unrecognized character follows \\", ! "numbers out of order in {} quantifier", ! /* 5 */ ! "number too big in {} quantifier", ! "missing terminating ] for character class", ! "invalid escape sequence in character class", ! "range out of order in character class", ! "nothing to repeat", /* 10 */ ! "operand of unlimited repeat could match the empty string", /** DEAD **/ ! "internal error: unexpected repeat", ! "unrecognized character after (?", ! "POSIX named classes are supported only within a class", ! "missing )", ! /* 15 */ ! "reference to non-existent subpattern", ! "erroffset passed as NULL", ! "unknown option bit(s) set", ! "missing ) after comment", ! "parentheses nested too deeply", /** DEAD **/ ! /* 20 */ ! "regular expression too large", ! "failed to get memory", ! "unmatched parentheses", ! "internal error: code overflow", ! "unrecognized character after (?<", ! /* 25 */ ! "lookbehind assertion is not fixed length", ! "malformed number or name after (?(", ! "conditional group contains more than two branches", ! "assertion expected after (?(", ! "(?R or (?[+-]digits must be followed by )", ! /* 30 */ ! "unknown POSIX class name", ! "POSIX collating elements are not supported", ! "this version of PCRE is not compiled with PCRE_UTF8 support", ! "spare error", /** DEAD **/ ! "character value in \\x{...} sequence is too large", ! /* 35 */ ! "invalid condition (?(0)", ! "\\C not allowed in lookbehind assertion", ! "PCRE does not support \\L, \\l, \\N, \\U, or \\u", ! "number after (?C is > 255", ! "closing ) for (?C expected", ! /* 40 */ ! "recursive call could loop indefinitely", ! "unrecognized character after (?P", ! "syntax error in subpattern name (missing terminator)", ! "two named subpatterns have the same name", ! "invalid UTF-8 string", ! /* 45 */ ! "support for \\P, \\p, and \\X has not been compiled", ! "malformed \\P or \\p sequence", ! "unknown property name after \\P or \\p", ! "subpattern name is too long (maximum " XSTRING(MAX_NAME_SIZE) " characters)", ! "too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")", ! /* 50 */ ! "repeated subpattern is too long", ! "octal value is greater than \\377 (not in UTF-8 mode)", ! "internal error: overran compiling workspace", ! "internal error: previously-checked referenced subpattern not found", ! "DEFINE group contains more than one branch", ! /* 55 */ ! "repeating a DEFINE group is not allowed", ! "inconsistent NEWLINE options", ! "\\g is not followed by a braced name or an optionally braced non-zero number", ! "(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number" }; --- 174,254 ---- they are documented. Always add a new error instead. Messages marked DEAD below are no longer used. */ + // strings marked with this macro are to be translated in the localization file + // however not at runtime (ie. they are in a table, and the table lookup will be translated) + #define Translate_NoOp(string) (string) + static const char *error_texts[] = { ! Translate_NoOp ( "no error"), ! Translate_NoOp ( "\\ at end of pattern"), ! Translate_NoOp ( "\\c at end of pattern"), ! Translate_NoOp ( "unrecognized character follows \\"), ! Translate_NoOp ( "numbers out of order in {} quantifier"), ! /* 5 */ ! Translate_NoOp ( "number too big in {} quantifier"), ! Translate_NoOp ( "missing terminating ] for character class"), ! Translate_NoOp ( "invalid escape sequence in character class"), ! Translate_NoOp ( "range out of order in character class"), ! Translate_NoOp ( "nothing to repeat"), /* 10 */ ! Translate_NoOp ( "operand of unlimited repeat could match the empty string"), /** DEAD **/ ! Translate_NoOp ( "internal error: unexpected repeat"), ! Translate_NoOp ( "unrecognized character after (?"), ! Translate_NoOp ( "POSIX named classes are supported only within a class"), ! Translate_NoOp ( "missing )"), ! /* 15 */ ! Translate_NoOp ( "reference to non-existent subpattern"), ! Translate_NoOp ( "erroffset passed as NULL"), ! Translate_NoOp ( "unknown option bit(s) set"), ! Translate_NoOp ( "missing ) after comment"), ! Translate_NoOp ( "parentheses nested too deeply"), /** DEAD **/ ! /* 20 */ ! Translate_NoOp ( "regular expression too large"), ! Translate_NoOp ( "failed to get memory"), ! Translate_NoOp ( "unmatched parentheses"), ! Translate_NoOp ( "internal error: code overflow"), ! Translate_NoOp ( "unrecognized character after (?<"), ! /* 25 */ ! Translate_NoOp ( "lookbehind assertion is not fixed length"), ! Translate_NoOp ( "malformed number or name after (?("), ! Translate_NoOp ( "conditional group contains more than two branches"), ! Translate_NoOp ( "assertion expected after (?("), ! Translate_NoOp ( "(?R or (?[+-]digits must be followed by )"), ! /* 30 */ ! Translate_NoOp ( "unknown POSIX class name"), ! Translate_NoOp ( "POSIX collating elements are not supported"), ! Translate_NoOp ( "this version of PCRE is not compiled with PCRE_UTF8 support"), ! Translate_NoOp ( "spare error"), /** DEAD **/ ! Translate_NoOp ( "character value in \\x{...} sequence is too large"), ! /* 35 */ ! Translate_NoOp ( "invalid condition (?(0)"), ! Translate_NoOp ( "\\C not allowed in lookbehind assertion"), ! Translate_NoOp ( "PCRE does not support \\L, \\l, \\N, \\U, or \\u"), ! Translate_NoOp ( "number after (?C is > 255"), ! Translate_NoOp ( "closing ) for (?C expected"), ! /* 40 */ ! Translate_NoOp ( "recursive call could loop indefinitely"), ! Translate_NoOp ( "unrecognized character after (?P"), ! Translate_NoOp ( "syntax error in subpattern name (missing terminator)"), ! Translate_NoOp ( "two named subpatterns have the same name"), ! Translate_NoOp ( "invalid UTF-8 string"), ! /* 45 */ ! Translate_NoOp ( "support for \\P, \\p, and \\X has not been compiled"), ! Translate_NoOp ( "malformed \\P or \\p sequence"), ! Translate_NoOp ( "unknown property name after \\P or \\p"), ! Translate_NoOp ( "subpattern name is too long (maximum " XSTRING(MAX_NAME_SIZE) " characters)"), ! Translate_NoOp ( "too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")"), ! /* 50 */ ! Translate_NoOp ( "repeated subpattern is too long"), ! Translate_NoOp ( "octal value is greater than \\377 (not in UTF-8 mode)"), ! Translate_NoOp ( "internal error: overran compiling workspace"), ! Translate_NoOp ( "internal error: previously-checked referenced subpattern not found"), ! Translate_NoOp ( "DEFINE group contains more than one branch"), ! /* 55 */ ! Translate_NoOp ( "repeating a DEFINE group is not allowed"), ! Translate_NoOp ( "inconsistent NEWLINE options"), ! Translate_NoOp ( "\\g is not followed by a braced name or an optionally braced non-zero number"), ! Translate_NoOp ( "(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number") }; Index: plugins.cpp =================================================================== RCS file: /cvs/mushclient/plugins.cpp,v retrieving revision 1.39 retrieving revision 1.42 diff -c -r1.39 -r1.42 *** plugins.cpp 10 May 2007 01:19:25 -0000 1.39 --- plugins.cpp 12 Jun 2007 04:02:02 -0000 1.42 *************** *** 113,121 **** long nInvocationCount = 0; ! CString strType = CFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = CFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); --- 113,121 ---- long nInvocationCount = 0; ! CString strType = TFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = TFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); *************** *** 164,173 **** long nInvocationCount = 0; ! CString strType = CFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = CFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); --- 164,173 ---- long nInvocationCount = 0; ! CString strType = TFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = TFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); *************** *** 250,257 **** long nInvocationCount = 0; ! CString strType = CFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = CFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); --- 250,257 ---- long nInvocationCount = 0; ! CString strType = TFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = TFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); *************** *** 337,344 **** m_pDoc->m_CurrentPlugin = this; ! CString strType = CFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = CFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); --- 337,344 ---- m_pDoc->m_CurrentPlugin = this; ! CString strType = TFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = TFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); *************** *** 430,437 **** m_pDoc->m_CurrentPlugin = this; ! CString strType = CFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = CFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); --- 430,437 ---- m_pDoc->m_CurrentPlugin = this; ! CString strType = TFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = TFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); *************** *** 522,531 **** long nInvocationCount = 0; ! CString strType = CFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = CFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); --- 522,531 ---- long nInvocationCount = 0; ! CString strType = TFormat ("Plugin %s", (LPCTSTR) m_strName); ! CString strReason = TFormat ("Executing plugin %s sub %s", (LPCTSTR) m_strName, sName ); *************** *** 616,622 **** ar = new CArchive(f, CArchive::store); ! CString strComment = CFormat ("Plugin state saved. Plugin: \"%s\". World: \"%s\".", (LPCTSTR) m_strName, (LPCTSTR) m_pDoc->m_mush_name); --- 616,622 ---- ar = new CArchive(f, CArchive::store); ! CString strComment = TFormat ("Plugin state saved. Plugin: \"%s\". World: \"%s\".", (LPCTSTR) m_strName, (LPCTSTR) m_pDoc->m_mush_name); *************** *** 629,636 **** catch (CFileException * e) { ! ::AfxMessageBox ( ! CFormat ("Unable to create the plugin save state file: %s", (LPCTSTR) strFilename), MB_ICONEXCLAMATION); e->Delete (); --- 629,636 ---- catch (CFileException * e) { ! ::UMessageBox ( ! TFormat ("Unable to create the plugin save state file: %s", (LPCTSTR) strFilename), MB_ICONEXCLAMATION); e->Delete (); *************** *** 638,645 **** catch (CMemoryException * e) { ! ::AfxMessageBox ( ! CFormat ("Insufficient memory to write the plugin save state file: %s", (LPCTSTR) strFilename), MB_ICONEXCLAMATION); e->Delete (); --- 638,645 ---- catch (CMemoryException * e) { ! ::UMessageBox ( ! TFormat ("Insufficient memory to write the plugin save state file: %s", (LPCTSTR) strFilename), MB_ICONEXCLAMATION); e->Delete (); *************** *** 647,654 **** catch (CArchiveException * e) { ! ::AfxMessageBox ( ! CFormat ("There was a problem saving the plugin save state file: %s", (LPCTSTR) strFilename), MB_ICONEXCLAMATION); e->Delete (); --- 647,654 ---- catch (CArchiveException * e) { ! ::UMessageBox ( ! TFormat ("There was a problem saving the plugin save state file: %s", (LPCTSTR) strFilename), MB_ICONEXCLAMATION); e->Delete (); *************** *** 797,803 **** // when did we save it? ar.WriteString (CFormat ("" NL, FixHTMLString (CTime::GetCurrentTime().Format ! ("%A, %B %d, %Y, %#I:%M %p")))); // which version was it? ar.WriteString (CFormat --- 797,803 ---- // when did we save it? ar.WriteString (CFormat ("" NL, FixHTMLString (CTime::GetCurrentTime().Format ! (TranslateTime ("%A, %B %d, %Y, %#I:%M %p"))))); // which version was it? ar.WriteString (CFormat Index: prefspropertypages.cpp =================================================================== RCS file: /cvs/mushclient/prefspropertypages.cpp,v retrieving revision 1.100 retrieving revision 1.102 diff -c -r1.100 -r1.102 *** prefspropertypages.cpp 26 Apr 2007 02:55:45 -0000 1.100 --- prefspropertypages.cpp 12 Jun 2007 04:02:02 -0000 1.102 *************** *** 136,142 **** if(m_mush_name.IsEmpty ()) { ! ::AfxMessageBox("Your world name cannot be blank.\n\n" "You must fill in your world name, TCP/IP address and " "port number before tabbing to other configuration screens"); DDX_Text(pDX, IDC_MUSH_NAME, m_mush_name); --- 136,142 ---- if(m_mush_name.IsEmpty ()) { ! ::TMessageBox("Your world name cannot be blank.\n\n" "You must fill in your world name, TCP/IP address and " "port number before tabbing to other configuration screens"); DDX_Text(pDX, IDC_MUSH_NAME, m_mush_name); *************** *** 148,161 **** if(m_server.IsEmpty ()) { ! ::AfxMessageBox("The world IP address cannot be blank."); DDX_Text(pDX, IDC_SERVER, m_server); pDX->Fail(); } // end of server name being blank if (m_port == 0) { ! ::AfxMessageBox("The world port number must be specified."); DDX_Text(pDX, IDC_CHANNEL, m_port); pDX->Fail(); } // end of port being zero --- 148,161 ---- if(m_server.IsEmpty ()) { ! ::TMessageBox("The world IP address cannot be blank."); DDX_Text(pDX, IDC_SERVER, m_server); pDX->Fail(); } // end of server name being blank if (m_port == 0) { ! ::TMessageBox("The world port number must be specified."); DDX_Text(pDX, IDC_CHANNEL, m_port); pDX->Fail(); } // end of port being zero *************** *** 172,192 **** case eProxyServerSocks5: // socks 5 if (m_strProxyServerName.IsEmpty ()) { ! ::AfxMessageBox("The proxy server address cannot be blank."); DDX_Text(pDX, IDC_PROXY_SERVER_NAME, m_strProxyServerName); pDX->Fail(); } // end of proxy server name being blank if (m_iProxyServerPort == 0) { ! ::AfxMessageBox("The proxy server port must be specified."); DDX_Text(pDX, IDC_PROXY_PORT, m_iProxyServerPort); pDX->Fail(); } // end of proxy server port being zero break; default: ! ::AfxMessageBox("Unknown proxy server type."); pDX->Fail(); break; --- 172,192 ---- case eProxyServerSocks5: // socks 5 if (m_strProxyServerName.IsEmpty ()) { ! ::TMessageBox("The proxy server address cannot be blank."); DDX_Text(pDX, IDC_PROXY_SERVER_NAME, m_strProxyServerName); pDX->Fail(); } // end of proxy server name being blank if (m_iProxyServerPort == 0) { ! ::TMessageBox("The proxy server port must be specified."); DDX_Text(pDX, IDC_PROXY_PORT, m_iProxyServerPort); pDX->Fail(); } // end of proxy server port being zero break; default: ! ::TMessageBox("Unknown proxy server type."); pDX->Fail(); break; *************** *** 947,953 **** if ((++m_RH_click_count % 3) == 0) { ! // ::AfxMessageBox ("But does it get goat's blood out?", MB_YESNO |MB_ICONQUESTION); // CEasterEggDlg dlg; // dlg.DoModal (); CSplashWnd::ShowSplashScreen(&Frame, IDB_NICK); --- 947,953 ---- if ((++m_RH_click_count % 3) == 0) { ! // ::TMessageBox ("But does it get goat's blood out?", MB_YESNO |MB_ICONQUESTION); // CEasterEggDlg dlg; // dlg.DoModal (); CSplashWnd::ShowSplashScreen(&Frame, IDB_NICK); *************** *** 1058,1064 **** void CPrefsP3::OnDefaults() { ! if (::AfxMessageBox ("Reset all custom colours to MUSHclient defaults?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; --- 1058,1064 ---- void CPrefsP3::OnDefaults() { ! if (::TMessageBox ("Reset all custom colours to MUSHclient defaults?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; *************** *** 1088,1094 **** void CPrefsP3::OnRandom() { ! if (::AfxMessageBox ("Make all colours random?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; --- 1088,1094 ---- void CPrefsP3::OnRandom() { ! if (::TMessageBox ("Make all colours random?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; *************** *** 1167,1173 **** { // check if output is not logged, sounds strange. if (!m_bLogOutput && !m_bLogRaw) ! if (::AfxMessageBox ("You are not logging output from the MUD - is this intentional?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) pDX->Fail(); --- 1167,1173 ---- { // check if output is not logged, sounds strange. if (!m_bLogOutput && !m_bLogRaw) ! if (::TMessageBox ("You are not logging output from the MUD - is this intentional?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) pDX->Fail(); *************** *** 1318,1324 **** if (pDX->m_bSaveAndValidate) if (m_ctlUseDefaultColours.GetCheck ()) if (m_ctlUseDefaultColours.GetCheck () != m_bUseDefaultColours) ! if (::AfxMessageBox ("By checking the option \"Override with default colours\" " " your existing colours will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) --- 1318,1324 ---- if (pDX->m_bSaveAndValidate) if (m_ctlUseDefaultColours.GetCheck ()) if (m_ctlUseDefaultColours.GetCheck () != m_bUseDefaultColours) ! if (::TMessageBox ("By checking the option \"Override with default colours\" " " your existing colours will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) *************** *** 1489,1495 **** void CPrefsP5::OnAnsiColours() { ! if (::AfxMessageBox ("Reset all colours to the ANSI defaults?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; --- 1489,1495 ---- void CPrefsP5::OnAnsiColours() { ! if (::TMessageBox ("Reset all colours to the ANSI defaults?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; *************** *** 1855,1861 **** void CPrefsP5::OnCopyToCustom() { ! if (::AfxMessageBox ("Copy all 16 colours to the custom colours?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; --- 1855,1861 ---- void CPrefsP5::OnCopyToCustom() { ! if (::TMessageBox ("Copy all 16 colours to the custom colours?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; *************** *** 1907,1913 **** void CPrefsP5::OnRandom() { ! if (::AfxMessageBox ("Make all colours random?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; --- 1907,1913 ---- void CPrefsP5::OnRandom() { ! if (::TMessageBox ("Make all colours random?", MB_YESNO | MB_ICONQUESTION) != IDYES) return; *************** *** 2072,2078 **** if (pDX->m_bSaveAndValidate) if (m_ctlUseDefaultMacros.GetCheck ()) if (m_ctlUseDefaultMacros.GetCheck () != m_bUseDefaultMacros) ! if (::AfxMessageBox ("By checking the option \"Override with default macros\" " " your existing macros will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) --- 2072,2078 ---- if (pDX->m_bSaveAndValidate) if (m_ctlUseDefaultMacros.GetCheck ()) if (m_ctlUseDefaultMacros.GetCheck () != m_bUseDefaultMacros) ! if (::TMessageBox ("By checking the option \"Override with default macros\" " " your existing macros will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) *************** *** 2352,2360 **** App.RestoreColumnConfiguration ("Macro List", eColumnCount, m_ctlMacroList, iColOrder, iColWidth, m_last_col, m_reverse); ! m_ctlMacroList.InsertColumn(0, "Macro name", LVCFMT_LEFT, iColWidth [eColumnName]); ! m_ctlMacroList.InsertColumn(1, "Text", LVCFMT_LEFT, iColWidth [eColumnText]); ! m_ctlMacroList.InsertColumn(2, "Action", LVCFMT_LEFT, iColWidth [eColumnAction]); // recover column sequence --- 2352,2360 ---- App.RestoreColumnConfiguration ("Macro List", eColumnCount, m_ctlMacroList, iColOrder, iColWidth, m_last_col, m_reverse); ! m_ctlMacroList.InsertColumn(0, TranslateHeading ("Macro name"), LVCFMT_LEFT, iColWidth [eColumnName]); ! m_ctlMacroList.InsertColumn(1, TranslateHeading ("Text"), LVCFMT_LEFT, iColWidth [eColumnText]); ! m_ctlMacroList.InsertColumn(2, TranslateHeading ("Action"), LVCFMT_LEFT, iColWidth [eColumnAction]); // recover column sequence *************** *** 2515,2521 **** if (m_ctlUseDefaultAliases.GetCheck ()) if (m_ctlUseDefaultAliases.GetCheck () != m_bUseDefaultAliases) if (m_doc->m_AliasMap.GetCount () > 0) ! if (::AfxMessageBox (CFormat ("By checking the option \"Override with default aliases\" " " your existing %i aliase(s) will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", m_doc->m_AliasMap.GetCount ()), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) --- 2515,2521 ---- if (m_ctlUseDefaultAliases.GetCheck ()) if (m_ctlUseDefaultAliases.GetCheck () != m_bUseDefaultAliases) if (m_doc->m_AliasMap.GetCount () > 0) ! if (::UMessageBox (TFormat ("By checking the option \"Override with default aliases\" " " your existing %i aliase(s) will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", m_doc->m_AliasMap.GetCount ()), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) *************** *** 2640,2646 **** alias_item->regexp->m_program == NULL && alias_item->regexp->m_iExecutionError < PCRE_ERROR_NOMATCH) dlg->m_strRegexpError = ! CFormat ("Error: %s ", Convert_PCRE_Runtime_Error (alias_item->regexp->m_iExecutionError)); // NB - also see MapDlg.cpp for alias processing --- 2640,2646 ---- alias_item->regexp->m_program == NULL && alias_item->regexp->m_iExecutionError < PCRE_ERROR_NOMATCH) dlg->m_strRegexpError = ! TFormat ("Error: %s ", Convert_PCRE_Runtime_Error (alias_item->regexp->m_iExecutionError)); // NB - also see MapDlg.cpp for alias processing *************** *** 3004,3015 **** m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg.Format ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; --- 3004,3015 ---- m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; *************** *** 3022,3028 **** int iSeq = alias->iSequence; if (iSeq == 0) ! ::AfxMessageBox ("Cannot move up - already has a sequence of zero"); else { --- 3022,3028 ---- int iSeq = alias->iSequence; if (iSeq == 0) ! ::TMessageBox ("Cannot move up - already has a sequence of zero"); else { *************** *** 3040,3046 **** alias->iSequence--; // make a lower sequence (drop out of group) else if (iLower == -1) ! ::AfxMessageBox ("Cannot move up - already at top of list"); else alias->iSequence = iLower; // move into lower group --- 3040,3046 ---- alias->iSequence--; // make a lower sequence (drop out of group) else if (iLower == -1) ! ::TMessageBox ("Cannot move up - already at top of list"); else alias->iSequence = iLower; // move into lower group *************** *** 3087,3098 **** m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg.Format ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; --- 3087,3098 ---- m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; *************** *** 3105,3111 **** int iSeq = alias->iSequence; if (iSeq == 10000) ! ::AfxMessageBox ("Cannot move down - already has a sequence of 10000"); else { --- 3105,3111 ---- int iSeq = alias->iSequence; if (iSeq == 10000) ! ::TMessageBox ("Cannot move down - already has a sequence of 10000"); else { *************** *** 3124,3130 **** alias->iSequence++; // make a higher sequence (jump out of group) else if (iHigher == -1) ! ::AfxMessageBox ("Cannot move down - already at bottom of list"); else alias->iSequence = iHigher; // move into Higher group --- 3124,3130 ---- alias->iSequence++; // make a higher sequence (jump out of group) else if (iHigher == -1) ! ::TMessageBox ("Cannot move down - already at bottom of list"); else alias->iSequence = iHigher; // move into Higher group *************** *** 3273,3279 **** if (m_ctlUseDefaultTriggers.GetCheck ()) if (m_ctlUseDefaultTriggers.GetCheck () != m_bUseDefaultTriggers) if (m_doc->m_TriggerMap.GetCount () > 0) ! if (::AfxMessageBox (CFormat ("By checking the option \"Override with default triggers\" " " your existing %i trigger%s will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", PLURAL (m_doc->m_TriggerMap.GetCount ())), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) --- 3273,3279 ---- if (m_ctlUseDefaultTriggers.GetCheck ()) if (m_ctlUseDefaultTriggers.GetCheck () != m_bUseDefaultTriggers) if (m_doc->m_TriggerMap.GetCount () > 0) ! if (::UMessageBox (TFormat ("By checking the option \"Override with default triggers\" " " your existing %i trigger%s will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", PLURAL (m_doc->m_TriggerMap.GetCount ())), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) *************** *** 3467,3473 **** trigger_item->regexp->m_program == NULL && trigger_item->regexp->m_iExecutionError < PCRE_ERROR_NOMATCH) dlg->m_strRegexpError = ! CFormat ("Error: %s ", Convert_PCRE_Runtime_Error (trigger_item->regexp->m_iExecutionError)); } // end of CPrefsP8::LoadDialog --- 3467,3473 ---- trigger_item->regexp->m_program == NULL && trigger_item->regexp->m_iExecutionError < PCRE_ERROR_NOMATCH) dlg->m_strRegexpError = ! TFormat ("Error: %s ", Convert_PCRE_Runtime_Error (trigger_item->regexp->m_iExecutionError)); } // end of CPrefsP8::LoadDialog *************** *** 3957,3968 **** m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg.Format ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; --- 3957,3968 ---- m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; *************** *** 3975,3981 **** int iSeq = trigger->iSequence; if (iSeq == 0) ! ::AfxMessageBox ("Cannot move up - already has a sequence of zero"); else { --- 3975,3981 ---- int iSeq = trigger->iSequence; if (iSeq == 0) ! ::TMessageBox ("Cannot move up - already has a sequence of zero"); else { *************** *** 3993,3999 **** trigger->iSequence--; // make a lower sequence (drop out of group) else if (iLower == -1) ! ::AfxMessageBox ("Cannot move up - already at top of list"); else trigger->iSequence = iLower; // move into lower group --- 3993,3999 ---- trigger->iSequence--; // make a lower sequence (drop out of group) else if (iLower == -1) ! ::TMessageBox ("Cannot move up - already at top of list"); else trigger->iSequence = iLower; // move into lower group *************** *** 4040,4051 **** m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg.Format ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::AfxMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; --- 4040,4051 ---- m_ctlList->DeleteItem (nItem); // it's gone, so delete it from the list view m_ctlList->RedrawItems (0, m_ctlList->GetItemCount () - 1); // redraw the list ! strMsg = TFormat ("The %s named \"%s\" is no longer in the %s list", (LPCTSTR) m_strObjectType, (LPCTSTR) *pstrObjectName, (LPCTSTR) m_strObjectType); ! ::UMessageBox (strMsg); delete pstrObjectName; // and get rid of its name string continue; *************** *** 4058,4064 **** int iSeq = trigger->iSequence; if (iSeq == 10000) ! ::AfxMessageBox ("Cannot move down - already has a sequence of 10000"); else { --- 4058,4064 ---- int iSeq = trigger->iSequence; if (iSeq == 10000) ! ::TMessageBox ("Cannot move down - already has a sequence of 10000"); else { *************** *** 4077,4083 **** trigger->iSequence++; // make a higher sequence (jump out of group) else if (iHigher == -1) ! ::AfxMessageBox ("Cannot move down - already at bottom of list"); else trigger->iSequence = iHigher; // move into Higher group --- 4077,4083 ---- trigger->iSequence++; // make a higher sequence (jump out of group) else if (iHigher == -1) ! ::TMessageBox ("Cannot move down - already at bottom of list"); else trigger->iSequence = iHigher; // move into Higher group *************** *** 4291,4297 **** if(m_enable_speed_walk && m_speed_walk_prefix.IsEmpty ()) { ! ::AfxMessageBox("You must supply a speed-walk prefix."); DDX_Text(pDX, IDC_SPEED_WALK_PREFIX, m_speed_walk_prefix); pDX->Fail(); } // end of contents being blank --- 4291,4297 ---- if(m_enable_speed_walk && m_speed_walk_prefix.IsEmpty ()) { ! ::TMessageBox("You must supply a speed-walk prefix."); DDX_Text(pDX, IDC_SPEED_WALK_PREFIX, m_speed_walk_prefix); pDX->Fail(); } // end of contents being blank *************** *** 4299,4312 **** if(m_enable_command_stacking && m_command_stack_character.IsEmpty ()) { ! ::AfxMessageBox("You must supply a command stack character."); DDX_Text(pDX, IDC_COMMAND_STACK_CHARACTER, m_command_stack_character); pDX->Fail(); } // end of command stack character being blank if(m_enable_command_stacking && !isprint (m_command_stack_character [0])) { ! ::AfxMessageBox("The command stack character is invalid."); DDX_Text(pDX, IDC_COMMAND_STACK_CHARACTER, m_command_stack_character); pDX->Fail(); } // end of command stack character being blank --- 4299,4312 ---- if(m_enable_command_stacking && m_command_stack_character.IsEmpty ()) { ! ::TMessageBox("You must supply a command stack character."); DDX_Text(pDX, IDC_COMMAND_STACK_CHARACTER, m_command_stack_character); pDX->Fail(); } // end of command stack character being blank if(m_enable_command_stacking && !isprint (m_command_stack_character [0])) { ! ::TMessageBox("The command stack character is invalid."); DDX_Text(pDX, IDC_COMMAND_STACK_CHARACTER, m_command_stack_character); pDX->Fail(); } // end of command stack character being blank *************** *** 4702,4712 **** length = f->GetLength (); if (length > 32000) ! ::AfxMessageBox ("File exceeds 32000 bytes in length, cannot be loaded", MB_ICONSTOP); else if (length <= 0) ! ::AfxMessageBox ("File is empty", MB_ICONSTOP); else { f->Read (m_notes.GetBuffer (length), length); --- 4702,4712 ---- length = f->GetLength (); if (length > 32000) ! ::TMessageBox ("File exceeds 32000 bytes in length, cannot be loaded", MB_ICONSTOP); else if (length <= 0) ! ::TMessageBox ("File is empty", MB_ICONSTOP); else { f->Read (m_notes.GetBuffer (length), length); *************** *** 4718,4730 **** catch (CFileException * e) { ! ::AfxMessageBox ("Unable to open or read the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::AfxMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception --- 4718,4730 ---- catch (CFileException * e) { ! ::TMessageBox ("Unable to open or read the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::TMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception *************** *** 4775,4787 **** catch (CFileException * e) { ! ::AfxMessageBox ("Unable to open or write the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::AfxMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception --- 4775,4787 ---- catch (CFileException * e) { ! ::TMessageBox ("Unable to open or write the requested file", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a file exception catch (CMemoryException * e) { ! ::TMessageBox ("Insufficient memory to do this operation", MB_ICONEXCLAMATION); e->Delete (); } // end of catching a memory exception *************** *** 4871,4877 **** if (dlg.m_bRegexp) { ! ::AfxMessageBox ("Regular expressions not supported here.", MB_ICONEXCLAMATION); return; } --- 4871,4877 ---- if (dlg.m_bRegexp) { ! ::TMessageBox ("Regular expressions not supported here.", MB_ICONEXCLAMATION); return; } *************** *** 5372,5382 **** { CString strMsg; ! strMsg.Format ("You are allocating %ld lines for your output buffer, but have " "only %ld Mb of physical RAM. This is not recommended. Do you wish to " "continue anyway?", m_nLines, MemStat.dwTotalPhys / 1024L / 1024L); ! if (::AfxMessageBox (strMsg, MB_ICONQUESTION | MB_YESNO) == IDNO) pDX->Fail (); } // end of not having enough memory --- 5372,5382 ---- { CString strMsg; ! strMsg = TFormat ("You are allocating %ld lines for your output buffer, but have " "only %ld Mb of physical RAM. This is not recommended. Do you wish to " "continue anyway?", m_nLines, MemStat.dwTotalPhys / 1024L / 1024L); ! if (::UMessageBox (strMsg, MB_ICONQUESTION | MB_YESNO) == IDNO) pDX->Fail (); } // end of not having enough memory *************** *** 5425,5434 **** CString strMsg; ! strMsg.Format ("You are allocating %ld lines for your output buffer, but may " "only allocate %ld lines due to a limitation under Windows 95", m_nLines, nMaxlines); ! ::AfxMessageBox (strMsg, MB_ICONSTOP); pDX->Fail (); } // end of them allocating too many lines --- 5425,5434 ---- CString strMsg; ! strMsg = TFormat ("You are allocating %ld lines for your output buffer, but may " "only allocate %ld lines due to a limitation under Windows 95", m_nLines, nMaxlines); ! ::UMessageBox (strMsg, MB_ICONSTOP); pDX->Fail (); } // end of them allocating too many lines *************** *** 5769,5775 **** if (m_ctlUseDefaultTimers.GetCheck ()) if (m_ctlUseDefaultTimers.GetCheck () != m_bUseDefaultTimers) if (m_doc->m_TimerMap.GetCount () > 0) ! if (::AfxMessageBox (CFormat ("By checking the option \"Override with default timers\" " " your existing %i timer%s will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", PLURAL (m_doc->m_TimerMap.GetCount ())), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) --- 5769,5775 ---- if (m_ctlUseDefaultTimers.GetCheck ()) if (m_ctlUseDefaultTimers.GetCheck () != m_bUseDefaultTimers) if (m_doc->m_TimerMap.GetCount () > 0) ! if (::UMessageBox (TFormat ("By checking the option \"Override with default timers\" " " your existing %i timer%s will be PERMANENTLY discarded next time you open this world.\n\n" "Are you SURE you want to do this?", PLURAL (m_doc->m_TimerMap.GetCount ())), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2 ) != IDYES) *************** *** 6724,6730 **** // Call the entry point. hr = (*lpDllEntryPoint) (); ! ::AfxMessageBox (CFormat ("Successfully registered %s", (LPCTSTR) strDLLname), MB_ICONINFORMATION); } // end of try block --- 6724,6730 ---- // Call the entry point. hr = (*lpDllEntryPoint) (); ! ::UMessageBox (TFormat ("Successfully registered %s", (LPCTSTR) strDLLname), MB_ICONINFORMATION); } // end of try block *************** *** 6755,6761 **** pNewDoc->m_iUniqueDocumentNumber = m_doc->m_iUniqueDocumentNumber; } else ! ::AfxMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); return; } // end of using inbuilt notepad --- 6755,6761 ---- pNewDoc->m_iUniqueDocumentNumber = m_doc->m_iUniqueDocumentNumber; } else ! ::TMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); return; } // end of using inbuilt notepad *************** *** 6763,6769 **** if ((long) ShellExecute (Frame, _T("open"), m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) m_strScriptFilename), NULL, SW_SHOWNORMAL) <= 32) ! ::AfxMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); } --- 6763,6769 ---- if ((long) ShellExecute (Frame, _T("open"), m_strScriptEditor, CFormat ("\"%s\"", (LPCTSTR) m_strScriptFilename), NULL, SW_SHOWNORMAL) <= 32) ! ::TMessageBox("Unable to edit the script file.", MB_ICONEXCLAMATION); } *************** *** 7241,7247 **** delete xmlf; // delete file if (iBadLines) ! ::AfxMessageBox (CFormat ("%i line%s could not be added as a variable.", PLURAL (iBadLines)), MB_ICONEXCLAMATION); --- 7241,7247 ---- delete xmlf; // delete file if (iBadLines) ! ::UMessageBox (TFormat ("%i line%s could not be added as a variable.", PLURAL (iBadLines)), MB_ICONEXCLAMATION); *************** *** 7255,7261 **** m_doc->SetModifiedFlag (TRUE); } ! ::AfxMessageBox (CFormat ("Loaded %i variable%s.", PLURAL (iCount)), MB_ICONINFORMATION); } --- 7255,7261 ---- m_doc->SetModifiedFlag (TRUE); } ! ::UMessageBox (TFormat ("Loaded %i variable%s.", PLURAL (iCount)), MB_ICONINFORMATION); } *************** *** 7267,7273 **** if (m_doc->m_VariableMap.IsEmpty ()) { ! ::AfxMessageBox ("No variables in this world."); return; } --- 7267,7273 ---- if (m_doc->m_VariableMap.IsEmpty ()) { ! ::TMessageBox ("No variables in this world."); return; } *************** *** 7310,7316 **** delete ar; // delete archive delete f; // delete file ! ::AfxMessageBox (CFormat ("Saved %i variable%s.", PLURAL (iCount)), MB_ICONINFORMATION); } --- 7310,7316 ---- delete ar; // delete archive delete f; // delete file ! ::UMessageBox (TFormat ("Saved %i variable%s.", PLURAL (iCount)), MB_ICONINFORMATION); } *************** *** 7399,7405 **** { if(m_strAutoSayString.IsEmpty ()) { ! ::AfxMessageBox("Your \"auto say\" string cannot be blank"); DDX_Text(pDX, IDC_AUTO_SAY_STRING, m_strAutoSayString); pDX->Fail(); return; --- 7399,7405 ---- { if(m_strAutoSayString.IsEmpty ()) { ! ::TMessageBox("Your \"auto say\" string cannot be blank"); DDX_Text(pDX, IDC_AUTO_SAY_STRING, m_strAutoSayString); pDX->Fail(); return; *************** *** 7591,7597 **** if(m_connect_now && m_name.IsEmpty ()) { ! ::AfxMessageBox("Your character name cannot be blank for auto-connect."); DDX_Text(pDX, IDC_CHARACTER, m_name); pDX->Fail(); } // end of character name being blank --- 7591,7597 ---- if(m_connect_now && m_name.IsEmpty ()) { ! ::TMessageBox("Your character name cannot be blank for auto-connect."); DDX_Text(pDX, IDC_CHARACTER, m_name); pDX->Fail(); } // end of character name being blank *************** *** 7640,7647 **** pCmdUI->Enable (); ! pCmdUI->SetText (CFormat ("(%i line%s)", PLURAL (iCount))); ! } // end of CPrefsP21::OnUpdateNeedSound ///////////////////////////////////////////////////////////////////////////// // Remember when pages become active, so we can return to the same page next time --- 7640,7647 ---- pCmdUI->Enable (); ! pCmdUI->SetText (TFormat ("(%i line%s)", PLURAL (iCount))); ! } // end of CPrefsP21::OnUpdateLineCount ///////////////////////////////////////////////////////////////////////////// // Remember when pages become active, so we can return to the same page next time *************** *** 8385,8391 **** nMemory += sizeof (void *) * 3; // and the list item } ! m_strBufferLines += CFormat (" (%i styles)", iStyles); SetDlgItemText(IDC_BUFFER_LINES, m_strBufferLines); CString strMemory, strKb; --- 8385,8391 ---- nMemory += sizeof (void *) * 3; // and the list item } ! m_strBufferLines += TFormat (" (%i styles)", iStyles); SetDlgItemText(IDC_BUFFER_LINES, m_strBufferLines); CString strMemory, strKb; Index: regexp.cpp =================================================================== RCS file: /cvs/mushclient/regexp.cpp,v retrieving revision 1.11 retrieving revision 1.13 diff -c -r1.11 -r1.13 *** regexp.cpp 22 Apr 2007 00:42:53 -0000 1.11 --- regexp.cpp 12 Jun 2007 04:02:02 -0000 1.13 *************** *** 87,96 **** } if (count == 0) ! ThrowErrorException ("Too many substrings in regular expression"); if (count < 0) ! ThrowErrorException (CFormat ("Error executing regular expression: %s", Convert_PCRE_Runtime_Error (count))); --- 87,96 ---- } if (count == 0) ! ThrowErrorException (Translate ("Too many substrings in regular expression")); if (count < 0) ! ThrowErrorException (TFormat ("Error executing regular expression: %s", Convert_PCRE_Runtime_Error (count))); *************** *** 123,135 **** } CRegexpProblemDlg dlg; ! dlg.m_strErrorMessage = error; dlg.m_strErrorMessage += "."; // end the sentence // make first character upper-case, so it looks like a sentence. :) dlg.m_strErrorMessage.SetAt (0, toupper (dlg.m_strErrorMessage [0])); ! dlg.m_strColumn = CFormat ("Error occurred at column %i.", erroroffset + 1); dlg.m_strText = strRegexp; dlg.m_strText += ENDLINE; if (erroroffset > 0) --- 123,135 ---- } CRegexpProblemDlg dlg; ! dlg.m_strErrorMessage = Translate (error); dlg.m_strErrorMessage += "."; // end the sentence // make first character upper-case, so it looks like a sentence. :) dlg.m_strErrorMessage.SetAt (0, toupper (dlg.m_strErrorMessage [0])); ! dlg.m_strColumn = TFormat ("Error occurred at column %i.", erroroffset + 1); dlg.m_strText = strRegexp; dlg.m_strText += ENDLINE; if (erroroffset > 0) Index: resource.h =================================================================== RCS file: /cvs/mushclient/resource.h,v retrieving revision 1.124 retrieving revision 1.125 diff -c -r1.124 -r1.125 *** resource.h 8 Jun 2007 01:30:36 -0000 1.124 --- resource.h 11 Jun 2007 23:44:15 -0000 1.125 *************** *** 1208,1213 **** --- 1208,1214 ---- #define IDC_UNICODE_CHARACTER 2891 #define IDC_REGEXP_ERROR 2892 #define IDC_ONE_SHOT 2893 + #define IDC_LOCALE 2895 #define IDS_CHANGEADDRESS 32100 #define IDS_DISCONNECT 32101 #define IDS_CREATEFAILED 32102 *************** *** 1561,1567 **** #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 346 #define _APS_NEXT_COMMAND_VALUE 33054 ! #define _APS_NEXT_CONTROL_VALUE 2895 #define _APS_NEXT_SYMED_VALUE 312 #endif #endif --- 1562,1568 ---- #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 346 #define _APS_NEXT_COMMAND_VALUE 33054 ! #define _APS_NEXT_CONTROL_VALUE 2896 #define _APS_NEXT_SYMED_VALUE 312 #endif #endif Index: scriptengine.cpp =================================================================== RCS file: /cvs/mushclient/scriptengine.cpp,v retrieving revision 1.17 retrieving revision 1.19 diff -c -r1.17 -r1.19 *** scriptengine.cpp 10 May 2007 01:19:25 -0000 1.17 --- scriptengine.cpp 12 Jun 2007 04:02:02 -0000 1.19 *************** *** 70,76 **** finish; SCRIPTSTATE ss; ! m_pDoc->Trace (CFormat ("Executing %s script \"%s\"", szType, szProcedure)); // Frame.SetStatusMessageNow (CFormat ("Executing %s subroutine \"%s\"", szType, szProcedure)); if (m_IActiveScript) --- 70,76 ---- finish; SCRIPTSTATE ss; ! m_pDoc->Trace (TFormat ("Executing %s script \"%s\"", szType, szProcedure)); // Frame.SetStatusMessageNow (CFormat ("Executing %s subroutine \"%s\"", szType, szProcedure)); if (m_IActiveScript) *************** *** 87,93 **** if (hr != S_OK) { ! ::AfxMessageBox (CFormat ("Script engine problem invoking subroutine \"%s\" when %s", (LPCTSTR) szProcedure, (LPCTSTR) szReason)); strProcedure.Empty (); --- 87,93 ---- if (hr != S_OK) { ! ::UMessageBox (TFormat ("Script engine problem invoking subroutine \"%s\" when %s", (LPCTSTR) szProcedure, (LPCTSTR) szReason)); strProcedure.Empty (); *************** *** 129,141 **** dispid = DISPID_UNKNOWN; // stop further invocations if (hr == 0x800a01c2) // wrong number of arguments ! ::AfxMessageBox (CFormat ("Wrong number of arguments for script subroutine \"%s\" when %s" "\n\nWe expected your subroutine to have %i argument%s", (LPCTSTR) szProcedure, (LPCTSTR) szReason, PLURAL (params.cArgs))); else ! ::AfxMessageBox (CFormat ("Unable to invoke script subroutine \"%s\" when %s", (LPCTSTR) szProcedure, (LPCTSTR) szReason)); } // end of bad invoke --- 129,141 ---- dispid = DISPID_UNKNOWN; // stop further invocations if (hr == 0x800a01c2) // wrong number of arguments ! ::UMessageBox (TFormat ("Wrong number of arguments for script subroutine \"%s\" when %s" "\n\nWe expected your subroutine to have %i argument%s", (LPCTSTR) szProcedure, (LPCTSTR) szReason, PLURAL (params.cArgs))); else ! ::UMessageBox (TFormat ("Unable to invoke script subroutine \"%s\" when %s", (LPCTSTR) szProcedure, (LPCTSTR) szReason)); } // end of bad invoke *************** *** 181,187 **** nLine = nLine + 1; // make 1-relative to be consistent with lua ! dlg.m_strEvent = CFormat ("Execution of line %i column %i", nLine, nChar + 1); dlg.m_strDescription = ei.bstrDescription; --- 181,187 ---- nLine = nLine + 1; // make 1-relative to be consistent with lua ! dlg.m_strEvent = TFormat ("Execution of line %i column %i", nLine, nChar + 1); dlg.m_strDescription = ei.bstrDescription; *************** *** 392,398 **** catch (...) { ! ::AfxMessageBox ("Something nasty happened whilst initialising the scripting engine"); throw; } --- 392,398 ---- catch (...) { ! ::TMessageBox ("Something nasty happened whilst initialising the scripting engine"); throw; } *************** *** 434,440 **** if (hr != S_OK) { ! ::AfxMessageBox ("Script engine problem on script parse"); return true; } --- 434,440 ---- if (hr != S_OK) { ! ::TMessageBox ("Script engine problem on script parse"); return true; } Index: scripting.cpp =================================================================== RCS file: /cvs/mushclient/scripting.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** scripting.cpp 10 May 2007 01:19:25 -0000 1.29 --- scripting.cpp 11 Jun 2007 21:40:12 -0000 1.30 *************** *** 24,30 **** if (m_ScriptEngine) { ! ::AfxMessageBox ("Error, scripting already active"); return false; } --- 24,30 ---- if (m_ScriptEngine) { ! ::TMessageBox ("Error, scripting already active"); return false; } *************** *** 393,402 **** { CString strText; ! strText.Format ("The script file \"%s\" has been modified. Do you wish to re-process it?", (LPCTSTR) m_strScriptFilename); if (bForce || m_nReloadOption == eReloadAlways || ! ::AfxMessageBox (strText, MB_YESNO | MB_ICONQUESTION) == IDYES) { DisableScripting (); CreateScriptEngine (); --- 393,402 ---- { CString strText; ! strText = TFormat ("The script file \"%s\" has been modified. Do you wish to re-process it?", (LPCTSTR) m_strScriptFilename); if (bForce || m_nReloadOption == eReloadAlways || ! ::UMessageBox (strText, MB_YESNO | MB_ICONQUESTION) == IDYES) { DisableScripting (); CreateScriptEngine (); *************** *** 425,435 **** CString strMsg; if (strLabel.IsEmpty ()) ! strMsg.Format ("The %s subroutine named \"%s\" could not be found.", (LPCTSTR) strType, (LPCTSTR) strName); else ! strMsg.Format ("The %s (%s) subroutine named \"%s\" could not be found.", (LPCTSTR) strType, (LPCTSTR) strLabel, (LPCTSTR) strName); --- 425,435 ---- CString strMsg; if (strLabel.IsEmpty ()) ! strMsg = TFormat ("The %s subroutine named \"%s\" could not be found.", (LPCTSTR) strType, (LPCTSTR) strName); else ! strMsg = TFormat ("The %s (%s) subroutine named \"%s\" could not be found.", (LPCTSTR) strType, (LPCTSTR) strLabel, (LPCTSTR) strName); *************** *** 438,446 **** if (strErrorMessage.IsEmpty ()) { if (m_strScriptFilename.IsEmpty ()) ! strErrorMessage = "You have not specified a script file name:"; else ! strErrorMessage.Format ("There was a problem in script file \"%s\":", (LPCTSTR) m_strScriptFilename); strErrorMessage += ENDLINE; } --- 438,446 ---- if (strErrorMessage.IsEmpty ()) { if (m_strScriptFilename.IsEmpty ()) ! strErrorMessage = Translate ("You have not specified a script file name:"); else ! strErrorMessage = TFormat ("There was a problem in script file \"%s\":", (LPCTSTR) m_strScriptFilename); strErrorMessage += ENDLINE; } Index: sendvw.cpp =================================================================== RCS file: /cvs/mushclient/sendvw.cpp,v retrieving revision 1.75 retrieving revision 1.77 diff -c -r1.75 -r1.77 *** sendvw.cpp 26 Apr 2007 06:10:10 -0000 1.75 --- sendvw.cpp 12 Jun 2007 04:02:02 -0000 1.77 *************** *** 985,995 **** CString str; ! str = "Logout from this character on "; ! str += pDoc->m_mush_name; ! str += "?"; ! if (::AfxMessageBox (str, MB_YESNO | MB_ICONQUESTION) == IDYES) SendMacro (MAC_LOGOUT); } --- 985,993 ---- CString str; ! str = TFormat ("Logout from this character on %s?", (LPCTSTR) pDoc->m_mush_name); ! if (::UMessageBox (str, MB_YESNO | MB_ICONQUESTION) == IDYES) SendMacro (MAC_LOGOUT); } *************** *** 1000,1011 **** ASSERT_VALID(pDoc); CString str; ! str = "Quit from "; ! str += pDoc->m_mush_name; ! str += "?"; ! ! if (::AfxMessageBox (str, MB_YESNO | MB_ICONQUESTION) == IDYES) { pDoc->m_bDisconnectOK = true; // don't want reconnect on quit --- 998,1007 ---- ASSERT_VALID(pDoc); CString str; + + str = TFormat ("Quit from %s?", (LPCTSTR) pDoc->m_mush_name); ! if (::UMessageBox (str, MB_YESNO | MB_ICONQUESTION) == IDYES) { pDoc->m_bDisconnectOK = true; // don't want reconnect on quit *************** *** 1256,1264 **** } CString strMsg; ! strMsg.Format ("Replace your typing of\n\n\"%s\"\n\nwith\n\n\"%s\"?", (LPCTSTR) strCurrent, (LPCTSTR) strReplacement); ! if (::AfxMessageBox (strMsg, MB_OKCANCEL | MB_ICONQUESTION | MB_DEFBUTTON2) == IDCANCEL) { m_iHistoryStatus = eAtBottom; // we are still at bottom therefore --- 1252,1260 ---- } CString strMsg; ! strMsg = TFormat ("Replace your typing of\n\n\"%s\"\n\nwith\n\n\"%s\"?", (LPCTSTR) strCurrent, (LPCTSTR) strReplacement); ! if (::UMessageBox (strMsg, MB_OKCANCEL | MB_ICONQUESTION | MB_DEFBUTTON2) == IDCANCEL) { m_iHistoryStatus = eAtBottom; // we are still at bottom therefore *************** *** 2097,2104 **** void CSendView::OnDisplayClearCommandHistory() { // check they really want to ! if (::AfxMessageBox ! (CFormat ("Are you SURE you want to clear all %i commands you have typed?", m_msgList.GetCount ()), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) return; --- 2093,2100 ---- void CSendView::OnDisplayClearCommandHistory() { // check they really want to ! if (::UMessageBox ! (TFormat ("Are you SURE you want to clear all %i commands you have typed?", m_msgList.GetCount ()), MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) != IDYES) return; *************** *** 2184,2190 **** if (strNew == strCurrent) { ! ::AfxMessageBox (CFormat ("No replacements made for \"%s\".", (LPCTSTR) m_strChangeFrom), MB_ICONINFORMATION); return; } --- 2180,2186 ---- if (strNew == strCurrent) { ! ::UMessageBox (TFormat ("No replacements made for \"%s\".", (LPCTSTR) m_strChangeFrom), MB_ICONINFORMATION); return; } *************** *** 2277,2283 **** // edit current input window CreateTextWindow (strCurrent, // selection ! CFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name), // title pDoc, // document pDoc->m_iUniqueDocumentNumber, // document number pDoc->m_input_font_name, --- 2273,2279 ---- // edit current input window CreateTextWindow (strCurrent, // selection ! TFormat ("Notepad: %s", (LPCTSTR) pDoc->m_mush_name), // title pDoc, // document pDoc->m_iUniqueDocumentNumber, // document number pDoc->m_input_font_name, Index: serialize.cpp =================================================================== RCS file: /cvs/mushclient/serialize.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -c -r1.33 -r1.34 *** serialize.cpp 20 Apr 2007 02:51:41 -0000 1.33 --- serialize.cpp 11 Jun 2007 21:40:12 -0000 1.34 *************** *** 54,60 **** Serialize_World_XML (ar); else { ! ::AfxMessageBox ("File does not have a valid MUSHclient XML signature.", MB_ICONSTOP); AfxThrowArchiveException (CArchiveException::badSchema); } --- 54,60 ---- Serialize_World_XML (ar); else { ! ::TMessageBox ("File does not have a valid MUSHclient XML signature.", MB_ICONSTOP); AfxThrowArchiveException (CArchiveException::badSchema); } *************** *** 80,86 **** { char sMessage [1000]; e->GetErrorMessage (sMessage, sizeof sMessage); ! ::AfxMessageBox (CFormat ("Error \"%s\" processing mapping failure regular expression \"%s\"", sMessage, (LPCTSTR) m_strMappingFailure)); e->Delete (); --- 80,86 ---- { char sMessage [1000]; e->GetErrorMessage (sMessage, sizeof sMessage); ! ::UMessageBox (TFormat ("Error \"%s\" processing mapping failure regular expression \"%s\"", sMessage, (LPCTSTR) m_strMappingFailure)); e->Delete (); Index: stdafx.h =================================================================== RCS file: /cvs/mushclient/stdafx.h,v retrieving revision 1.96 retrieving revision 1.100 diff -c -r1.96 -r1.100 *** stdafx.h 5 May 2007 22:25:35 -0000 1.96 --- stdafx.h 11 Jun 2007 23:44:15 -0000 1.100 *************** *** 265,273 **** const CString strReplacement, const bool bAll = true); - // Forward function prototype for delay loading exception filter - LONG WINAPI DelayLoadDllExceptionFilter(PEXCEPTION_POINTERS pep); - int InitZlib (z_stream & m_zCompress); void ReadNames (const LPCTSTR sName, const bool bNoDialog = false); --- 265,270 ---- *************** *** 792,794 **** --- 789,812 ---- extern "C" int _pcre_ord2utf8(int cvalue, unsigned char *buffer); extern "C" const unsigned char _pcre_utf8_table4[]; + // i18n stuff + + // display a message box, using UTF-8 (not straight ASCII) + int UMessageBox (const char * sText, UINT nType = MB_OK); + // translate lpszText and then call UMessageBox + int TMessageBox (const char * sText, UINT nType = MB_OK); + // translate text - result is statically allocated - do not attempt to modify or store it + const char * TranslateGeneric (const char * sText, const char * sSection); + // translate formatted text - result is statically allocated - do not attempt to modify or store it + const char * TFormat (const char * sFormat, ...); + // translate a static string + #define Translate(string) TranslateGeneric (string, "messages") + // translate a date/time string + #define TranslateTime(string) TranslateGeneric (string, "times") + // translate a heading string (eg. for dialogs lists) + #define TranslateHeading(string) TranslateGeneric (string, "headings") + + + // strings marked with this macro are to be translated in the localization file + // however not at runtime (ie. they are in a table, and the table lookup will be translated) + #define Translate_NoOp(string) (string) \ No newline at end of file Index: telnet_phases.cpp =================================================================== RCS file: /cvs/mushclient/telnet_phases.cpp,v retrieving revision 1.6 retrieving revision 1.8 diff -c -r1.6 -r1.8 *** telnet_phases.cpp 6 Apr 2007 05:01:26 -0000 1.6 --- telnet_phases.cpp 11 Jun 2007 21:40:12 -0000 1.8 *************** *** 467,473 **** if (!(m_bCompressInitOK && m_CompressOutput && m_CompressInput)) { ! strMessage = "Can not process compressed output. World closed."; return 0; } --- 467,473 ---- if (!(m_bCompressInitOK && m_CompressOutput && m_CompressInput)) { ! strMessage = Translate ("Can not process compressed output. World closed."); return 0; } *************** *** 478,487 **** if ((izError = inflateReset (&m_zCompress)) != Z_OK) { if (m_zCompress.msg) ! strMessage = CFormat ("Could not reset zlib decompression engine: %s", m_zCompress.msg); else ! strMessage = CFormat ("Could not reset zlib decompression engine: %i", izError); return 0; } // end of bad engine reset --- 478,487 ---- if ((izError = inflateReset (&m_zCompress)) != Z_OK) { if (m_zCompress.msg) ! strMessage = TFormat ("Could not reset zlib decompression engine: %s", m_zCompress.msg); else ! strMessage = TFormat ("Could not reset zlib decompression engine: %i", izError); return 0; } // end of bad engine reset Index: triggdlg.cpp =================================================================== RCS file: /cvs/mushclient/triggdlg.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -c -r1.40 -r1.41 *** triggdlg.cpp 26 Apr 2007 02:55:45 -0000 1.40 --- triggdlg.cpp 11 Jun 2007 21:40:12 -0000 1.41 *************** *** 171,177 **** if(m_trigger.IsEmpty ()) { ! ::AfxMessageBox("The trigger text cannot be blank.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER, m_trigger); pDX->Fail(); } // end of trigger being blank --- 171,177 ---- if(m_trigger.IsEmpty ()) { ! ::TMessageBox("The trigger text cannot be blank.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER, m_trigger); pDX->Fail(); } // end of trigger being blank *************** *** 269,275 **** if (same) { ! ::AfxMessageBox("This trigger is already in the list of triggers.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER, m_trigger); pDX->Fail(); return; --- 269,275 ---- if (same) { ! ::TMessageBox("This trigger is already in the list of triggers.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER, m_trigger); pDX->Fail(); return; *************** *** 283,291 **** if (m_strLabel.CompareNoCase (trigger_item->strLabel) == 0) { CString strMsg; ! strMsg.Format ("The trigger label \"%s\" is already in the list of triggers.", (LPCTSTR) m_strLabel); ! ::AfxMessageBox(strMsg, MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_NAME, m_strLabel); pDX->Fail(); } --- 283,291 ---- if (m_strLabel.CompareNoCase (trigger_item->strLabel) == 0) { CString strMsg; ! strMsg = TFormat ("The trigger label \"%s\" is already in the list of triggers.", (LPCTSTR) m_strLabel); ! ::UMessageBox(strMsg, MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_NAME, m_strLabel); pDX->Fail(); } *************** *** 296,302 **** { if (m_iSendTo == eSendToVariable) { ! ::AfxMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 296,302 ---- { if (m_iSendTo == eSendToVariable) { ! ::TMessageBox("When sending to a variable you must specify a variable name. ", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 310,316 **** if (CheckLabel (m_strVariable)) { ! ::AfxMessageBox("The variable must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); --- 310,316 ---- if (CheckLabel (m_strVariable)) { ! ::TMessageBox("The variable must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_VARIABLE, m_strVariable); pDX->Fail(); *************** *** 325,331 **** if (CheckLabel (m_strLabel)) { ! ::AfxMessageBox("The label must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_NAME, m_strLabel); pDX->Fail(); --- 325,331 ---- if (CheckLabel (m_strLabel)) { ! ::TMessageBox("The label must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_TRIGGER_NAME, m_strLabel); pDX->Fail(); *************** *** 340,346 **** if (CheckLabel (m_strProcedure, true)) { ! ::AfxMessageBox("The script subroutine name must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_SCRIPT_NAME, m_strProcedure); pDX->Fail(); --- 340,346 ---- if (CheckLabel (m_strProcedure, true)) { ! ::TMessageBox("The script subroutine name must start with a letter and consist of letters" ", numbers or the underscore character.", MB_ICONSTOP); DDX_Text(pDX, IDC_SCRIPT_NAME, m_strProcedure); pDX->Fail(); *************** *** 354,360 **** m_contents.IsEmpty ()) { ! if (::AfxMessageBox(CFormat ("Your trigger is set to 'send to %s' however the 'Send:' field is blank.\n\n" "You can use \"%%0\" to send the entire matching line to the specified place.\n\n" "(You can eliminate this message by sending to 'world')\n\n" "Do you want to change the trigger to fix this?", --- 354,360 ---- m_contents.IsEmpty ()) { ! if (::UMessageBox(TFormat ("Your trigger is set to 'send to %s' however the 'Send:' field is blank.\n\n" "You can use \"%%0\" to send the entire matching line to the specified place.\n\n" "(You can eliminate this message by sending to 'world')\n\n" "Do you want to change the trigger to fix this?", *************** *** 370,382 **** if (m_bMultiLine && !m_bRegexp) { ! ::AfxMessageBox("Multi-line triggers must be a regular expression", MB_ICONSTOP); pDX->Fail(); } if (m_bMultiLine && m_iLinesToMatch < 2) { ! ::AfxMessageBox("Multi-line triggers must match at least 2 lines", MB_ICONSTOP); DDX_Text(pDX, IDC_LINES_TO_MATCH, m_iLinesToMatch); pDX->Fail(); } --- 370,382 ---- if (m_bMultiLine && !m_bRegexp) { ! ::TMessageBox("Multi-line triggers must be a regular expression", MB_ICONSTOP); pDX->Fail(); } if (m_bMultiLine && m_iLinesToMatch < 2) { ! ::TMessageBox("Multi-line triggers must match at least 2 lines", MB_ICONSTOP); DDX_Text(pDX, IDC_LINES_TO_MATCH, m_iLinesToMatch); pDX->Fail(); } Index: world_debug.cpp =================================================================== RCS file: /cvs/mushclient/world_debug.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** world_debug.cpp 26 Apr 2007 00:28:56 -0000 1.8 --- world_debug.cpp 12 Jun 2007 04:02:02 -0000 1.9 *************** *** 164,170 **** ShowOneColour (this, it->second.c_str (), it->first); ! Note (CFormat ("%i colour%s.", PLURAL (iCount))); } // end of colours --- 164,170 ---- ShowOneColour (this, it->second.c_str (), it->first); ! Note (TFormat ("%i colour%s.", PLURAL (iCount))); } // end of colours *************** *** 226,232 **** Note (strName); } ! Note (CFormat ("%i entit%s.", PLURALIE (iCount))); } // end of entities //----------------------------------------------------------------------- --- 226,232 ---- Note (strName); } ! Note (TFormat ("%i entit%s.", PLURALIE (iCount))); } // end of entities //----------------------------------------------------------------------- *************** *** 249,255 **** Note (strName); } ! Note (CFormat ("%i server entit%s.", PLURALIE (iCount))); } // end of server_entities //----------------------------------------------------------------------- --- 249,255 ---- Note (strName); } ! Note (TFormat ("%i server entit%s.", PLURALIE (iCount))); } // end of server_entities //----------------------------------------------------------------------- *************** *** 282,288 **** Note (strName); } ! Note (CFormat ("%i element%s.", PLURAL (iCount))); } // end of elements //----------------------------------------------------------------------- --- 282,288 ---- Note (strName); } ! Note (TFormat ("%i element%s.", PLURAL (iCount))); } // end of elements //----------------------------------------------------------------------- *************** *** 360,366 **** Note (""); // blank line between each one } ! Note (CFormat ("%i server element%s.", PLURAL (iCount))); } // end of server_elements //----------------------------------------------------------------------- --- 360,366 ---- Note (""); // blank line between each one } ! Note (TFormat ("%i server element%s.", PLURAL (iCount))); } // end of server_elements //----------------------------------------------------------------------- *************** *** 384,390 **** Note (""); // blank line } ! Note (CFormat ("%i action%s.", PLURAL (iCount))); } // end of actions //----------------------------------------------------------------------- --- 384,390 ---- Note (""); // blank line } ! Note (TFormat ("%i action%s.", PLURAL (iCount))); } // end of actions //----------------------------------------------------------------------- *************** *** 408,414 **** if (++iViewNumber > 1) { Note (""); ! Note (CFormat ("--- Command Window %i ---", iViewNumber)); Note (""); } for (POSITION pos = pmyView->m_msgList.GetHeadPosition(); pos; iCount++) --- 408,414 ---- if (++iViewNumber > 1) { Note (""); ! Note (TFormat ("--- Command Window %i ---", iViewNumber)); Note (""); } for (POSITION pos = pmyView->m_msgList.GetHeadPosition(); pos; iCount++) *************** *** 418,424 **** } // end of loop through views ! Note (CFormat ("%i command%s.", PLURAL (iCount))); } // end of commands //----------------------------------------------------------------------- --- 418,424 ---- } // end of loop through views ! Note (TFormat ("%i command%s.", PLURAL (iCount))); } // end of commands //----------------------------------------------------------------------- *************** *** 475,481 **** } ! Note (CFormat ("%i alias%s.", PLURALES (iCount))); } // end of aliases //----------------------------------------------------------------------- --- 475,481 ---- } ! Note (TFormat ("%i alias%s.", PLURALES (iCount))); } // end of aliases //----------------------------------------------------------------------- *************** *** 546,552 **** } ! Note (CFormat ("%i trigger%s.", PLURAL (iCount))); } // end of triggers //----------------------------------------------------------------------- --- 546,552 ---- } ! Note (TFormat ("%i trigger%s.", PLURAL (iCount))); } // end of triggers //----------------------------------------------------------------------- *************** *** 683,689 **** Note (strName); } ! Note (CFormat ("%i variable%s.", PLURAL (iCount))); } // end of variables //----------------------------------------------------------------------- --- 683,689 ---- Note (strName); } ! Note (TFormat ("%i variable%s.", PLURAL (iCount))); } // end of variables //----------------------------------------------------------------------- *************** *** 708,714 **** } ! Note (CFormat ("%i array%s.", PLURAL (iCount))); } // end of arrays //----------------------------------------------------------------------- --- 708,714 ---- } ! Note (TFormat ("%i array%s.", PLURAL (iCount))); } // end of arrays //----------------------------------------------------------------------- *************** *** 723,742 **** for (ppos = m_PluginList.GetHeadPosition (); ppos; iCount++) { p = m_PluginList.GetNext (ppos); ! Note (CFormat ("Name: %s", (LPCTSTR) p->m_strName)); ! Note (CFormat ("ID: %s", (LPCTSTR) p->m_strID)); ! Note (CFormat ("Purpose: %s", (LPCTSTR) p->m_strPurpose)); ! Note (CFormat ("Author: %s", (LPCTSTR) p->m_strAuthor)); ! Note (CFormat ("Disk file: %s", (LPCTSTR) p->m_strSource)); ! Note (CFormat ("Language: %s", (LPCTSTR) p->m_strLanguage)); ! Note (CFormat ("Enabled: %s", (LPCTSTR) (p->m_bEnabled ? "yes" : "no"))); if (!p->m_strScript.IsEmpty ()) { ! Note ("Script:"); ! Note ("-------(start script)----------"); Note (p->m_strScript); ! Note ("--------(end script)-----------"); } CString strName; --- 723,742 ---- for (ppos = m_PluginList.GetHeadPosition (); ppos; iCount++) { p = m_PluginList.GetNext (ppos); ! Note (TFormat ("Name: %s", (LPCTSTR) p->m_strName)); ! Note (TFormat ("ID: %s", (LPCTSTR) p->m_strID)); ! Note (TFormat ("Purpose: %s", (LPCTSTR) p->m_strPurpose)); ! Note (TFormat ("Author: %s", (LPCTSTR) p->m_strAuthor)); ! Note (TFormat ("Disk file: %s", (LPCTSTR) p->m_strSource)); ! Note (TFormat ("Language: %s", (LPCTSTR) p->m_strLanguage)); ! Note (TFormat ("Enabled: %s", (LPCTSTR) (p->m_bEnabled ? "yes" : "no"))); if (!p->m_strScript.IsEmpty ()) { ! Note (Translate ("Script:")); ! Note (Translate ("-------(start script)----------")); Note (p->m_strScript); ! Note (Translate ("--------(end script)-----------")); } CString strName; *************** *** 749,767 **** for (pos = p->m_TriggerMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_TriggerMap.GetNextAssoc (pos, strName, pTrigger); ! Note (CFormat ("Trigger %i: %s=%s", iCount2, (LPCTSTR) pTrigger->trigger, (LPCTSTR) pTrigger->contents)); // warn if no dispid if (pTrigger->dispid == DISPID_UNKNOWN && !pTrigger->strProcedure.IsEmpty ()) ! Note (CFormat ("--> Script sub %s NOT active <--", (LPCTSTR) pTrigger->strProcedure)); } // end of triggers for (pos = p->m_AliasMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_AliasMap.GetNextAssoc (pos, strName, pAlias); ! Note (CFormat ("Alias %i: %s=%s", iCount2, (LPCTSTR) pAlias->name, (LPCTSTR) pAlias->contents)); --- 749,767 ---- for (pos = p->m_TriggerMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_TriggerMap.GetNextAssoc (pos, strName, pTrigger); ! Note (TFormat ("Trigger %i: %s=%s", iCount2, (LPCTSTR) pTrigger->trigger, (LPCTSTR) pTrigger->contents)); // warn if no dispid if (pTrigger->dispid == DISPID_UNKNOWN && !pTrigger->strProcedure.IsEmpty ()) ! Note (TFormat ("--> Script sub %s NOT active <--", (LPCTSTR) pTrigger->strProcedure)); } // end of triggers for (pos = p->m_AliasMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_AliasMap.GetNextAssoc (pos, strName, pAlias); ! Note (TFormat ("Alias %i: %s=%s", iCount2, (LPCTSTR) pAlias->name, (LPCTSTR) pAlias->contents)); *************** *** 773,779 **** for (pos = p->m_TimerMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_TimerMap.GetNextAssoc (pos, strName, pTimer); ! Note (CFormat ("Timer %i: %02i:%02i:%04.2f=%s", iCount2, pTimer->iAtHour + pTimer->iEveryHour, pTimer->iAtMinute + pTimer->iEveryMinute, --- 773,779 ---- for (pos = p->m_TimerMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_TimerMap.GetNextAssoc (pos, strName, pTimer); ! Note (TFormat ("Timer %i: %02i:%02i:%04.2f=%s", iCount2, pTimer->iAtHour + pTimer->iEveryHour, pTimer->iAtMinute + pTimer->iEveryMinute, *************** *** 781,803 **** (LPCTSTR) pTimer->strContents)); // warn if no dispid if (pTimer->dispid == DISPID_UNKNOWN && !pTimer->strProcedure.IsEmpty ()) ! Note (CFormat ("--> Script sub %s NOT active <--", (LPCTSTR) pTimer->strProcedure)); } // end of timers for (pos = p->m_VariableMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_VariableMap.GetNextAssoc (pos, strName, pVariable); ! Note (CFormat ("Variable %i: %s=%s", iCount2, (LPCTSTR) pVariable->strLabel, (LPCTSTR) pVariable->strContents)); } // end of variables ! Note (CFormat ("<--- (end plugin \"%s\") --->", (LPCTSTR) p->m_strName)); Note (""); } // end of doing each plugin ! Note (CFormat ("%i plugin%s.", PLURAL (iCount))); } //----------------------------------------------------------------------- --- 781,803 ---- (LPCTSTR) pTimer->strContents)); // warn if no dispid if (pTimer->dispid == DISPID_UNKNOWN && !pTimer->strProcedure.IsEmpty ()) ! Note (TFormat ("--> Script sub %s NOT active <--", (LPCTSTR) pTimer->strProcedure)); } // end of timers for (pos = p->m_VariableMap.GetStartPosition(), iCount2 = 1; pos; iCount2++) { p->m_VariableMap.GetNextAssoc (pos, strName, pVariable); ! Note (TFormat ("Variable %i: %s=%s", iCount2, (LPCTSTR) pVariable->strLabel, (LPCTSTR) pVariable->strContents)); } // end of variables ! Note (TFormat ("<--- (end plugin \"%s\") --->", (LPCTSTR) p->m_strName)); Note (""); } // end of doing each plugin ! Note (TFormat ("%i plugin%s.", PLURAL (iCount))); } //----------------------------------------------------------------------- *************** *** 809,815 **** for (iCount = 0; CommandIDs [iCount].iCommandID; iCount++) Note (CommandIDs [iCount].sCommandName); ! Note (CFormat ("%i internal command%s.", PLURAL (iCount))); } // end of internal commands //----------------------------------------------------------------------- --- 809,815 ---- for (iCount = 0; CommandIDs [iCount].iCommandID; iCount++) Note (CommandIDs [iCount].sCommandName); ! Note (TFormat ("%i internal command%s.", PLURAL (iCount))); } // end of internal commands //----------------------------------------------------------------------- *************** *** 839,845 **** } // end of not VT_NULL } ! Note (CFormat ("%i info item%s.", PLURAL (iCount))); } // end of info #ifdef PANE --- 839,845 ---- } // end of not VT_NULL } ! Note (TFormat ("%i info item%s.", PLURAL (iCount))); } // end of info #ifdef PANE *************** *** 855,863 **** { CPaneView * pView = it->second; Note ("------------------------"); ! Note (CFormat ("Pane name = %s", pView->m_sName.c_str ())) ; ! Note (CFormat (" Pane title = %s", pView->m_sTitle.c_str ())) ; ! Note (CFormat (" Left = %i, Top = %i, Width = %i, " "Height = %i, Flags = %08X, Lines = %i", pView->m_iLeft, pView->m_iTop, --- 855,863 ---- { CPaneView * pView = it->second; Note ("------------------------"); ! Note (TFormat ("Pane name = %s", pView->m_sName.c_str ())) ; ! Note (TFormat (" Pane title = %s", pView->m_sTitle.c_str ())) ; ! Note (TFormat (" Left = %i, Top = %i, Width = %i, " "Height = %i, Flags = %08X, Lines = %i", pView->m_iLeft, pView->m_iTop, *************** *** 875,881 **** line_it++, iLine++) { CPaneLine * pLine = *line_it; ! Note (CFormat ("Line %i, Width = %i, Styles = %i, newline = %i", iLine, pLine->m_iWidth, pLine->m_vStyles.size (), --- 875,881 ---- line_it++, iLine++) { CPaneLine * pLine = *line_it; ! Note (TFormat ("Line %i, Width = %i, Styles = %i, newline = %i", iLine, pLine->m_iWidth, pLine->m_vStyles.size (), *************** *** 897,909 **** } // end of doing each pane ! Note (CFormat ("%i pane%s.", PLURAL (iCount))); } // end of panes #endif // PANE else { ! Note ("----- Debug commands available -----"); Note ("actions"); Note ("aliases"); Note ("alpha_options"); --- 897,909 ---- } // end of doing each pane ! Note (TFormat ("%i pane%s.", PLURAL (iCount))); } // end of panes #endif // PANE else { ! Note (Translate ("----- Debug commands available -----")); Note ("actions"); Note ("aliases"); Note ("alpha_options"); Index: worldsock.cpp =================================================================== RCS file: /cvs/mushclient/worldsock.cpp,v retrieving revision 1.5 retrieving revision 1.8 diff -c -r1.5 -r1.8 *** worldsock.cpp 29 Nov 2006 01:57:47 -0000 1.5 --- worldsock.cpp 12 Jun 2007 04:02:02 -0000 1.8 *************** *** 128,159 **** theTime = CTime::GetCurrentTime(); CString strConnected; ! strConnected = theTime.Format ("--- Disconnected on %A, %B %d, %Y, %#I:%M %p ---"); m_pDoc->Note (strConnected); // find time spent connected CTimeSpan ts = CTime::GetCurrentTime() - m_pDoc->m_tConnectTime; ! CString strDuration = "--- Connected for"; ! if (ts.GetDays () > 0) ! strDuration += CFormat (" %i day%s,", PLURAL (ts.GetDays())); ! if (ts.GetHours () > 0) ! strDuration += CFormat (" %i hour%s,", PLURAL (ts.GetHours())); ! if (ts.GetMinutes () > 0) ! strDuration += CFormat (" %i minute%s,", PLURAL (ts.GetMinutes())); ! if (ts.GetSeconds () > 0) ! strDuration += CFormat (" %i second%s,", PLURAL (ts.GetSeconds())); ! ! if (ts.GetDays () == 0 && ! ts.GetHours () == 0 && ! ts.GetMinutes () == 0 && ! ts.GetSeconds () == 0) ! strDuration += " less than one second"; ! else // get rid of trailing comma ! strDuration = strDuration.Left (strDuration.GetLength () - 1); ! ! strDuration += " ---"; m_pDoc->Note (strDuration); --- 128,145 ---- theTime = CTime::GetCurrentTime(); CString strConnected; ! strConnected = theTime.Format (TranslateTime ("--- Disconnected on %A, %B %d, %Y, %#I:%M %p ---")); m_pDoc->Note (strConnected); // find time spent connected CTimeSpan ts = CTime::GetCurrentTime() - m_pDoc->m_tConnectTime; ! CString strDuration = TFormat ("--- Connected for %i day%s, %i hour%s, %i minute%s, %i second%s. ---", ! PLURAL (ts.GetDays()), ! PLURAL (ts.GetHours()), ! PLURAL (ts.GetMinutes()), ! PLURAL (ts.GetSeconds())); m_pDoc->Note (strDuration); *************** *** 165,171 **** CString str; ! str.Format ("The \"%s\" server has closed the connection", (const char *) m_pDoc->m_mush_name); if (App.m_bNotifyOnDisconnect && !m_pDoc->m_bDisconnectOK) --- 151,157 ---- CString str; ! str = TFormat ("The \"%s\" server has closed the connection", (const char *) m_pDoc->m_mush_name); if (App.m_bNotifyOnDisconnect && !m_pDoc->m_bDisconnectOK) *************** *** 173,179 **** if (App.m_bErrorNotificationToOutputWindow) m_pDoc->Note (str); else ! ::AfxMessageBox (str, MB_ICONEXCLAMATION); } else Frame.SetStatusMessage (str); --- 159,165 ---- if (App.m_bErrorNotificationToOutputWindow) m_pDoc->Note (str); else ! ::UMessageBox (str, MB_ICONEXCLAMATION); } else Frame.SetStatusMessage (str); Index: xml_load_world.cpp =================================================================== RCS file: /cvs/mushclient/xml_load_world.cpp,v retrieving revision 1.88 retrieving revision 1.90 diff -c -r1.88 -r1.90 *** xml_load_world.cpp 25 May 2007 23:21:38 -0000 1.88 --- xml_load_world.cpp 12 Jun 2007 04:02:02 -0000 1.90 *************** *** 210,216 **** iTimeTaken = finish.QuadPart - start.QuadPart; \ double fTime = ((double) iTimeTaken) / \ ((double) iCounterFrequency); \ ! ::AfxMessageBox (CFormat ("Time taken to %s = %15.8f seconds\n", what, fTime)); \ } while (false) #endif --- 210,216 ---- iTimeTaken = finish.QuadPart - start.QuadPart; \ double fTime = ((double) iTimeTaken) / \ ((double) iCounterFrequency); \ ! ::UMessageBox (TFormat ("Time taken to %s = %15.8f seconds\n", what, fTime)); \ } while (false) #endif *************** *** 504,510 **** // now call the OnInstall routine (once it is in the list) ! // ::AfxMessageBox ("Plugin OnInstall"); m_CurrentPlugin->ExecutePluginScript (ON_PLUGIN_INSTALL, m_CurrentPlugin->m_dispid_plugin_install); --- 504,510 ---- // now call the OnInstall routine (once it is in the list) ! // ::TMessageBox ("Plugin OnInstall"); m_CurrentPlugin->ExecutePluginScript (ON_PLUGIN_INSTALL, m_CurrentPlugin->m_dispid_plugin_install); *************** *** 515,525 **** /* if (iErrorCount) { ! CString strWarning = CFormat ("%lu warning%s %s generated. See warning window for details.", PLURAL (iErrorCount), iErrorCount == 1 ? "was" : "were"); ! ::AfxMessageBox (strWarning, MB_ICONEXCLAMATION); } */ --- 515,525 ---- /* if (iErrorCount) { ! CString strWarning = TFormat ("%lu warning%s %s generated. See warning window for details.", PLURAL (iErrorCount), iErrorCount == 1 ? "was" : "were"); ! ::UMessageBox (strWarning, MB_ICONEXCLAMATION); } */ *************** *** 549,555 **** if (iLine == 0) iLine = iLineLastItemFound; ! CString str = CFormat ("Line %4i: %s (%s)%s", iLine, // which line sMessage, // what message sType, // type of thing (eg, trigger) --- 549,555 ---- if (iLine == 0) iLine = iLineLastItemFound; ! CString str = TFormat ("Line %4i: %s (%s)%s", iLine, // which line sMessage, // what message sType, // type of thing (eg, trigger) *************** *** 606,612 **** continue; LoadError (node.strName, ! CFormat ("Attribute not used: %s=\"%s\"", (LPCTSTR) strName, (LPCTSTR) attribute->strValue), attribute->iLine); --- 606,612 ---- continue; LoadError (node.strName, ! TFormat ("Attribute not used: %s=\"%s\"", (LPCTSTR) strName, (LPCTSTR) attribute->strValue), attribute->iLine); *************** *** 622,628 **** continue; LoadError (node.strName, ! CFormat ("Tag not used: <%s>", (LPCTSTR) pElement->strName), pElement->iLine); --- 622,628 ---- continue; LoadError (node.strName, ! TFormat ("Tag not used: <%s>", (LPCTSTR) pElement->strName), pElement->iLine); *************** *** 939,945 **** } catch (CException* e) { ! HandleLoadException (CFormat ("option '%s' not set", (LPCTSTR) OptionsTable [i].pName), e); } // end of catch } --- 939,945 ---- } catch (CException* e) { ! HandleLoadException (TFormat ("option '%s' not set", (LPCTSTR) OptionsTable [i].pName), e); } // end of catch } *************** *** 1005,1011 **** } // end of try block catch (CException* e) { ! HandleLoadException (CFormat ("option '%s' not set", (LPCTSTR) AlphaOptionsTable [i].pName), e); } // end of catch } // end of single-line options --- 1005,1011 ---- } // end of try block catch (CException* e) { ! HandleLoadException (TFormat ("option '%s' not set", (LPCTSTR) AlphaOptionsTable [i].pName), e); } // end of catch } // end of single-line options *************** *** 1036,1042 **** } // end of try block catch (CException* e) { ! HandleLoadException (CFormat ("option '%s' not set", (LPCTSTR) AlphaOptionsTable [i].pName), e); } // end of catch } // end of mult-line options } // end of CMUSHclientDoc::Load_World_Multi_Line_Alpha_Options_XML --- 1036,1042 ---- } // end of try block catch (CException* e) { ! HandleLoadException (TFormat ("option '%s' not set", (LPCTSTR) AlphaOptionsTable [i].pName), e); } // end of catch } // end of mult-line options } // end of CMUSHclientDoc::Load_World_Multi_Line_Alpha_Options_XML *************** *** 2245,2251 **** Get_XML_double (*node, "version", m_CurrentPlugin->m_dVersion, false, 0.0); // little message for the status bar ! Frame.SetStatusMessageNow (CFormat ("%s loading plugin %s ...", (LPCTSTR) m_mush_name, (LPCTSTR) m_CurrentPlugin->m_strName)); --- 2245,2251 ---- Get_XML_double (*node, "version", m_CurrentPlugin->m_dVersion, false, 0.0); // little message for the status bar ! Frame.SetStatusMessageNow (TFormat ("%s loading plugin %s ...", (LPCTSTR) m_mush_name, (LPCTSTR) m_CurrentPlugin->m_strName)); *************** *** 2355,2361 **** strFileName += m_CurrentPlugin->m_strID; // plugin ID strFileName += "-state.xml"; // suffix ! // ::AfxMessageBox ("Plugin Load State"); try { --- 2355,2361 ---- strFileName += m_CurrentPlugin->m_strID; // plugin ID strFileName += "-state.xml"; // suffix ! // ::TMessageBox ("Plugin Load State"); try { Index: xml_save_world.cpp =================================================================== RCS file: /cvs/mushclient/xml_save_world.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -c -r1.51 -r1.52 *** xml_save_world.cpp 4 May 2007 04:00:22 -0000 1.51 --- xml_save_world.cpp 11 Jun 2007 23:44:15 -0000 1.52 *************** *** 46,52 **** // when did we save it? ar.WriteString (CFormat ("" NL, FixHTMLString (CTime::GetCurrentTime().Format ! ("%A, %B %d, %Y, %#I:%M %p")))); // which version was it? ar.WriteString (CFormat --- 46,52 ---- // when did we save it? ar.WriteString (CFormat ("" NL, FixHTMLString (CTime::GetCurrentTime().Format ! (TranslateTime ("%A, %B %d, %Y, %#I:%M %p"))))); // which version was it? ar.WriteString (CFormat Index: install/mushclient.nsi =================================================================== RCS file: /cvs/mushclient/install/mushclient.nsi,v retrieving revision 1.49 retrieving revision 1.50 diff -c -r1.49 -r1.50 *** install/mushclient.nsi 19 Apr 2007 02:11:25 -0000 1.49 --- install/mushclient.nsi 12 Jun 2007 04:02:02 -0000 1.50 *************** *** 138,143 **** --- 138,153 ---- ; not needed NoCreateLogDirectory: + ; + ; directory for locale information + ; + CreateDirectory "$INSTDIR\locale" + SetOutPath $INSTDIR\locale + + File "..\Localize_template.lua" + + SetOutPath $INSTDIR + SectionEnd Section "Spell checker" Index: install/readme.txt =================================================================== RCS file: /cvs/mushclient/install/readme.txt,v retrieving revision 1.144 retrieving revision 1.146 diff -c -r1.144 -r1.146 *** install/readme.txt 10 Jun 2007 02:39:27 -0000 1.144 --- install/readme.txt 12 Jun 2007 04:02:02 -0000 1.146 *************** *** 1,7 **** ! MUSHclient version 4.08 ======================= ! Sunday, 10th June 2007 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/ --- 1,7 ---- ! MUSHclient version 4.09 ======================= ! Tuesday, 12th June 2007 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/