Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e12d39dc
Commit
e12d39dc
authored
Jan 20, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhlp32: Avoid Unicode macros.
parent
edf44bfb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
32 deletions
+33
-32
Makefile.in
programs/winhlp32/Makefile.in
+1
-0
callback.c
programs/winhlp32/callback.c
+1
-1
hlpfile.c
programs/winhlp32/hlpfile.c
+7
-7
hlpfile.h
programs/winhlp32/hlpfile.h
+1
-1
macro.c
programs/winhlp32/macro.c
+23
-23
winhelp.c
programs/winhlp32/winhelp.c
+0
-0
No files found.
programs/winhlp32/Makefile.in
View file @
e12d39dc
MODULE
=
winhlp32.exe
APPMODE
=
-mwindows
EXTRADEFS
=
-DWINE_NO_UNICODE_MACROS
IMPORTS
=
user32 gdi32
DELAYIMPORTS
=
shell32 comctl32 comdlg32
...
...
programs/winhlp32/callback.c
View file @
e12d39dc
...
...
@@ -46,7 +46,7 @@ static HANDLE CALLBACK WHD_Open(LPSTR name, BYTE flags)
case
2
:
mode
=
GENERIC_READ
;
break
;
default:
WINE_FIXME
(
"Undocumented flags %x
\n
"
,
flags
);
}
return
CreateFile
(
name
,
mode
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
return
CreateFile
A
(
name
,
mode
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
}
...
...
programs/winhlp32/hlpfile.c
View file @
e12d39dc
...
...
@@ -902,7 +902,7 @@ static BOOL HLPFILE_RtfAddTransparentBitmap(struct RtfData* rd, const BITMAPINFO
DeleteDC
(
hdcMem
);
/* we create the bitmap on the fly */
hdcEMF
=
CreateEnhMetaFile
(
NULL
,
NULL
,
NULL
,
NULL
);
hdcEMF
=
CreateEnhMetaFile
W
(
NULL
,
NULL
,
NULL
,
NULL
);
hdcMem
=
CreateCompatibleDC
(
hdcEMF
);
/* sets to RGB(0,0,0) the transparent bits in final bitmap */
...
...
@@ -2014,7 +2014,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
hlpfile
->
lpszTitle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
if
(
!
hlpfile
->
lpszTitle
)
return
FALSE
;
l
strcpy
(
hlpfile
->
lpszTitle
,
str
);
strcpy
(
hlpfile
->
lpszTitle
,
str
);
WINE_TRACE
(
"Title: %s
\n
"
,
hlpfile
->
lpszTitle
);
/* Nothing more to parse */
return
TRUE
;
...
...
@@ -2028,7 +2028,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
if
(
hlpfile
->
lpszTitle
)
{
WINE_WARN
(
"title
\n
"
);
break
;}
hlpfile
->
lpszTitle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
if
(
!
hlpfile
->
lpszTitle
)
return
FALSE
;
l
strcpy
(
hlpfile
->
lpszTitle
,
str
);
strcpy
(
hlpfile
->
lpszTitle
,
str
);
WINE_TRACE
(
"Title: %s
\n
"
,
hlpfile
->
lpszTitle
);
break
;
...
...
@@ -2036,7 +2036,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
if
(
hlpfile
->
lpszCopyright
)
{
WINE_WARN
(
"copyright
\n
"
);
break
;}
hlpfile
->
lpszCopyright
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
if
(
!
hlpfile
->
lpszCopyright
)
return
FALSE
;
l
strcpy
(
hlpfile
->
lpszCopyright
,
str
);
strcpy
(
hlpfile
->
lpszCopyright
,
str
);
WINE_TRACE
(
"Copyright: %s
\n
"
,
hlpfile
->
lpszCopyright
);
break
;
...
...
@@ -2047,10 +2047,10 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
break
;
case
4
:
macro
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HLPFILE_MACRO
)
+
l
strlen
(
str
)
+
1
);
macro
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HLPFILE_MACRO
)
+
strlen
(
str
)
+
1
);
if
(
!
macro
)
break
;
p
=
(
char
*
)
macro
+
sizeof
(
HLPFILE_MACRO
);
l
strcpy
(
p
,
str
);
strcpy
(
p
,
str
);
macro
->
lpszMacro
=
p
;
macro
->
next
=
0
;
for
(
m
=
&
hlpfile
->
first_macro
;
*
m
;
m
=
&
(
*
m
)
->
next
);
...
...
@@ -2734,7 +2734,7 @@ HLPFILE *HLPFILE_ReadHlpFile(LPCSTR lpszPath)
}
hlpfile
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
HLPFILE
)
+
l
strlen
(
lpszPath
)
+
1
);
sizeof
(
HLPFILE
)
+
strlen
(
lpszPath
)
+
1
);
if
(
!
hlpfile
)
return
0
;
hlpfile
->
lpszPath
=
(
char
*
)
hlpfile
+
sizeof
(
HLPFILE
);
...
...
programs/winhlp32/hlpfile.h
View file @
e12d39dc
...
...
@@ -90,7 +90,7 @@ typedef struct
typedef
struct
{
LOGFONT
LogFont
;
LOGFONT
A
LogFont
;
HFONT
hFont
;
COLORREF
color
;
}
HLPFILE_FONT
;
...
...
programs/winhlp32/macro.c
View file @
e12d39dc
...
...
@@ -61,7 +61,7 @@ static WINHELP_BUTTON** MACRO_LookupButton(WINHELP_WINDOW* win, LPCSTR na
WINHELP_BUTTON
**
b
;
for
(
b
=
&
win
->
first_button
;
*
b
;
b
=
&
(
*
b
)
->
next
)
if
(
!
lstrcmpi
(
name
,
(
*
b
)
->
lpszID
))
break
;
if
(
!
lstrcmpi
A
(
name
,
(
*
b
)
->
lpszID
))
break
;
return
b
;
}
...
...
@@ -79,7 +79,7 @@ void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
WINE_TRACE
(
"(
\"
%s
\"
,
\"
%s
\"
, %s)
\n
"
,
id
,
name
,
macro
);
size
=
sizeof
(
WINHELP_BUTTON
)
+
lstrlen
(
id
)
+
lstrlen
(
name
)
+
l
strlen
(
macro
)
+
3
;
size
=
sizeof
(
WINHELP_BUTTON
)
+
strlen
(
id
)
+
strlen
(
name
)
+
strlen
(
macro
)
+
3
;
button
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
button
)
return
;
...
...
@@ -89,15 +89,15 @@ void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
ptr
=
(
char
*
)
button
+
sizeof
(
WINHELP_BUTTON
);
l
strcpy
(
ptr
,
id
);
strcpy
(
ptr
,
id
);
button
->
lpszID
=
ptr
;
ptr
+=
l
strlen
(
id
)
+
1
;
ptr
+=
strlen
(
id
)
+
1
;
l
strcpy
(
ptr
,
name
);
strcpy
(
ptr
,
name
);
button
->
lpszName
=
ptr
;
ptr
+=
l
strlen
(
name
)
+
1
;
ptr
+=
strlen
(
name
)
+
1
;
l
strcpy
(
ptr
,
macro
);
strcpy
(
ptr
,
macro
);
button
->
lpszMacro
=
ptr
;
button
->
wParam
=
WH_FIRST_BUTTON
;
...
...
@@ -236,8 +236,8 @@ static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
b
=
MACRO_LookupButton
(
win
,
id
);
if
(
!*
b
)
{
WINE_FIXME
(
"Couldn't find button '%s'
\n
"
,
id
);
return
;}
size
=
sizeof
(
WINHELP_BUTTON
)
+
l
strlen
(
id
)
+
lstrlen
((
*
b
)
->
lpszName
)
+
l
strlen
(
macro
)
+
3
;
size
=
sizeof
(
WINHELP_BUTTON
)
+
strlen
(
id
)
+
strlen
((
*
b
)
->
lpszName
)
+
strlen
(
macro
)
+
3
;
button
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
button
)
return
;
...
...
@@ -248,15 +248,15 @@ static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
ptr
=
(
char
*
)
button
+
sizeof
(
WINHELP_BUTTON
);
l
strcpy
(
ptr
,
id
);
strcpy
(
ptr
,
id
);
button
->
lpszID
=
ptr
;
ptr
+=
l
strlen
(
id
)
+
1
;
ptr
+=
strlen
(
id
)
+
1
;
l
strcpy
(
ptr
,
(
*
b
)
->
lpszName
);
strcpy
(
ptr
,
(
*
b
)
->
lpszName
);
button
->
lpszName
=
ptr
;
ptr
+=
l
strlen
((
*
b
)
->
lpszName
)
+
1
;
ptr
+=
strlen
((
*
b
)
->
lpszName
)
+
1
;
l
strcpy
(
ptr
,
macro
);
strcpy
(
ptr
,
macro
);
button
->
lpszMacro
=
ptr
;
*
b
=
button
;
...
...
@@ -291,7 +291,7 @@ static void CALLBACK MACRO_CloseSecondarys(void)
for
(
win
=
Globals
.
win_list
;
win
;
win
=
next
)
{
next
=
win
->
next
;
if
(
lstrcmpi
(
win
->
info
->
name
,
"main"
))
if
(
lstrcmpi
A
(
win
->
info
->
name
,
"main"
))
WINHELP_ReleaseWindow
(
win
);
}
}
...
...
@@ -308,7 +308,7 @@ static void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow)
for
(
win
=
Globals
.
win_list
;
win
;
win
=
next
)
{
next
=
win
->
next
;
if
(
!
lstrcmpi
(
win
->
info
->
name
,
lpszWindow
))
if
(
!
lstrcmpi
A
(
win
->
info
->
name
,
lpszWindow
))
WINHELP_ReleaseWindow
(
win
);
}
}
...
...
@@ -415,7 +415,7 @@ static void CALLBACK MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3,
static
BOOL
CALLBACK
MACRO_FileExist
(
LPCSTR
str
)
{
WINE_TRACE
(
"(
\"
%s
\"
)
\n
"
,
str
);
return
GetFileAttributes
(
str
)
!=
INVALID_FILE_ATTRIBUTES
;
return
GetFileAttributes
A
(
str
)
!=
INVALID_FILE_ATTRIBUTES
;
}
void
CALLBACK
MACRO_FileOpen
(
void
)
...
...
@@ -457,7 +457,7 @@ static void CALLBACK MACRO_FocusWindow(LPCSTR lpszWindow)
if
(
!
lpszWindow
||
!
lpszWindow
[
0
])
lpszWindow
=
"main"
;
for
(
win
=
Globals
.
win_list
;
win
;
win
=
win
->
next
)
if
(
!
lstrcmpi
(
win
->
info
->
name
,
lpszWindow
))
if
(
!
lstrcmpi
A
(
win
->
info
->
name
,
lpszWindow
))
SetFocus
(
win
->
hMainWnd
);
}
...
...
@@ -494,7 +494,7 @@ void CALLBACK MACRO_HelpOnTop(void)
HMENU
menu
;
for
(
win
=
Globals
.
win_list
;
win
;
win
=
win
->
next
)
if
(
!
lstrcmpi
(
win
->
info
->
name
,
"main"
))
if
(
!
lstrcmpi
A
(
win
->
info
->
name
,
"main"
))
main_wnd
=
win
->
hMainWnd
;
if
(
!
main_wnd
)
{
...
...
@@ -519,7 +519,7 @@ void CALLBACK MACRO_History(void)
if
(
Globals
.
active_win
&&
!
Globals
.
active_win
->
hHistoryWnd
)
{
HWND
hWnd
=
CreateWindow
(
HISTORY_WIN_CLASS_NAME
,
"History"
,
WS_OVERLAPPEDWINDOW
,
HWND
hWnd
=
CreateWindow
A
(
HISTORY_WIN_CLASS_NAME
,
"History"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
0
,
0
,
0
,
0
,
Globals
.
hInstance
,
Globals
.
active_win
);
ShowWindow
(
hWnd
,
SW_NORMAL
);
}
...
...
@@ -714,7 +714,7 @@ static void CALLBACK MACRO_Prev(void)
void
CALLBACK
MACRO_Print
(
void
)
{
PRINTDLG
printer
;
PRINTDLG
W
printer
;
WINE_TRACE
(
"()
\n
"
);
...
...
@@ -738,7 +738,7 @@ void CALLBACK MACRO_Print(void)
printer
.
hPrintTemplate
=
0
;
printer
.
hSetupTemplate
=
0
;
if
(
PrintDlg
A
(
&
printer
))
{
if
(
PrintDlg
W
(
&
printer
))
{
WINE_FIXME
(
"Print()
\n
"
);
}
}
...
...
@@ -765,7 +765,7 @@ static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR
}
if
(
!
dll
)
{
HANDLE
hLib
=
LoadLibrary
(
dll_name
);
HANDLE
hLib
=
LoadLibrary
A
(
dll_name
);
/* FIXME: the library will not be unloaded until exit of program
* We don't send the DW_TERM message
...
...
programs/winhlp32/winhelp.c
View file @
e12d39dc
This diff is collapsed.
Click to expand it.
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