// reverse-engineering
// and guesswork at its best.
// Author: Petr Smilauer
-// Modified by:
+// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
+// Ron Lee
// Created: 01/01/99
// RCS-ID: $Id$
// Copyright: (c) Petr Smilauer
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
if(nMacroStrings > 0)
fseek( fSHG, nMacroStrings, SEEK_CUR); //nMacroStrings is byte offset...
// and, at the last, read through the strings: hotspot-id[ignored], then topic/macro
- int c;
+ int c;
for( i = 0 ; i < nHotspots ; ++i)
{
while( (c = fgetc( fSHG)) != 0)
int j = 0;
while( (c = fgetc( fSHG)) != 0)
{
- (*hotspots)[i].szHlpTopic_Macro[j] = c;
+ (*hotspots)[i].szHlpTopic_Macro[j] = (wxChar)c;
++j;
}
(*hotspots)[i].szHlpTopic_Macro[j] = 0;
HotSpot *hotspots = NULL;
int n = ParseSHG(filename, &hotspots);
if (n == 0)
- return FALSE;
+ return false;
wxChar buf[100];
- wxSprintf(buf, _T("Converting .SHG file to HTML map file: there are %d hotspots in %s."), n, filename);
+ wxSnprintf(buf, sizeof(buf), _T("Converting .SHG file to HTML map file: there are %d hotspots in %s."), n, filename);
OnInform(buf);
wxChar outBuf[256];
{
OnError(_T("Could not open .map file for writing."));
delete[] hotspots;
- return FALSE;
+ return false;
}
wxFprintf(fd, _T("default %s\n"), defaultFile);
else
{
wxChar buf[300];
- wxSprintf(buf, _T("Warning: could not find hotspot reference %s"), hotspots[i].szHlpTopic_Macro);
+ wxSnprintf(buf, sizeof(buf), _T("Warning: could not find hotspot reference %s"), hotspots[i].szHlpTopic_Macro);
OnInform(buf);
}
wxFprintf(fd, _T("rect %s %d %d %d %d\n"), refFilename, (int)hotspots[i].left, (int)hotspots[i].top,
fclose(fd);
delete[] hotspots;
- return TRUE;
+ return true;
}