Index: MUSHclient.rc =================================================================== RCS file: /cvs/mushclient/MUSHclient.rc,v retrieving revision 1.223 retrieving revision 1.224 diff -c -r1.223 -r1.224 *** MUSHclient.rc 8 Jul 2008 03:49:51 -0000 1.223 --- MUSHclient.rc 10 Jul 2008 01:24:51 -0000 1.224 *************** *** 75,82 **** // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,32,0 ! PRODUCTVERSION 4,0,32,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L --- 75,82 ---- // VS_VERSION_INFO VERSIONINFO ! FILEVERSION 4,0,33,0 ! PRODUCTVERSION 4,0,33,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L *************** *** 94,107 **** VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.32\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2008 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.32\0" VALUE "SpecialBuild", "\0" END END --- 94,107 ---- VALUE "Comments", "MUSHclient - a client program for playing MUD games\0" VALUE "CompanyName", "Gammon Software Solutions\0" VALUE "FileDescription", "MUSHclient\0" ! VALUE "FileVersion", "4.33\0" VALUE "InternalName", "MUSHCLIENT\0" VALUE "LegalCopyright", "Copyright © 2008 Gammon Software Solutions\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "MUSHCLIENT.EXE\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "MUSHclient\0" ! VALUE "ProductVersion", "4.33\0" VALUE "SpecialBuild", "\0" END END Index: doc.cpp =================================================================== RCS file: /cvs/mushclient/doc.cpp,v retrieving revision 1.234 retrieving revision 1.235 diff -c -r1.234 -r1.235 *** doc.cpp 8 Jul 2008 03:49:51 -0000 1.234 --- doc.cpp 10 Jul 2008 01:24:51 -0000 1.235 *************** *** 7827,7841 **** } - - void CMUSHclientDoc::OnInputKeyname() { CKeyNameDlg dlg; dlg.DoModal (); } - void CMUSHclientDoc::OnEditConvertclipboardforumcodes() { CString strContents; --- 7827,7838 ---- *************** *** 7846,7951 **** putontoclipboard (QuoteForumCodes (strContents)); } - - /* - typedef HANDLE (WINAPI *PAFMR)(PVOID, DWORD, PVOID, DWORD*); - typedef BOOL (WINAPI *PRFMR)(HANDLE); - - static PAFMR pAddFontMemResourceEx = NULL; - static PRFMR pRemoveFontMemResourceEx = NULL; - static BOOL initialized = FALSE; - - - long CMUSHclientDoc::AddSpecialFont (LPCTSTR PathName) - { - - // First, see if we can get the API call we need. If we've tried - // once, we don't need to try again. - if (!initialized) - { - HMODULE hDLL = LoadLibrary ("gdi32"); - - if (hDLL) - { - pAddFontMemResourceEx = - (PAFMR) GetProcAddress(hDLL, "AddFontMemResourceEx"); - - pRemoveFontMemResourceEx = - (PRFMR) GetProcAddress(hDLL, "RemoveFontMemResourceEx"); - } - - initialized = TRUE; - } - - if (pAddFontMemResourceEx == NULL || - pRemoveFontMemResourceEx == NULL) - return eNoSuchCommand; - - - // same one again - just leave well enough alone - if (m_strSpecialFontName == PathName && m_hSpecialFontHandle != 0) - return eOK; - - // get rid of old one, if any - RemoveSpecialFont (); - - CFile * pFile = NULL; - unsigned char * pFileBuffer = NULL; - DWORD iFileSize = 0; - - try - { - pFile = new CFile (PathName, CFile::modeRead | CFile::shareDenyWrite); // open file - iFileSize = pFile->GetLength (); - pFileBuffer = new unsigned char [iFileSize]; // get buffer - pFile->Read (pFileBuffer, iFileSize); - delete pFile; - } // end of try block - - catch (CFileException * e) - { - e->Delete (); - - delete pFile; // in case it was set up - delete [] pFileBuffer; // and get rid of buffer - - return eFileNotFound; - } // end of catching a file exception - - - void * pbFont = NULL; - DWORD cbFont = 0; - PVOID pdv = 0; - DWORD pcFonts; - - m_hSpecialFontHandle = pAddFontMemResourceEx (pFileBuffer, // font resource - iFileSize, // number of bytes in font resource - pdv, // Reserved. Must be 0. - &pcFonts); // number of fonts installed - - delete [] pFileBuffer; // get rid of buffer - - if (m_hSpecialFontHandle == 0) - return eBadParameter; - - return eOK; - } // end of CMUSHclientDoc::AddSpecialFont - - void CMUSHclientDoc::RemoveSpecialFont (void) - { - if (m_hSpecialFontHandle == 0) - return; - - if (pRemoveFontMemResourceEx == NULL) - return; - - pRemoveFontMemResourceEx (m_hSpecialFontHandle); - m_hSpecialFontHandle = 0; - m_strSpecialFontName.Empty (); - } - - */ - typedef int (WINAPI *PAFMR)(LPCTSTR, DWORD, void *); typedef BOOL (WINAPI *PRFMR)(LPCTSTR, DWORD, void *); --- 7843,7848 ---- Index: doc.h =================================================================== RCS file: /cvs/mushclient/doc.h,v retrieving revision 1.250 retrieving revision 1.251 diff -c -r1.250 -r1.251 *** doc.h 8 Jul 2008 03:49:51 -0000 1.250 --- doc.h 10 Jul 2008 01:24:51 -0000 1.251 *************** *** 21,28 **** // New versions - things to change ! #define THISVERSION 432 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.32"; // 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 433 // Step 1. ! const CString MUSHCLIENT_VERSION = "4.33"; // Step 2. // Step 3. Don't forget VERSION resource in Resources tab // Step 4. Remember: README.TXT Index: lua_methods.cpp =================================================================== RCS file: /cvs/mushclient/lua_methods.cpp,v retrieving revision 1.91 retrieving revision 1.92 diff -c -r1.91 -r1.92 *** lua_methods.cpp 8 Jul 2008 03:49:51 -0000 1.91 --- lua_methods.cpp 10 Jul 2008 01:24:51 -0000 1.92 *************** *** 162,168 **** pushVariant (L, val); // recurse to push the element value lua_rawseti(L, -2, i + extra); // make 1-relative } // end of doing each row - luaL_setn (L, -1, i + extra - 1); // set table size now } // end of VT_ARRAY break; --- 162,167 ---- *************** *** 2987,2993 **** lua_rawseti(L, -2, iStyleNumber); // put individual style table into line table } // for each style - luaL_setn (L, -1, iStyleNumber - 1); // set table size now return 1; // one table } --- 2986,2991 ---- Index: lua_utils.cpp =================================================================== RCS file: /cvs/mushclient/lua_utils.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** lua_utils.cpp 11 Jun 2008 01:13:04 -0000 1.24 --- lua_utils.cpp 10 Jul 2008 01:24:51 -0000 1.25 *************** *** 62,68 **** lua_rawseti (L, -2, item); // number each node in sequence } // end of checking each tag - luaL_setn (L, -1, item - 1); // set table size now lua_rawset(L, -3); // bind children table to "children" entry } // end of having children --- 62,67 ---- *************** *** 526,532 **** lua_rawseti(L, -2, i + 1); // make 1-relative } - luaL_setn (L, -1, i); // set table size now return 1; // 1 table } // end of functionlist --- 525,530 ---- *************** *** 1267,1272 **** --- 1265,1315 ---- } + int __stdcall EnumFontFamExProc (CONST LOGFONTA * lpelfe, // pointer to logical-font data + CONST TEXTMETRICA * lpntme,// pointer to physical-font data + DWORD FontType, // type of font + LPARAM L_state) // application-defined data + + { + lua_State *L = (lua_State *) L_state; + + + lua_pushstring (L, lpelfe->lfFaceName); + lua_pushboolean (L, true); + lua_rawset(L, -3); + + return 1; // keep enumerating + } // end of EnumFontFamExProc + + + static int getfontfamilies (lua_State *L) + { + lua_newtable(L); // table of entries + + CDC dc; + + dc.CreateCompatibleDC (NULL); + + LOGFONT lf; + + ZeroMemory (&lf, sizeof lf); + + lf.lfCharSet = DEFAULT_CHARSET; + lf.lfFaceName [0] = 0; + lf.lfPitchAndFamily = 0; + + EnumFontFamiliesEx (dc.m_hDC, // handle to device context + &lf, // pointer to logical font information + EnumFontFamExProc, // pointer to callback function + (long) L, // application-supplied data + 0); // reserved; must be zero + + + return 1; // one table of entries + + } + + // table of operations static const struct luaL_reg xmllib [] = { *************** *** 1293,1298 **** --- 1336,1342 ---- {"appendtonotepad", appendtonotepad}, {"activatenotepad", activatenotepad}, {"showdebugstatus", showdebugstatus}, + {"getfontfamilies", getfontfamilies}, {NULL, NULL} }; Index: methods.cpp =================================================================== RCS file: /cvs/mushclient/methods.cpp,v retrieving revision 1.222 retrieving revision 1.223 diff -c -r1.222 -r1.223 *** methods.cpp 8 Jul 2008 03:49:51 -0000 1.222 --- methods.cpp 10 Jul 2008 01:24:51 -0000 1.223 *************** *** 11631,11637 **** switch (Parameter) { case 1: pParent->ShowWindow(SW_SHOWMAXIMIZED); break; ! case 2: pParent->ShowWindow(SW_SHOWMINIMIZED); break; case 3: pParent->ShowWindow(SW_RESTORE); break; case 4: pParent->ShowWindow(SW_SHOWNORMAL); break; } // end of switch --- 11631,11637 ---- switch (Parameter) { case 1: pParent->ShowWindow(SW_SHOWMAXIMIZED); break; ! case 2: pParent->ShowWindow(SW_MINIMIZE); break; case 3: pParent->ShowWindow(SW_RESTORE); break; case 4: pParent->ShowWindow(SW_SHOWNORMAL); break; } // end of switch Index: mushclient.hlp =================================================================== RCS file: /cvs/mushclient/mushclient.hlp,v retrieving revision 1.98 retrieving revision 1.99 diff -c -r1.98 -r1.99 Binary files /tmp/cvsazux6P and /tmp/cvswfansu differ Index: install/readme.txt =================================================================== RCS file: /cvs/mushclient/install/readme.txt,v retrieving revision 1.175 retrieving revision 1.176 diff -c -r1.175 -r1.176 *** install/readme.txt 8 Jul 2008 03:50:02 -0000 1.175 --- install/readme.txt 10 Jul 2008 01:25:00 -0000 1.176 *************** *** 1,7 **** ! MUSHclient version 4.32 ======================= ! Tuesday, 8th July 2008 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/ --- 1,7 ---- ! MUSHclient version 4.33 ======================= ! Thursday, 10th July 2008 Author: Nick Gammon Web support: http://www.gammon.com.au/forum/