Commit 619a6327 authored by Claes Sjofors's avatar Claes Sjofors

Convert, fix for links in xtt help html to included topics

parent cde77024
...@@ -173,10 +173,7 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1, ...@@ -173,10 +173,7 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1,
} else { } else {
subject_to_fname(fname, link, 0); subject_to_fname(fname, link, 0);
if (!streq(link_bookmark, "")) { if (file_name && !streq(file_name, "")) {
strcat(fname, "#");
strcat(fname, link_bookmark);
} else if (file_name && !streq(file_name, "")) {
char* s = (char*)strrchr(file_name, '/'); char* s = (char*)strrchr(file_name, '/');
if (s) if (s)
strcpy(fname, s + 1); strcpy(fname, s + 1);
...@@ -189,6 +186,10 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1, ...@@ -189,6 +186,10 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1,
strcat(fname, link); strcat(fname, link);
strcat(fname, ".html"); strcat(fname, ".html");
} }
if (!streq(link_bookmark, "")) {
strcat(fname, "#");
strcat(fname, link_bookmark);
}
} }
if (!in_table) if (!in_table)
fp << "<A HREF=\"" << fname << "\">"; fp << "<A HREF=\"" << fname << "\">";
...@@ -259,10 +260,23 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1, ...@@ -259,10 +260,23 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1,
strcpy(fname, link); strcpy(fname, link);
} else { } else {
subject_to_fname(fname, link, 0); subject_to_fname(fname, link, 0);
if (file_name && !streq(file_name, "")) {
char* s = (char*)strrchr(file_name, '/');
if (s)
strcpy(fname, s + 1);
else
strcpy(fname, file_name);
s = strchr(fname, '.');
if (s)
*s = 0;
strcat(fname, "_");
strcat(fname, link);
strcat(fname, ".html");
}
if (!streq(link_bookmark, "")) { if (!streq(link_bookmark, "")) {
strcat(fname, "#"); strcat(fname, "#");
strcat(fname, link_bookmark); strcat(fname, link_bookmark);
} }
} }
if (!in_table) if (!in_table)
fp << "<A HREF=\"" << fname << "\">"; fp << "<A HREF=\"" << fname << "\">";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment