Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
58f16273
Commit
58f16273
authored
Apr 10, 2016
by
Jean-Christophe Cardot
Committed by
Alexandre Julliard
Apr 12, 2016
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhlp32: Replace magic numbers by symbols.
Signed-off-by:
Jean-Christophe Cardot
<
wine@cardot.net
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
64aec5d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
hlpfile.c
programs/winhlp32/hlpfile.c
+12
-12
hlpfile.h
programs/winhlp32/hlpfile.h
+5
-0
No files found.
programs/winhlp32/hlpfile.c
View file @
58f16273
...
...
@@ -1258,13 +1258,13 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
format
=
buf
+
0x15
;
format_end
=
buf
+
GET_UINT
(
buf
,
0x10
);
if
(
buf
[
0x14
]
==
0x20
||
buf
[
0x14
]
==
0x23
)
if
(
buf
[
0x14
]
==
HLP_DISPLAY
||
buf
[
0x14
]
==
HLP_TABLE
)
{
fetch_long
(
&
format
);
*
parlen
=
fetch_ushort
(
&
format
);
}
if
(
buf
[
0x14
]
==
0x23
)
if
(
buf
[
0x14
]
==
HLP_TABLE
)
{
char
type
;
...
...
@@ -1326,7 +1326,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd,
if
(
!
HLPFILE_RtfAddControl
(
rd
,
"
\\
intbl"
))
goto
done
;
}
else
nc
++
;
if
(
buf
[
0x14
]
==
0x01
)
if
(
buf
[
0x14
]
==
HLP_DISPLAY30
)
format
+=
6
;
else
format
+=
4
;
...
...
@@ -1799,12 +1799,12 @@ BOOL HLPFILE_BrowsePage(HLPFILE_PAGE* page, struct RtfData* rd,
switch
(
buf
[
0x14
])
{
case
0x02
:
case
HLP_TOPICHDR
:
if
(
count
++
)
goto
done
;
break
;
case
0x01
:
case
0x20
:
case
0x23
:
case
HLP_DISPLAY30
:
case
HLP_DISPLAY
:
case
HLP_TABLE
:
if
(
!
HLPFILE_BrowseParagraph
(
page
,
rd
,
buf
,
end
,
&
parlen
))
return
FALSE
;
if
(
relative
>
index
*
0x8000
+
offs
)
rd
->
char_pos_rel
=
rd
->
char_pos
;
...
...
@@ -2605,7 +2605,7 @@ static BOOL HLPFILE_SkipParagraph(HLPFILE *hlpfile, const BYTE *buf, const BYTE
if
(
buf
+
0x19
>
end
)
{
WINE_WARN
(
"header too small
\n
"
);
return
FALSE
;};
tmp
=
buf
+
0x15
;
if
(
buf
[
0x14
]
==
0x20
||
buf
[
0x14
]
==
0x23
)
if
(
buf
[
0x14
]
==
HLP_DISPLAY
||
buf
[
0x14
]
==
HLP_TABLE
)
{
fetch_long
(
&
tmp
);
*
len
=
fetch_ushort
(
&
tmp
);
...
...
@@ -2680,7 +2680,7 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
switch
(
buf
[
0x14
])
{
case
0x02
:
case
HLP_TOPICHDR
:
/* Topic Header */
if
(
hlpfile
->
version
<=
16
)
topicoffset
=
ref
+
index
*
12
;
else
...
...
@@ -2688,9 +2688,9 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
if
(
!
HLPFILE_AddPage
(
hlpfile
,
buf
,
end
,
ref
,
topicoffset
))
return
FALSE
;
break
;
case
0x01
:
case
0x20
:
case
0x23
:
case
HLP_DISPLAY30
:
case
HLP_DISPLAY
:
case
HLP_TABLE
:
if
(
!
HLPFILE_SkipParagraph
(
hlpfile
,
buf
,
end
,
&
len
))
return
FALSE
;
offs
+=
len
;
break
;
...
...
programs/winhlp32/hlpfile.h
View file @
58f16273
...
...
@@ -199,3 +199,8 @@ struct RtfData {
BOOL
HLPFILE_BrowsePage
(
HLPFILE_PAGE
*
,
struct
RtfData
*
rd
,
unsigned
font_scale
,
unsigned
relative
);
#define HLP_DISPLAY30 0x01
/* version 3.0 displayable information */
#define HLP_TOPICHDR 0x02
/* topic header information */
#define HLP_DISPLAY 0x20
/* version 3.1 displayable information */
#define HLP_TABLE 0x23
/* version 3.1 table */
Vitaly Lipatov
@lav
mentioned in commit
51e25fb8
·
Sep 03, 2020
mentioned in commit
51e25fb8
mentioned in commit 51e25fb82d0e246a3f5a016b3588698b2f084420
Toggle commit list
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