Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
9f993ba3
Commit
9f993ba3
authored
Apr 29, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt help, help texts for types in pwrs added
parent
854c2e46
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
216 additions
and
6 deletions
+216
-6
src/exe/co_convert/src/cnv_readwbl.cpp
src/exe/co_convert/src/cnv_readwbl.cpp
+4
-2
src/exe/co_convert/src/cnv_wbltoxtthelp.cpp
src/exe/co_convert/src/cnv_wbltoxtthelp.cpp
+206
-1
src/exe/co_convert/src/cnv_wbltoxtthelp.h
src/exe/co_convert/src/cnv_wbltoxtthelp.h
+4
-1
src/wbl/pwrs/src/os_templ/hw_templ/makefile
src/wbl/pwrs/src/os_templ/hw_templ/makefile
+2
-2
No files found.
src/exe/co_convert/src/cnv_readwbl.cpp
View file @
9f993ba3
...
...
@@ -480,7 +480,8 @@ int CnvReadWbl::read_wbl( char *filename)
}
else
if
(
state
&
cread_mState_TypeDef
&&
classdef_level
==
object_level
)
{
state
&=
~
cread_mState_TypeDef
;
if
(
wblto
->
type
()
==
Cnv_eWblToType_Html
&&
if
(
(
wblto
->
type
()
==
Cnv_eWblToType_Html
||
wblto
->
type
()
==
Cnv_eWblToType_Xtthelp
)
&&
wblto
->
class_open
())
wblto
->
typedef_close
();
if
(
wblto
->
type
()
==
Cnv_eWblToType_H
&&
...
...
@@ -1271,7 +1272,8 @@ int CnvReadWbl::typedef_close()
}
if
(
wblto
->
type
()
==
Cnv_eWblToType_Html
||
wblto
->
type
()
==
Cnv_eWblToType_Ps
)
wblto
->
type
()
==
Cnv_eWblToType_Ps
||
wblto
->
type
()
==
Cnv_eWblToType_Xtthelp
)
wblto
->
typedef_exec
();
if
(
wblto
->
type
()
==
Cnv_eWblToType_H
&&
object_state
==
cread_mState_TypeDef
)
...
...
src/exe/co_convert/src/cnv_wbltoxtthelp.cpp
View file @
9f993ba3
...
...
@@ -137,7 +137,7 @@ int CnvWblToXtthelp::init( char *first)
fp_tmp
.
open
(
cread_cTmpFile2
);
xtthelp_index_open
=
1
;
xtthelp_in_topic
=
1
;
xtthelp_in_topic
=
0
;
fp_xtthelp_index
<<
"<TOPIC> "
<<
ctx
->
rw
->
volume_name
<<
endl
<<
...
...
@@ -307,6 +307,86 @@ int CnvWblToXtthelp::class_close()
int
CnvWblToXtthelp
::
bit_exec
()
{
int
i
;
char
txt
[
200
];
char
prefix
[
80
];
char
link_ref
[
80
];
char
*
s
;
int
lng_sts
=
1
;
if
(
Lng
::
current
()
!=
lng_eLanguage_en_US
)
lng_sts
=
ctx
->
rw
->
read_lng
(
ctx
->
rw
->
typedef_name
,
ctx
->
rw
->
bit_name
);
if
(
first_bit
)
{
if
(
strstr
(
ctx
->
rw
->
typedef_name
,
"Enum"
))
fp_tmp
<<
"<H1>"
<<
Lng
::
translate
(
"Enumerations"
)
<<
endl
;
else
fp_tmp
<<
"<H1>"
<<
Lng
::
translate
(
"Bits"
)
<<
endl
;
first_bit
=
0
;
}
fp_tmp
<<
"<B>"
<<
ctx
->
rw
->
bit_name
<<
endl
;
// char bitchar = _tolower(ctx->rw->typedef_typeref[0]);
//fp_tmp << " pwr_" << bitchar << ctx->rw->typedef_name << "_" << ctx->rw->bit_pgmname << endl;
if
(
ctx
->
rw
->
doc_fresh
)
{
for
(
i
=
0
;
i
<
ctx
->
rw
->
doc_cnt
;
i
++
)
{
CnvCtx
::
remove_spaces
(
ctx
->
rw
->
doc_text
[
i
],
txt
);
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@image"
,
6
)
==
0
)
{
char
imagefile
[
80
];
CnvCtx
::
remove_spaces
(
txt
+
6
,
imagefile
);
fp_tmp
<<
"<IMAGE> "
<<
imagefile
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@b"
,
2
)
==
0
)
{
fp_tmp
<<
"<B> "
<<
txt
+
2
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@h1"
,
3
)
==
0
)
{
fp_tmp
<<
"<H1> "
<<
txt
+
3
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@h2"
,
3
)
==
0
)
{
fp_tmp
<<
"<H2> "
<<
txt
+
3
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@i"
,
2
)
==
0
)
{
fp_tmp
<<
"<i>"
<<
txt
+
2
<<
endl
;
}
else
fp_tmp
<<
ctx
->
rw
->
doc_text
[
i
]
<<
endl
;
}
}
for
(
i
=
0
;
i
<
ctx
->
rw
->
doc_clink_cnt
;
i
++
)
{
strcpy
(
prefix
,
CnvCtx
::
low
(
ctx
->
rw
->
volume_name
));
strcat
(
prefix
,
"_"
);
if
(
strncmp
(
ctx
->
rw
->
doc_clink_ref
[
i
],
prefix
,
strlen
(
prefix
))
==
0
)
{
strcpy
(
link_ref
,
&
ctx
->
rw
->
doc_clink_ref
[
i
][
strlen
(
prefix
)]);
if
(
(
s
=
strrchr
(
link_ref
,
'.'
)))
*
s
=
0
;
}
else
{
if
(
(
s
=
strchr
(
ctx
->
rw
->
doc_clink_ref
[
i
],
'_'
)))
{
int
len
=
s
-
ctx
->
rw
->
doc_clink_ref
[
i
];
memset
(
link_ref
,
0
,
sizeof
(
link_ref
));
strcpy
(
link_ref
,
&
ctx
->
rw
->
doc_clink_ref
[
i
][
len
+
1
]);
if
(
(
s
=
strrchr
(
link_ref
,
'.'
)))
*
s
=
0
;
strcat
(
link_ref
,
", ,$pwr_lang/"
);
strncat
(
link_ref
,
ctx
->
rw
->
doc_clink_ref
[
i
],
len
);
strcat
(
link_ref
,
"_xtthelp.dat"
);
}
else
{
strcpy
(
link_ref
,
ctx
->
rw
->
doc_clink_ref
[
i
]);
if
(
(
s
=
strrchr
(
link_ref
,
'.'
)))
*
s
=
0
;
}
}
fp_tmp
<<
" "
<<
ctx
->
rw
->
doc_clink_text
[
i
]
<<
" <LINK>"
<<
link_ref
<<
endl
;
}
fp_tmp
<<
endl
;
return
1
;
}
...
...
@@ -369,3 +449,128 @@ int CnvWblToXtthelp::attribute_exec()
return
1
;
}
int
CnvWblToXtthelp
::
typedef_exec
()
{
int
i
;
char
full_class_name
[
80
];
char
link_ref
[
80
];
char
*
s
;
char
txt
[
256
];
char
prefix
[
80
];
int
lng_sts
=
1
;
if
(
Lng
::
current
()
!=
lng_eLanguage_en_US
)
lng_sts
=
ctx
->
rw
->
read_lng
(
ctx
->
rw
->
class_name
,
0
);
strcpy
(
ctx
->
rw
->
class_name
,
ctx
->
rw
->
typedef_name
);
strcpy
(
full_class_name
,
ctx
->
rw
->
volume_name
);
strcat
(
full_class_name
,
":"
);
strcat
(
full_class_name
,
ctx
->
rw
->
class_name
);
// Add into index file
fp_xtthelp_index
<<
"<B>"
<<
ctx
->
rw
->
class_name
<<
"<T><T> "
<<
ctx
->
rw
->
doc_summary
<<
" <LINK> "
<<
ctx
->
rw
->
class_name
<<
endl
;
// Add to class file
if
(
xtthelp_in_topic
)
fp_tmp
<<
"</TOPIC>"
<<
endl
;
xtthelp_in_topic
=
1
;
fp_tmp
<<
"<TOPIC> "
<<
ctx
->
rw
->
class_name
<<
endl
<<
"Type"
<<
" "
<<
full_class_name
<<
endl
<<
"<H1>"
<<
ctx
->
rw
->
class_name
<<
endl
<<
endl
;
if
(
!
lng_sts
)
fp_tmp
<<
"("
<<
Lng
::
translate
(
"English text not available"
)
<<
")"
<<
endl
<<
endl
;
if
(
ctx
->
rw
->
doc_fresh
&&
strcmp
(
ctx
->
rw
->
doc_author
,
""
)
!=
0
)
{
fp_tmp
<<
"<B>"
<<
Lng
::
translate
(
"Author"
)
<<
"<T>"
<<
ctx
->
rw
->
doc_author
<<
endl
;
}
if
(
ctx
->
rw
->
doc_fresh
&&
strcmp
(
ctx
->
rw
->
doc_creator
,
""
)
!=
0
)
{
fp_tmp
<<
"<B>"
<<
Lng
::
translate
(
"Creator"
)
<<
"<T>"
<<
ctx
->
rw
->
doc_creator
<<
endl
;
}
if
(
ctx
->
rw
->
doc_fresh
&&
strcmp
(
ctx
->
rw
->
doc_version
,
""
)
!=
0
)
{
fp_tmp
<<
"<B>"
<<
Lng
::
translate
(
"Version"
)
<<
"<T>"
<<
ctx
->
rw
->
doc_version
<<
endl
;
}
fp_tmp
<<
"<H1>"
<<
Lng
::
translate
(
"Description"
)
<<
endl
;
if
(
ctx
->
rw
->
doc_fresh
)
{
for
(
i
=
0
;
i
<
ctx
->
rw
->
doc_cnt
;
i
++
)
{
CnvCtx
::
remove_spaces
(
ctx
->
rw
->
doc_text
[
i
],
txt
);
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@image"
,
6
)
==
0
)
{
char
imagefile
[
80
];
CnvCtx
::
remove_spaces
(
txt
+
6
,
imagefile
);
fp_tmp
<<
"<IMAGE> "
<<
imagefile
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@b"
,
2
)
==
0
)
{
fp_tmp
<<
"<B> "
<<
txt
+
2
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@h1"
,
3
)
==
0
)
{
fp_tmp
<<
"<H1> "
<<
txt
+
3
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@h2"
,
3
)
==
0
)
{
fp_tmp
<<
"<H2> "
<<
txt
+
3
<<
endl
;
}
else
if
(
strncmp
(
CnvCtx
::
low
(
txt
),
"@i"
,
2
)
==
0
)
{
fp_tmp
<<
"<i>"
<<
txt
+
2
<<
endl
;
}
else
fp_tmp
<<
ctx
->
rw
->
doc_text
[
i
]
<<
endl
;
}
}
for
(
i
=
0
;
i
<
ctx
->
rw
->
doc_clink_cnt
;
i
++
)
{
strcpy
(
prefix
,
CnvCtx
::
low
(
ctx
->
rw
->
volume_name
));
strcat
(
prefix
,
"_"
);
if
(
strncmp
(
ctx
->
rw
->
doc_clink_ref
[
i
],
prefix
,
strlen
(
prefix
))
==
0
)
{
strcpy
(
link_ref
,
&
ctx
->
rw
->
doc_clink_ref
[
i
][
strlen
(
prefix
)]);
if
(
(
s
=
strrchr
(
link_ref
,
'.'
)))
*
s
=
0
;
}
else
{
if
(
(
s
=
strchr
(
ctx
->
rw
->
doc_clink_ref
[
i
],
'_'
)))
{
int
len
=
s
-
ctx
->
rw
->
doc_clink_ref
[
i
];
memset
(
link_ref
,
0
,
sizeof
(
link_ref
));
strcpy
(
link_ref
,
&
ctx
->
rw
->
doc_clink_ref
[
i
][
len
+
1
]);
if
(
(
s
=
strrchr
(
link_ref
,
'.'
)))
*
s
=
0
;
strcat
(
link_ref
,
", ,$pwr_lang/"
);
strncat
(
link_ref
,
ctx
->
rw
->
doc_clink_ref
[
i
],
len
);
strcat
(
link_ref
,
"_xtthelp.dat"
);
}
else
{
strcpy
(
link_ref
,
ctx
->
rw
->
doc_clink_ref
[
i
]);
if
(
(
s
=
strrchr
(
link_ref
,
'.'
)))
*
s
=
0
;
}
}
fp_tmp
<<
" "
<<
ctx
->
rw
->
doc_clink_text
[
i
]
<<
" <LINK>"
<<
link_ref
<<
endl
;
}
first_bit
=
1
;
return
1
;
}
int
CnvWblToXtthelp
::
typedef_close
()
{
xtthelp_in_topic
=
0
;
first_bit
=
0
;
fp_tmp
<<
"</TOPIC>"
<<
endl
<<
endl
;
return
1
;
}
src/exe/co_convert/src/cnv_wbltoxtthelp.h
View file @
9f993ba3
...
...
@@ -52,13 +52,14 @@ class CnvReadWbl;
class
CnvWblToXtthelp
:
public
CnvWblTo
{
public:
CnvWblToXtthelp
(
CnvCtx
*
cnv_ctx
)
:
ctx
(
cnv_ctx
),
xtthelp_index_open
(
0
),
xtthelp_in_topic
(
0
)
{}
ctx
(
cnv_ctx
),
xtthelp_index_open
(
0
),
xtthelp_in_topic
(
0
)
,
first_bit
(
0
)
{}
virtual
~
CnvWblToXtthelp
()
{}
CnvCtx
*
ctx
;
ofstream
fp_xtthelp_index
;
int
xtthelp_index_open
;
int
xtthelp_in_topic
;
int
first_bit
;
ofstream
fp_tmp
;
int
init
(
char
*
first
);
...
...
@@ -68,6 +69,8 @@ class CnvWblToXtthelp : public CnvWblTo {
int
body_exec
();
int
attribute_exec
();
int
bit_exec
();
int
typedef_exec
();
int
typedef_close
();
Cnv_eWblToType
type
()
{
return
Cnv_eWblToType_Xtthelp
;}
int
index_open
()
{
return
xtthelp_index_open
;}
...
...
src/wbl/pwrs/src/os_templ/hw_templ/makefile
View file @
9f993ba3
...
...
@@ -75,11 +75,11 @@ $(doc_dir)/en_us/orm/pwrs_allclasses.html :
$(exe_dir)/en_us/pwrs_xtthelp.dat
:
@
echo
"Generating xtt help files for pwrs classes en_us"
@
$(co_convert)
-x
-d
$(exe_dir)
/en_us
"
$(pwre_sroot)
/wbl/pwrs/src/pwrs_
c_
*.wb_load"
@
$(co_convert)
-x
-d
$(exe_dir)
/en_us
"
$(pwre_sroot)
/wbl/pwrs/src/pwrs_*.wb_load"
$(exe_dir)/sv_se/pwrs_xtthelp.dat
:
@
echo
"Generating xtt help files for pwrs classes sv_se"
@
$(co_convert)
-x
-l
sv_se
-d
$(exe_dir)
/sv_se
"
$(pwre_sroot)
/wbl/pwrs/src/pwrs_
c_
*.wb_load"
@
$(co_convert)
-x
-l
sv_se
-d
$(exe_dir)
/sv_se
"
$(pwre_sroot)
/wbl/pwrs/src/pwrs_*.wb_load"
#$(export_wbl) : $(cnf_dir)/%.wb_vers : %.wb_load
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment