- char hpjFilename[256];
- char helpFile[50];
- char rtfFile[50];
- strcpy(hpjFilename, filename);
- StripExtension(hpjFilename);
- strcat(hpjFilename, ".hpj");
-
- strcpy(helpFile, wxFileNameFromPath(filename));
- StripExtension(helpFile);
- strcpy(rtfFile, helpFile);
- strcat(helpFile, ".hlp");
- strcat(rtfFile, ".rtf");
-
- FILE *fd = fopen(hpjFilename, "w");
- if (!fd)
- return FALSE;
-
- char *helpTitle = winHelpTitle;
- if (!helpTitle)
- helpTitle = "Untitled";
-
- wxString thePath = wxPathOnly(InputFile);
- if (thePath.IsEmpty())
- thePath = ".";
- fprintf(fd, "[OPTIONS]\n");
- fprintf(fd, "BMROOT=%s ; Assume that bitmaps are where the source is\n", thePath.c_str());
- fprintf(fd, "TITLE=%s\n", helpTitle);
- fprintf(fd, "CONTENTS=Contents\n");
-
- if (winHelpVersion > 3)
- {
- fprintf(fd, "; COMPRESS=12 Hall Zeck ; Max compression, but needs lots of memory\n");
- fprintf(fd, "COMPRESS=8 Zeck\n");
- fprintf(fd, "LCID=0x809 0x0 0x0 ;English (British)\n");
- fprintf(fd, "HLP=.\\%s.hlp\n", wxFileNameFromPath(FileRoot));
- }
- else
- {
- fprintf(fd, "COMPRESS=HIGH\n");
- }
- fprintf(fd, "\n");
+ wxChar hpjFilename[256];
+ wxChar helpFile[50];
+ wxChar rtfFile[50];
+ wxStrcpy(hpjFilename, filename);
+ StripExtension(hpjFilename);
+ wxStrcat(hpjFilename, _T(".hpj"));
+
+ wxStrcpy(helpFile, wxFileNameFromPath(filename));
+ StripExtension(helpFile);
+ wxStrcpy(rtfFile, helpFile);
+ wxStrcat(helpFile, _T(".hlp"));
+ wxStrcat(rtfFile, _T(".rtf"));
+
+ FILE *fd = wxFopen(hpjFilename, _T("w"));
+ if (!fd)
+ return false;
+
+ wxChar *helpTitle = winHelpTitle;
+ if (!helpTitle)
+ helpTitle = _T("Untitled");
+
+ wxString thePath = wxPathOnly(InputFile);
+ if (thePath.empty())
+ thePath = _T(".");
+ wxFprintf(fd, _T("[OPTIONS]\n"));
+ wxFprintf(fd, _T("BMROOT=%s ; Assume that bitmaps are where the source is\n"), thePath.c_str());
+ wxFprintf(fd, _T("TITLE=%s\n"), helpTitle);
+ wxFprintf(fd, _T("CONTENTS=Contents\n"));
+
+ if (winHelpVersion > 3)
+ {
+ wxFprintf(fd, _T("; COMPRESS=12 Hall Zeck ; Max compression, but needs lots of memory\n"));
+ wxFprintf(fd, _T("COMPRESS=8 Zeck\n"));
+ wxFprintf(fd, _T("LCID=0x809 0x0 0x0 ;English (British)\n"));
+ wxFprintf(fd, _T("HLP=.\\%s.hlp\n"), wxFileNameFromPath(FileRoot));
+ }
+ else
+ {
+ wxFprintf(fd, _T("COMPRESS=HIGH\n"));
+ }
+ wxFprintf(fd, _T("\n"));