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
8c540c65
Commit
8c540c65
authored
Nov 13, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced a few internal functions by exported ones.
parent
ccc538be
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
60 additions
and
41 deletions
+60
-41
avifile.c
dlls/avifil32/avifile.c
+9
-4
dplay.c
dlls/dplayx/dplay.c
+15
-14
access.c
dlls/imagehlp/access.c
+2
-3
internal.c
dlls/msacm/internal.c
+13
-4
infparse.c
dlls/setupapi/infparse.c
+4
-2
mcimidi.c
dlls/winmm/mciseq/mcimidi.c
+9
-7
info.c
dlls/winspool/info.c
+3
-2
dib.c
graphics/x11drv/dib.c
+1
-1
global.c
memory/global.c
+2
-2
thread.c
scheduler/thread.c
+2
-2
No files found.
dlls/avifil32/avifile.c
View file @
8c540c65
...
...
@@ -6,7 +6,7 @@
#include <assert.h>
#include "winbase.h"
#include "win
e/winestring
.h"
#include "win
nls
.h"
#include "mmsystem.h"
#include "winerror.h"
#include "debugtools.h"
...
...
@@ -372,7 +372,8 @@ HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE iface,PAVISTREAM *ppavi,AVISTREAMIN
/* Only the szName at the end is different */
memcpy
(
&
psiw
,
psi
,
sizeof
(
*
psi
)
-
sizeof
(
psi
->
szName
));
lstrcpynAtoW
(
psiw
.
szName
,
psi
->
szName
,
sizeof
(
psi
->
szName
));
MultiByteToWideChar
(
CP_ACP
,
0
,
psi
->
szName
,
-
1
,
psiw
.
szName
,
sizeof
(
psiw
.
szName
)
/
sizeof
(
WCHAR
)
);
return
IAVIFile_CreateStream
(
iface
,
ppavi
,
&
psiw
);
}
...
...
@@ -402,7 +403,9 @@ HRESULT WINAPI AVIFileInfoA(PAVIFILE iface,LPAVIFILEINFOA afi,LONG size) {
return
AVIERR_BADSIZE
;
hres
=
IAVIFile_Info
(
iface
,
&
afiw
,
sizeof
(
afiw
));
memcpy
(
afi
,
&
afiw
,
sizeof
(
*
afi
)
-
sizeof
(
afi
->
szFileType
));
lstrcpynWtoA
(
afi
->
szFileType
,
afiw
.
szFileType
,
sizeof
(
afi
->
szFileType
));
WideCharToMultiByte
(
CP_ACP
,
0
,
afiw
.
szFileType
,
-
1
,
afi
->
szFileType
,
sizeof
(
afi
->
szFileType
),
NULL
,
NULL
);
afi
->
szFileType
[
sizeof
(
afi
->
szFileType
)
-
1
]
=
0
;
return
hres
;
}
...
...
@@ -426,7 +429,9 @@ HRESULT WINAPI AVIStreamInfoA(PAVISTREAM iface,AVISTREAMINFOA *asi,LONG
return
AVIERR_BADSIZE
;
hres
=
IAVIFile_Info
(
iface
,
&
asiw
,
sizeof
(
asiw
));
memcpy
(
asi
,
&
asiw
,
sizeof
(
asiw
)
-
sizeof
(
asiw
.
szName
));
lstrcpynWtoA
(
asi
->
szName
,
asiw
.
szName
,
sizeof
(
asi
->
szName
));
WideCharToMultiByte
(
CP_ACP
,
0
,
asiw
.
szName
,
-
1
,
asi
->
szName
,
sizeof
(
asi
->
szName
),
NULL
,
NULL
);
asi
->
szName
[
sizeof
(
asi
->
szName
)
-
1
]
=
0
;
return
hres
;
}
...
...
dlls/dplayx/dplay.c
View file @
8c540c65
...
...
@@ -10,8 +10,9 @@
#include "winbase.h"
#include "winnt.h"
#include "winreg.h"
#include "
dplay
.h"
#include "
wine/unicode
.h"
#include "heap.h"
#include "dplay.h"
#include "debugtools.h"
#include "dpinit.h"
...
...
@@ -21,7 +22,7 @@
#include "dplaysp.h"
#include "dplay_global.h"
DEFAULT_DEBUG_CHANNEL
(
dplay
)
DEFAULT_DEBUG_CHANNEL
(
dplay
)
;
/* FIXME: Should this be externed? */
extern
HRESULT
DPL_CreateCompoundAddress
...
...
@@ -1224,30 +1225,30 @@ static BOOL DP_CopyDPNAMEStruct( LPDPNAME lpDst, LPDPNAME lpSrc, BOOL bAnsi )
{
if
(
lpSrc
->
psn
.
lpszShortNameA
)
{
lpDst
->
psn
.
lpszShortNameA
=
HEAP_strdupA
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
lpSrc
->
psn
.
lpszShortNameA
);
lpDst
->
psn
.
lpszShortNameA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpSrc
->
psn
.
lpszShortNameA
)
+
1
);
strcpy
(
lpDst
->
psn
.
lpszShortNameA
,
lpSrc
->
psn
.
lpszShortNameA
);
}
if
(
lpSrc
->
pln
.
lpszLongNameA
)
{
lpDst
->
pln
.
lpszLongNameA
=
HEAP_strdupA
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
lpSrc
->
pln
.
lpszLongNameA
);
lpDst
->
pln
.
lpszLongNameA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpSrc
->
pln
.
lpszLongNameA
)
+
1
);
strcpy
(
lpDst
->
pln
.
lpszLongNameA
,
lpSrc
->
pln
.
lpszLongNameA
);
}
}
else
{
if
(
lpSrc
->
psn
.
lpszShortNameA
)
{
lpDst
->
psn
.
lpszShortName
=
HEAP_strdupW
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
lpSrc
->
psn
.
lpszShortName
);
lpDst
->
psn
.
lpszShortName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
lpSrc
->
psn
.
lpszShortName
)
+
1
)
*
sizeof
(
WCHAR
)
);
strcpyW
(
lpDst
->
psn
.
lpszShortName
,
lpSrc
->
psn
.
lpszShortName
);
}
if
(
lpSrc
->
pln
.
lpszLongNameA
)
{
lpDst
->
pln
.
lpszLongName
=
HEAP_strdupW
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
lpSrc
->
pln
.
lpszLongName
);
lpDst
->
pln
.
lpszLongName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
lpSrc
->
pln
.
lpszLongName
)
+
1
)
*
sizeof
(
WCHAR
)
);
strcpyW
(
lpDst
->
pln
.
lpszLongName
,
lpSrc
->
pln
.
lpszLongName
);
}
}
...
...
dlls/imagehlp/access.c
View file @
8c540c65
...
...
@@ -8,7 +8,6 @@
#include "winnt.h"
#include "winerror.h"
#include "windef.h"
#include "heap.h"
#include "debugtools.h"
#include "imagehlp.h"
...
...
@@ -240,8 +239,8 @@ BOOL WINAPI MapAndLoad(
pNtHeader
=
ImageNtHeader
((
PVOID
)
hModule
);
pLoadedImage
->
ModuleName
=
HEAP_strdupA
(
IMAGEHLP_hHeap
,
0
,
pszDllPath
);
/* FIXME: Correct? */
pLoadedImage
->
ModuleName
=
HeapAlloc
(
IMAGEHLP_hHeap
,
0
,
strlen
(
pszDllPath
)
+
1
);
/* FIXME: Correct? */
strcpy
(
pLoadedImage
->
ModuleName
,
pszDllPath
);
pLoadedImage
->
hFile
=
hFile
;
pLoadedImage
->
MappedAddress
=
(
PUCHAR
)
hModule
;
pLoadedImage
->
FileHeader
=
pNtHeader
;
...
...
dlls/msacm/internal.c
View file @
8c540c65
...
...
@@ -14,14 +14,13 @@
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "heap.h"
#include "mmsystem.h"
#include "msacm.h"
#include "msacmdrv.h"
#include "wineacm.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
msacm
)
DEFAULT_DEBUG_CHANNEL
(
msacm
)
;
/**********************************************************************/
...
...
@@ -42,8 +41,18 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName,
padid
=
(
PWINE_ACMDRIVERID
)
HeapAlloc
(
MSACM_hHeap
,
0
,
sizeof
(
WINE_ACMDRIVERID
));
padid
->
obj
.
dwType
=
WINE_ACMOBJ_DRIVERID
;
padid
->
obj
.
pACMDriverID
=
padid
;
padid
->
pszDriverAlias
=
pszDriverAlias
?
HEAP_strdupA
(
MSACM_hHeap
,
0
,
pszDriverAlias
)
:
NULL
;
padid
->
pszFileName
=
pszFileName
?
HEAP_strdupA
(
MSACM_hHeap
,
0
,
pszFileName
)
:
NULL
;
padid
->
pszDriverAlias
=
NULL
;
if
(
pszDriverAlias
)
{
padid
->
pszDriverAlias
=
HeapAlloc
(
MSACM_hHeap
,
0
,
strlen
(
pszDriverAlias
)
+
1
);
strcpy
(
padid
->
pszDriverAlias
,
pszDriverAlias
);
}
padid
->
pszFileName
=
NULL
;
if
(
pszFileName
)
{
padid
->
pszFileName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
strlen
(
pszFileName
)
+
1
);
strcpy
(
padid
->
pszFileName
,
pszFileName
);
}
padid
->
hInstModule
=
hinstModule
;
padid
->
bEnabled
=
TRUE
;
padid
->
pACMDriverList
=
NULL
;
...
...
dlls/setupapi/infparse.c
View file @
8c540c65
...
...
@@ -33,7 +33,9 @@ RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf)
InfList
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
InfList
,
InfNumEntries
+
1
);
InfList
[
InfNumEntries
].
hInf
=
IP_curr_handle
++
;
InfList
[
InfNumEntries
].
hInfFile
=
hFile
;
InfList
[
InfNumEntries
].
lpInfFileName
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
lpInfFileName
);
InfList
[
InfNumEntries
].
lpInfFileName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpInfFileName
)
+
1
);
strcpy
(
InfList
[
InfNumEntries
].
lpInfFileName
,
lpInfFileName
);
*
lphInf
=
InfList
[
InfNumEntries
].
hInf
;
InfNumEntries
++
;
TRACE
(
"ret handle %d.
\n
"
,
*
lphInf
);
...
...
@@ -110,6 +112,6 @@ RETERR16 WINAPI IpClose16(HINF16 hInf)
RETERR16
WINAPI
IpGetProfileString16
(
HINF16
hInf
,
LPCSTR
section
,
LPCSTR
entry
,
LPSTR
buffer
,
WORD
buflen
)
{
TRACE
(
"'%s': section '%s' entry '%s'
\n
"
,
IP_GetFileName
(
hInf
),
section
,
entry
);
GetPrivateProfileString
16
(
section
,
entry
,
""
,
buffer
,
buflen
,
IP_GetFileName
(
hInf
));
GetPrivateProfileString
A
(
section
,
entry
,
""
,
buffer
,
buflen
,
IP_GetFileName
(
hInf
));
return
0
;
}
dlls/winmm/mciseq/mcimidi.c
View file @
8c540c65
...
...
@@ -21,7 +21,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "heap.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
mcimidi
);
...
...
@@ -49,9 +48,9 @@ typedef struct tagWINE_MCIMIDI {
WORD
wNotifyDeviceID
;
/* MCI device ID with a pending notification */
HANDLE
hCallback
;
/* Callback handle for pending notification */
HMMIO
hFile
;
/* mmio file handle open as Element */
LP
C
STR
lpstrElementName
;
/* Name of file */
LP
C
STR
lpstrCopyright
;
LP
C
STR
lpstrName
;
LPSTR
lpstrElementName
;
/* Name of file */
LPSTR
lpstrCopyright
;
LPSTR
lpstrName
;
WORD
dwStatus
;
/* one from MCI_MODE_xxxx */
DWORD
dwMciTimeFormat
;
/* One of the supported MCI_FORMAT_xxxx */
WORD
wFormat
;
/* Format of MIDI hFile (0, 1 or 2) */
...
...
@@ -396,14 +395,16 @@ static DWORD MIDI_mciReadMTrk(WINE_MCIMIDI* wmm, MCI_MIDITRACK* mmt)
if
(
wmm
->
lpstrCopyright
)
{
WARN
(
"Two copyright notices (%s|%s)
\n
"
,
wmm
->
lpstrCopyright
,
buf
);
}
else
{
wmm
->
lpstrCopyright
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
buf
);
wmm
->
lpstrCopyright
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buf
)
+
1
);
strcpy
(
wmm
->
lpstrCopyright
,
buf
);
}
break
;
case
0x03
:
if
(
wmm
->
lpstrCopyright
)
{
WARN
(
"Two names (%s|%s)
\n
"
,
wmm
->
lpstrName
,
buf
);
}
else
{
wmm
->
lpstrName
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
buf
);
wmm
->
lpstrName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buf
)
+
1
);
strcpy
(
wmm
->
lpstrName
,
buf
);
}
break
;
}
...
...
@@ -733,7 +734,8 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParms)
TRACE
(
"hFile=%u
\n
"
,
wmm
->
hFile
);
/* FIXME: should I get a strdup() of it instead? */
wmm
->
lpstrElementName
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
lpParms
->
lpstrElementName
);
wmm
->
lpstrElementName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpParms
->
lpstrElementName
)
+
1
);
strcpy
(
wmm
->
lpstrElementName
,
lpParms
->
lpstrElementName
);
wmm
->
lpstrCopyright
=
NULL
;
wmm
->
lpstrName
=
NULL
;
...
...
dlls/winspool/info.c
View file @
8c540c65
...
...
@@ -498,8 +498,9 @@ BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter,
}
/* Get the name of the printer */
lpOpenedPrinter
->
lpsPrinterName
=
HEAP_strdupW
(
GetProcessHeap
(),
0
,
lpPrinterName
);
lpOpenedPrinter
->
lpsPrinterName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
lpPrinterName
)
+
1
)
*
sizeof
(
WCHAR
)
);
strcpyW
(
lpOpenedPrinter
->
lpsPrinterName
,
lpPrinterName
);
/* Get the unique handle of the printer*/
*
phPrinter
=
lpOpenedPrinter
->
hPrinter
;
...
...
graphics/x11drv/dib.c
View file @
8c540c65
...
...
@@ -3603,7 +3603,7 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPOBJ *bmp)
if
(
dib
->
selector
)
{
WORD
count
=
(
G
ET_SEL_LIMIT
(
dib
->
selector
)
>>
16
)
+
1
;
WORD
count
=
(
G
etSelectorLimit16
(
dib
->
selector
)
>>
16
)
+
1
;
SELECTOR_FreeBlock
(
dib
->
selector
,
count
);
}
}
...
...
memory/global.c
View file @
8c540c65
...
...
@@ -136,7 +136,7 @@ HGLOBAL16 GLOBAL_CreateBlock( WORD flags, const void *ptr, DWORD size,
/* Fill the arena block */
pArena
->
base
=
(
DWORD
)
ptr
;
pArena
->
size
=
G
ET_SEL_LIMIT
(
sel
)
+
1
;
pArena
->
size
=
G
etSelectorLimit16
(
sel
)
+
1
;
pArena
->
handle
=
(
flags
&
GMEM_MOVEABLE
)
?
sel
-
1
:
sel
;
pArena
->
hOwner
=
hOwner
;
pArena
->
lockCount
=
0
;
...
...
@@ -360,7 +360,7 @@ HGLOBAL16 WINAPI GlobalReAlloc16(
if
(
pNewArena
!=
pArena
)
memcpy
(
pNewArena
,
pArena
,
sizeof
(
GLOBALARENA
)
);
pNewArena
->
base
=
(
DWORD
)
ptr
;
pNewArena
->
size
=
G
ET_SEL_LIMIT
(
sel
)
+
1
;
pNewArena
->
size
=
G
etSelectorLimit16
(
sel
)
+
1
;
pNewArena
->
selCount
=
selcount
;
pNewArena
->
handle
=
(
pNewArena
->
flags
&
GA_MOVEABLE
)
?
sel
-
1
:
sel
;
...
...
scheduler/thread.c
View file @
8c540c65
...
...
@@ -112,8 +112,8 @@ static void CALLBACK THREAD_FreeTEB( TEB *teb )
/* Free the associated memory */
if
(
teb
->
socket
!=
-
1
)
close
(
teb
->
socket
);
if
(
teb
->
stack_sel
)
SELECTOR_FreeBlock
(
teb
->
stack_sel
,
1
);
SELECTOR_FreeBlock
(
teb
->
teb_sel
,
1
);
if
(
teb
->
stack_sel
)
FreeSelector16
(
teb
->
stack_sel
);
FreeSelector16
(
teb
->
teb_sel
);
if
(
teb
->
buffer
)
munmap
(
(
void
*
)
teb
->
buffer
,
(
char
*
)(
teb
->
buffer_info
+
1
)
-
(
char
*
)
teb
->
buffer
);
if
(
teb
->
debug_info
)
HeapFree
(
GetProcessHeap
(),
0
,
teb
->
debug_info
);
...
...
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