| |
Windows CE and CMarkup
CMarkup has been used on Windows CE since early in 2001, using the UNICODE build. CMarkup is great there because of its small footprint. But new releases of CMarkup are not tested on Windows CE so there have been small compile issues in some releases.
I think the problem you are describing is related to the saving and loading of files, not the processing. CMarkup Save and Load may have problems with Win CE because of the wide char (UNICODE UCS-2) files on Win CE. But we can figure this out without too much difficulty. I would look at the flags involved in saving the file, and trace through to make sure the xml m_csData contains those default structures before it is saved. Also check into any differences between files on the two versions of the OS. UCS-2 has two bytes per character, ASCII is one byte per char, and UTF-8 is one byte per char for standard chars and more for languages outside of Western Europe. The Save and Load were primarily built for UTF-8 but can be modified for Win CE.
Conversion functions were added to CMarkup in developer release 6.6.
Windows CE compatibility with the error string will be cleaned up in the next release after 8.2. strerror was introduced as part of efforts to reduce platform specific dependencies. I have been responding to Windows CE customers with the following options but neglected to post this until now.
- The quickest solution to get it to compile, inside the
#ifdef _WIN32_WCE at the top of Markup.cpp you can add
#define strerror(n) _T("file error")
- If
errno is supported, you can replace each call to strerror with the error as just a number like
strError.Format( "errno %d", errno );
- To get the actual error string, you can use something like
// OS provides a system error string
DWORD dwError = GetLastError();
CString csDescription;
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, dwError, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),
csDescription.GetBuffer(255), nSize, NULL );
csDescription.ReleaseBuffer();
I will probably implement a private function like CString x_GetSystemError() and use the GetLastError() function. As always, your feedback is welcomed.
It is done in CMarkup release 8.3 and the internal function used to get file errors is called x_GetLastError though there is no affect on the public CMarkup interface.
Try the /Gy compiler option. If the warning remains, based on my googling the warning apparently means it would be necessary to rewrite large functions into multiple smaller ones for the code to work correctly on certain TI 925 chips due to a bug on those chips.
| |