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
MODULE
=
winhlp32.exe
APPMODE
=
-mwindows
APPMODE
=
-mwindows
EXTRADEFS
=
-DWINE_NO_UNICODE_MACROS
IMPORTS
=
user32 gdi32
IMPORTS
=
user32 gdi32
DELAYIMPORTS
=
shell32 comctl32 comdlg32
DELAYIMPORTS
=
shell32 comctl32 comdlg32
...
...
programs/winhlp32/callback.c
View file @
e12d39dc
...
@@ -46,7 +46,7 @@ static HANDLE CALLBACK WHD_Open(LPSTR name, BYTE flags)
...
@@ -46,7 +46,7 @@ static HANDLE CALLBACK WHD_Open(LPSTR name, BYTE flags)
case
2
:
mode
=
GENERIC_READ
;
break
;
case
2
:
mode
=
GENERIC_READ
;
break
;
default:
WINE_FIXME
(
"Undocumented flags %x
\n
"
,
flags
);
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
);
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
...
@@ -902,7 +902,7 @@ static BOOL HLPFILE_RtfAddTransparentBitmap(struct RtfData* rd, const BITMAPINFO
DeleteDC
(
hdcMem
);
DeleteDC
(
hdcMem
);
/* we create the bitmap on the fly */
/* we create the bitmap on the fly */
hdcEMF
=
CreateEnhMetaFile
(
NULL
,
NULL
,
NULL
,
NULL
);
hdcEMF
=
CreateEnhMetaFile
W
(
NULL
,
NULL
,
NULL
,
NULL
);
hdcMem
=
CreateCompatibleDC
(
hdcEMF
);
hdcMem
=
CreateCompatibleDC
(
hdcEMF
);
/* sets to RGB(0,0,0) the transparent bits in final bitmap */
/* sets to RGB(0,0,0) the transparent bits in final bitmap */
...
@@ -2014,7 +2014,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
...
@@ -2014,7 +2014,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
hlpfile
->
lpszTitle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
hlpfile
->
lpszTitle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
if
(
!
hlpfile
->
lpszTitle
)
return
FALSE
;
if
(
!
hlpfile
->
lpszTitle
)
return
FALSE
;
l
strcpy
(
hlpfile
->
lpszTitle
,
str
);
strcpy
(
hlpfile
->
lpszTitle
,
str
);
WINE_TRACE
(
"Title: %s
\n
"
,
hlpfile
->
lpszTitle
);
WINE_TRACE
(
"Title: %s
\n
"
,
hlpfile
->
lpszTitle
);
/* Nothing more to parse */
/* Nothing more to parse */
return
TRUE
;
return
TRUE
;
...
@@ -2028,7 +2028,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
...
@@ -2028,7 +2028,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
if
(
hlpfile
->
lpszTitle
)
{
WINE_WARN
(
"title
\n
"
);
break
;}
if
(
hlpfile
->
lpszTitle
)
{
WINE_WARN
(
"title
\n
"
);
break
;}
hlpfile
->
lpszTitle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
hlpfile
->
lpszTitle
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
if
(
!
hlpfile
->
lpszTitle
)
return
FALSE
;
if
(
!
hlpfile
->
lpszTitle
)
return
FALSE
;
l
strcpy
(
hlpfile
->
lpszTitle
,
str
);
strcpy
(
hlpfile
->
lpszTitle
,
str
);
WINE_TRACE
(
"Title: %s
\n
"
,
hlpfile
->
lpszTitle
);
WINE_TRACE
(
"Title: %s
\n
"
,
hlpfile
->
lpszTitle
);
break
;
break
;
...
@@ -2036,7 +2036,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
...
@@ -2036,7 +2036,7 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
if
(
hlpfile
->
lpszCopyright
)
{
WINE_WARN
(
"copyright
\n
"
);
break
;}
if
(
hlpfile
->
lpszCopyright
)
{
WINE_WARN
(
"copyright
\n
"
);
break
;}
hlpfile
->
lpszCopyright
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
hlpfile
->
lpszCopyright
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
if
(
!
hlpfile
->
lpszCopyright
)
return
FALSE
;
if
(
!
hlpfile
->
lpszCopyright
)
return
FALSE
;
l
strcpy
(
hlpfile
->
lpszCopyright
,
str
);
strcpy
(
hlpfile
->
lpszCopyright
,
str
);
WINE_TRACE
(
"Copyright: %s
\n
"
,
hlpfile
->
lpszCopyright
);
WINE_TRACE
(
"Copyright: %s
\n
"
,
hlpfile
->
lpszCopyright
);
break
;
break
;
...
@@ -2047,10 +2047,10 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
...
@@ -2047,10 +2047,10 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
break
;
break
;
case
4
:
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
;
if
(
!
macro
)
break
;
p
=
(
char
*
)
macro
+
sizeof
(
HLPFILE_MACRO
);
p
=
(
char
*
)
macro
+
sizeof
(
HLPFILE_MACRO
);
l
strcpy
(
p
,
str
);
strcpy
(
p
,
str
);
macro
->
lpszMacro
=
p
;
macro
->
lpszMacro
=
p
;
macro
->
next
=
0
;
macro
->
next
=
0
;
for
(
m
=
&
hlpfile
->
first_macro
;
*
m
;
m
=
&
(
*
m
)
->
next
);
for
(
m
=
&
hlpfile
->
first_macro
;
*
m
;
m
=
&
(
*
m
)
->
next
);
...
@@ -2734,7 +2734,7 @@ HLPFILE *HLPFILE_ReadHlpFile(LPCSTR lpszPath)
...
@@ -2734,7 +2734,7 @@ HLPFILE *HLPFILE_ReadHlpFile(LPCSTR lpszPath)
}
}
hlpfile
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
hlpfile
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
HLPFILE
)
+
l
strlen
(
lpszPath
)
+
1
);
sizeof
(
HLPFILE
)
+
strlen
(
lpszPath
)
+
1
);
if
(
!
hlpfile
)
return
0
;
if
(
!
hlpfile
)
return
0
;
hlpfile
->
lpszPath
=
(
char
*
)
hlpfile
+
sizeof
(
HLPFILE
);
hlpfile
->
lpszPath
=
(
char
*
)
hlpfile
+
sizeof
(
HLPFILE
);
...
...
programs/winhlp32/hlpfile.h
View file @
e12d39dc
...
@@ -90,7 +90,7 @@ typedef struct
...
@@ -90,7 +90,7 @@ typedef struct
typedef
struct
typedef
struct
{
{
LOGFONT
LogFont
;
LOGFONT
A
LogFont
;
HFONT
hFont
;
HFONT
hFont
;
COLORREF
color
;
COLORREF
color
;
}
HLPFILE_FONT
;
}
HLPFILE_FONT
;
...
...
programs/winhlp32/macro.c
View file @
e12d39dc
...
@@ -61,7 +61,7 @@ static WINHELP_BUTTON** MACRO_LookupButton(WINHELP_WINDOW* win, LPCSTR na
...
@@ -61,7 +61,7 @@ static WINHELP_BUTTON** MACRO_LookupButton(WINHELP_WINDOW* win, LPCSTR na
WINHELP_BUTTON
**
b
;
WINHELP_BUTTON
**
b
;
for
(
b
=
&
win
->
first_button
;
*
b
;
b
=
&
(
*
b
)
->
next
)
for
(
b
=
&
win
->
first_button
;
*
b
;
b
=
&
(
*
b
)
->
next
)
if
(
!
lstrcmpi
(
name
,
(
*
b
)
->
lpszID
))
break
;
if
(
!
lstrcmpi
A
(
name
,
(
*
b
)
->
lpszID
))
break
;
return
b
;
return
b
;
}
}
...
@@ -79,7 +79,7 @@ void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
...
@@ -79,7 +79,7 @@ void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
WINE_TRACE
(
"(
\"
%s
\"
,
\"
%s
\"
, %s)
\n
"
,
id
,
name
,
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
);
button
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
button
)
return
;
if
(
!
button
)
return
;
...
@@ -89,15 +89,15 @@ void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
...
@@ -89,15 +89,15 @@ void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
ptr
=
(
char
*
)
button
+
sizeof
(
WINHELP_BUTTON
);
ptr
=
(
char
*
)
button
+
sizeof
(
WINHELP_BUTTON
);
l
strcpy
(
ptr
,
id
);
strcpy
(
ptr
,
id
);
button
->
lpszID
=
ptr
;
button
->
lpszID
=
ptr
;
ptr
+=
l
strlen
(
id
)
+
1
;
ptr
+=
strlen
(
id
)
+
1
;
l
strcpy
(
ptr
,
name
);
strcpy
(
ptr
,
name
);
button
->
lpszName
=
ptr
;
button
->
lpszName
=
ptr
;
ptr
+=
l
strlen
(
name
)
+
1
;
ptr
+=
strlen
(
name
)
+
1
;
l
strcpy
(
ptr
,
macro
);
strcpy
(
ptr
,
macro
);
button
->
lpszMacro
=
ptr
;
button
->
lpszMacro
=
ptr
;
button
->
wParam
=
WH_FIRST_BUTTON
;
button
->
wParam
=
WH_FIRST_BUTTON
;
...
@@ -236,8 +236,8 @@ static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
...
@@ -236,8 +236,8 @@ static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
b
=
MACRO_LookupButton
(
win
,
id
);
b
=
MACRO_LookupButton
(
win
,
id
);
if
(
!*
b
)
{
WINE_FIXME
(
"Couldn't find button '%s'
\n
"
,
id
);
return
;}
if
(
!*
b
)
{
WINE_FIXME
(
"Couldn't find button '%s'
\n
"
,
id
);
return
;}
size
=
sizeof
(
WINHELP_BUTTON
)
+
l
strlen
(
id
)
+
size
=
sizeof
(
WINHELP_BUTTON
)
+
strlen
(
id
)
+
lstrlen
((
*
b
)
->
lpszName
)
+
l
strlen
(
macro
)
+
3
;
strlen
((
*
b
)
->
lpszName
)
+
strlen
(
macro
)
+
3
;
button
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
button
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
button
)
return
;
if
(
!
button
)
return
;
...
@@ -248,15 +248,15 @@ static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
...
@@ -248,15 +248,15 @@ static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
ptr
=
(
char
*
)
button
+
sizeof
(
WINHELP_BUTTON
);
ptr
=
(
char
*
)
button
+
sizeof
(
WINHELP_BUTTON
);
l
strcpy
(
ptr
,
id
);
strcpy
(
ptr
,
id
);
button
->
lpszID
=
ptr
;
button
->
lpszID
=
ptr
;
ptr
+=
l
strlen
(
id
)
+
1
;
ptr
+=
strlen
(
id
)
+
1
;
l
strcpy
(
ptr
,
(
*
b
)
->
lpszName
);
strcpy
(
ptr
,
(
*
b
)
->
lpszName
);
button
->
lpszName
=
ptr
;
button
->
lpszName
=
ptr
;
ptr
+=
l
strlen
((
*
b
)
->
lpszName
)
+
1
;
ptr
+=
strlen
((
*
b
)
->
lpszName
)
+
1
;
l
strcpy
(
ptr
,
macro
);
strcpy
(
ptr
,
macro
);
button
->
lpszMacro
=
ptr
;
button
->
lpszMacro
=
ptr
;
*
b
=
button
;
*
b
=
button
;
...
@@ -291,7 +291,7 @@ static void CALLBACK MACRO_CloseSecondarys(void)
...
@@ -291,7 +291,7 @@ static void CALLBACK MACRO_CloseSecondarys(void)
for
(
win
=
Globals
.
win_list
;
win
;
win
=
next
)
for
(
win
=
Globals
.
win_list
;
win
;
win
=
next
)
{
{
next
=
win
->
next
;
next
=
win
->
next
;
if
(
lstrcmpi
(
win
->
info
->
name
,
"main"
))
if
(
lstrcmpi
A
(
win
->
info
->
name
,
"main"
))
WINHELP_ReleaseWindow
(
win
);
WINHELP_ReleaseWindow
(
win
);
}
}
}
}
...
@@ -308,7 +308,7 @@ static void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow)
...
@@ -308,7 +308,7 @@ static void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow)
for
(
win
=
Globals
.
win_list
;
win
;
win
=
next
)
for
(
win
=
Globals
.
win_list
;
win
;
win
=
next
)
{
{
next
=
win
->
next
;
next
=
win
->
next
;
if
(
!
lstrcmpi
(
win
->
info
->
name
,
lpszWindow
))
if
(
!
lstrcmpi
A
(
win
->
info
->
name
,
lpszWindow
))
WINHELP_ReleaseWindow
(
win
);
WINHELP_ReleaseWindow
(
win
);
}
}
}
}
...
@@ -415,7 +415,7 @@ static void CALLBACK MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3,
...
@@ -415,7 +415,7 @@ static void CALLBACK MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3,
static
BOOL
CALLBACK
MACRO_FileExist
(
LPCSTR
str
)
static
BOOL
CALLBACK
MACRO_FileExist
(
LPCSTR
str
)
{
{
WINE_TRACE
(
"(
\"
%s
\"
)
\n
"
,
str
);
WINE_TRACE
(
"(
\"
%s
\"
)
\n
"
,
str
);
return
GetFileAttributes
(
str
)
!=
INVALID_FILE_ATTRIBUTES
;
return
GetFileAttributes
A
(
str
)
!=
INVALID_FILE_ATTRIBUTES
;
}
}
void
CALLBACK
MACRO_FileOpen
(
void
)
void
CALLBACK
MACRO_FileOpen
(
void
)
...
@@ -457,7 +457,7 @@ static void CALLBACK MACRO_FocusWindow(LPCSTR lpszWindow)
...
@@ -457,7 +457,7 @@ static void CALLBACK MACRO_FocusWindow(LPCSTR lpszWindow)
if
(
!
lpszWindow
||
!
lpszWindow
[
0
])
lpszWindow
=
"main"
;
if
(
!
lpszWindow
||
!
lpszWindow
[
0
])
lpszWindow
=
"main"
;
for
(
win
=
Globals
.
win_list
;
win
;
win
=
win
->
next
)
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
);
SetFocus
(
win
->
hMainWnd
);
}
}
...
@@ -494,7 +494,7 @@ void CALLBACK MACRO_HelpOnTop(void)
...
@@ -494,7 +494,7 @@ void CALLBACK MACRO_HelpOnTop(void)
HMENU
menu
;
HMENU
menu
;
for
(
win
=
Globals
.
win_list
;
win
;
win
=
win
->
next
)
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
;
main_wnd
=
win
->
hMainWnd
;
if
(
!
main_wnd
)
if
(
!
main_wnd
)
{
{
...
@@ -519,7 +519,7 @@ void CALLBACK MACRO_History(void)
...
@@ -519,7 +519,7 @@ void CALLBACK MACRO_History(void)
if
(
Globals
.
active_win
&&
!
Globals
.
active_win
->
hHistoryWnd
)
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
);
0
,
0
,
0
,
0
,
0
,
0
,
Globals
.
hInstance
,
Globals
.
active_win
);
ShowWindow
(
hWnd
,
SW_NORMAL
);
ShowWindow
(
hWnd
,
SW_NORMAL
);
}
}
...
@@ -714,7 +714,7 @@ static void CALLBACK MACRO_Prev(void)
...
@@ -714,7 +714,7 @@ static void CALLBACK MACRO_Prev(void)
void
CALLBACK
MACRO_Print
(
void
)
void
CALLBACK
MACRO_Print
(
void
)
{
{
PRINTDLG
printer
;
PRINTDLG
W
printer
;
WINE_TRACE
(
"()
\n
"
);
WINE_TRACE
(
"()
\n
"
);
...
@@ -738,7 +738,7 @@ void CALLBACK MACRO_Print(void)
...
@@ -738,7 +738,7 @@ void CALLBACK MACRO_Print(void)
printer
.
hPrintTemplate
=
0
;
printer
.
hPrintTemplate
=
0
;
printer
.
hSetupTemplate
=
0
;
printer
.
hSetupTemplate
=
0
;
if
(
PrintDlg
A
(
&
printer
))
{
if
(
PrintDlg
W
(
&
printer
))
{
WINE_FIXME
(
"Print()
\n
"
);
WINE_FIXME
(
"Print()
\n
"
);
}
}
}
}
...
@@ -765,7 +765,7 @@ static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR
...
@@ -765,7 +765,7 @@ static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR
}
}
if
(
!
dll
)
if
(
!
dll
)
{
{
HANDLE
hLib
=
LoadLibrary
(
dll_name
);
HANDLE
hLib
=
LoadLibrary
A
(
dll_name
);
/* FIXME: the library will not be unloaded until exit of program
/* FIXME: the library will not be unloaded until exit of program
* We don't send the DW_TERM message
* 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