Commit 0ba4cf0e authored by claes's avatar claes

Links to exlib added

parent d3857e81
/* /*
* Proview $Id: cnv_readwbl.cpp,v 1.10 2007-12-06 08:09:56 claes Exp $ * Proview $Id: cnv_readwbl.cpp,v 1.11 2008-06-30 05:53:27 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -1002,6 +1002,7 @@ void CnvReadWbl::doc_init() ...@@ -1002,6 +1002,7 @@ void CnvReadWbl::doc_init()
memset( doc_link_text, 0, sizeof(doc_link_text)); memset( doc_link_text, 0, sizeof(doc_link_text));
memset( doc_groups, 0, sizeof(doc_groups)); memset( doc_groups, 0, sizeof(doc_groups));
doc_clink_cnt = 0; doc_clink_cnt = 0;
doc_xlink_cnt = 0;
doc_link_cnt = 0; doc_link_cnt = 0;
doc_group_cnt = 0; doc_group_cnt = 0;
} }
...@@ -1083,6 +1084,25 @@ int CnvReadWbl::doc_add( char *line) ...@@ -1083,6 +1084,25 @@ int CnvReadWbl::doc_add( char *line)
} }
doc_clink_cnt++; doc_clink_cnt++;
} }
else if ( strcmp( low(line_part[1]), "@exliblink") == 0) {
if ( doc_xlink_cnt >= (int) (sizeof(doc_xlink_ref)/sizeof(doc_xlink_ref[0]))) {
printf("Error: max number of classlinks exceeded\n");
return 1;
}
for ( i = 2; i < nr; i++) {
if ( i == nr - 1)
strcpy( doc_xlink_ref[doc_xlink_cnt], line_part[i]);
else {
if ( i == 2)
strcpy( doc_xlink_text[doc_xlink_cnt], line_part[i]);
else {
strcat( doc_xlink_text[doc_xlink_cnt], " ");
strcat( doc_xlink_text[doc_xlink_cnt], line_part[i]);
}
}
}
doc_xlink_cnt++;
}
else if ( strcmp( low(line_part[1]), "@code") == 0) { else if ( strcmp( low(line_part[1]), "@code") == 0) {
if ( nr > 2) if ( nr > 2)
strcpy( doc_code, line_part[2]); strcpy( doc_code, line_part[2]);
......
/* /*
* Proview $Id: cnv_readwbl.h,v 1.6 2008-06-24 06:53:19 claes Exp $ * Proview $Id: cnv_readwbl.h,v 1.7 2008-06-30 05:53:27 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -168,6 +168,9 @@ class CnvReadWbl { ...@@ -168,6 +168,9 @@ class CnvReadWbl {
char doc_clink_ref[20][80]; char doc_clink_ref[20][80];
char doc_clink_text[20][200]; char doc_clink_text[20][200];
int doc_clink_cnt; int doc_clink_cnt;
char doc_xlink_ref[20][80];
char doc_xlink_text[20][200];
int doc_xlink_cnt;
char doc_summary[400]; char doc_summary[400];
char doc_text[1000][200]; char doc_text[1000][200];
int doc_cnt; int doc_cnt;
......
/* /*
* Proview $Id: cnv_wbltohtml.cpp,v 1.16 2008-03-05 11:47:59 claes Exp $ * Proview $Id: cnv_wbltohtml.cpp,v 1.17 2008-06-30 05:53:27 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -628,6 +628,10 @@ endl << ...@@ -628,6 +628,10 @@ endl <<
html_clf->f << html_clf->f <<
"</XMP>" << endl; "</XMP>" << endl;
for ( i = 0; i < ctx->rw->doc_xlink_cnt; i++) {
html_clf->f <<
" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=\"" << ctx->rw->doc_xlink_ref[i] << "\" TARGET=\"_self\"><FONT size=\"-1\"> " << ctx->rw->doc_xlink_text[i] <<"</FONT></A><BR>" << endl;
}
for ( i = 0; i < ctx->rw->doc_clink_cnt; i++) { for ( i = 0; i < ctx->rw->doc_clink_cnt; i++) {
html_clf->f << html_clf->f <<
" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=\"" << ctx->rw->doc_clink_ref[i] << "\" TARGET=\"_self\"><FONT size=\"-1\"> " << ctx->rw->doc_clink_text[i] <<"</FONT></A><BR>" << endl; " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=\"" << ctx->rw->doc_clink_ref[i] << "\" TARGET=\"_self\"><FONT size=\"-1\"> " << ctx->rw->doc_clink_text[i] <<"</FONT></A><BR>" << endl;
......
/* /*
* Proview $Id: cnv_wbltoxtthelp.cpp,v 1.9 2006-02-23 14:28:45 claes Exp $ * Proview $Id: cnv_wbltoxtthelp.cpp,v 1.10 2008-06-30 05:53:27 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -144,6 +144,19 @@ Lng::translate("Class") << " " << full_class_name << endl << ...@@ -144,6 +144,19 @@ Lng::translate("Class") << " " << full_class_name << endl <<
fp_tmp << ctx->rw->doc_text[i] << endl; fp_tmp << ctx->rw->doc_text[i] << endl;
} }
} }
for ( i = 0; i < ctx->rw->doc_xlink_cnt; i++) {
if ( strncmp( ctx->rw->doc_xlink_ref[i], "../../en_us/man_exlib_",
strlen("../../en_us/man_exlib_")) == 0)
strncpy( link_ref, &ctx->rw->doc_xlink_ref[i][0] + strlen("../../en_us/man_exlib_"),
sizeof(link_ref));
else
strncpy( link_ref, ctx->rw->doc_xlink_ref[i], sizeof(link_ref));
if ( (s = strrchr( link_ref, '.')))
*s = 0;
strcat( link_ref, ", ,$pwr_exe/en_us/man_exlib.dat");
fp_tmp << " " << ctx->rw->doc_xlink_text[i] << " <LINK>" << link_ref << endl;
}
for ( i = 0; i < ctx->rw->doc_clink_cnt; i++) { for ( i = 0; i < ctx->rw->doc_clink_cnt; i++) {
strcpy( prefix, CnvCtx::low(ctx->rw->volume_name)); strcpy( prefix, CnvCtx::low(ctx->rw->volume_name));
strcat( prefix, "_"); strcat( prefix, "_");
......
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