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
5c3e457b
Commit
5c3e457b
authored
Nov 01, 1998
by
Jesper Skov
Committed by
Alexandre Julliard
Nov 01, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
egcs 'ambiguous else' warnings fixes.
parent
d0421889
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
72 additions
and
2 deletions
+72
-2
file.c
files/file.c
+2
-0
xfont.c
graphics/x11drv/xfont.c
+4
-0
heap.c
memory/heap.c
+2
-0
commdlg.c
misc/commdlg.c
+2
-0
shell.c
misc/shell.c
+2
-0
winsock.c
misc/winsock.c
+8
-0
instr.c
miscemu/instr.c
+2
-0
audio.c
multimedia/audio.c
+4
-0
joystick.c
multimedia/joystick.c
+3
-1
bitmap.c
objects/bitmap.c
+2
-0
clipping.c
objects/clipping.c
+2
-0
color.c
objects/color.c
+2
-0
cursoricon.c
objects/cursoricon.c
+8
-0
dib.c
objects/dib.c
+4
-0
dumpres.c
tools/wrc/dumpres.c
+3
-1
parser.l
tools/wrc/parser.l
+2
-0
clipboard.c
windows/clipboard.c
+6
-0
mdi.c
windows/mdi.c
+2
-0
message.c
windows/message.c
+2
-0
nonclient.c
windows/nonclient.c
+2
-0
painting.c
windows/painting.c
+2
-0
winhelp.c
windows/winhelp.c
+2
-0
winpos.c
windows/winpos.c
+4
-0
No files found.
files/file.c
View file @
5c3e457b
...
@@ -1811,6 +1811,7 @@ BOOL32 WINAPI MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
...
@@ -1811,6 +1811,7 @@ BOOL32 WINAPI MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
if
(
!
DOSFS_GetFullName
(
fn2
,
FALSE
,
&
full_name2
))
return
FALSE
;
if
(
!
DOSFS_GetFullName
(
fn2
,
FALSE
,
&
full_name2
))
return
FALSE
;
/* Source name and target path are valid */
/* Source name and target path are valid */
if
(
full_name1
.
drive
!=
full_name2
.
drive
)
if
(
full_name1
.
drive
!=
full_name2
.
drive
)
{
/* use copy, if allowed */
/* use copy, if allowed */
if
(
!
(
flag
&
MOVEFILE_COPY_ALLOWED
))
{
if
(
!
(
flag
&
MOVEFILE_COPY_ALLOWED
))
{
/* FIXME: Use right error code */
/* FIXME: Use right error code */
...
@@ -1818,6 +1819,7 @@ BOOL32 WINAPI MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
...
@@ -1818,6 +1819,7 @@ BOOL32 WINAPI MoveFileEx32A( LPCSTR fn1, LPCSTR fn2, DWORD flag )
return
FALSE
;
return
FALSE
;
}
}
else
mode
=
1
;
else
mode
=
1
;
}
if
(
DOSFS_GetFullName
(
fn2
,
TRUE
,
&
full_name2
))
if
(
DOSFS_GetFullName
(
fn2
,
TRUE
,
&
full_name2
))
/* target exists, check if we may overwrite */
/* target exists, check if we may overwrite */
if
(
!
(
flag
&
MOVEFILE_REPLACE_EXISTING
))
{
if
(
!
(
flag
&
MOVEFILE_REPLACE_EXISTING
))
{
...
...
graphics/x11drv/xfont.c
View file @
5c3e457b
...
@@ -453,11 +453,13 @@ static BOOL32 LFD_ComposeLFD( fontObject* fo,
...
@@ -453,11 +453,13 @@ static BOOL32 LFD_ComposeLFD( fontObject* fo,
else
h
=
(
fo
->
fi
->
lfd_height
*
height
)
/
fo
->
fi
->
df
.
dfPixHeight
;
else
h
=
(
fo
->
fi
->
lfd_height
*
height
)
/
fo
->
fi
->
df
.
dfPixHeight
;
if
(
XTextCaps
&
TC_SF_X_YINDEP
)
if
(
XTextCaps
&
TC_SF_X_YINDEP
)
{
if
(
fo
->
lf
.
lfWidth
&&
!
(
fo
->
fo_flags
&
FO_SYNTH_WIDTH
)
)
if
(
fo
->
lf
.
lfWidth
&&
!
(
fo
->
fo_flags
&
FO_SYNTH_WIDTH
)
)
point
=
(
fo
->
fi
->
lfd_decipoints
*
fo
->
lf
.
lfWidth
)
/
fo
->
fi
->
df
.
dfAvgWidth
;
point
=
(
fo
->
fi
->
lfd_decipoints
*
fo
->
lf
.
lfWidth
)
/
fo
->
fi
->
df
.
dfAvgWidth
;
else
else
if
(
fo
->
fi
->
fi_flags
&
FI_SCALABLE
)
/* adjust h/w ratio */
if
(
fo
->
fi
->
fi_flags
&
FI_SCALABLE
)
/* adjust h/w ratio */
point
=
h
*
72
*
10
/
fo
->
fi
->
lfd_resolution
;
point
=
h
*
72
*
10
/
fo
->
fi
->
lfd_resolution
;
}
/* handle rotated fonts */
/* handle rotated fonts */
if
(
fo
->
lf
.
lfEscapement
)
{
if
(
fo
->
lf
.
lfEscapement
)
{
...
@@ -2242,10 +2244,12 @@ BOOL32 X11DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
...
@@ -2242,10 +2244,12 @@ BOOL32 X11DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
else
else
for
(
;
pfr
;
pfr
=
pfr
->
next
)
for
(
;
pfr
;
pfr
=
pfr
->
next
)
if
(
pfr
->
fi
)
if
(
pfr
->
fi
)
{
if
(
(
b
=
(
*
proc
)(
(
LPENUMLOGFONT16
)
&
lf
,
&
tm
,
if
(
(
b
=
(
*
proc
)(
(
LPENUMLOGFONT16
)
&
lf
,
&
tm
,
XFONT_GetFontMetric
(
pfr
->
fi
,
&
lf
,
&
tm
),
lp
))
)
XFONT_GetFontMetric
(
pfr
->
fi
,
&
lf
,
&
tm
),
lp
))
)
bRet
=
b
;
bRet
=
b
;
else
break
;
else
break
;
}
return
bRet
;
return
bRet
;
}
}
...
...
memory/heap.c
View file @
5c3e457b
...
@@ -1435,10 +1435,12 @@ HANDLE32 WINAPI Local32Init( WORD segment, DWORD tableSize,
...
@@ -1435,10 +1435,12 @@ HANDLE32 WINAPI Local32Init( WORD segment, DWORD tableSize,
/* Determine new heap size */
/* Determine new heap size */
if
(
segment
)
if
(
segment
)
{
if
(
(
segSize
=
GetSelectorLimit
(
segment
))
==
0
)
if
(
(
segSize
=
GetSelectorLimit
(
segment
))
==
0
)
return
0
;
return
0
;
else
else
segSize
++
;
segSize
++
;
}
if
(
heapSize
==
-
1L
)
if
(
heapSize
==
-
1L
)
heapSize
=
1024L
*
1024L
;
/* FIXME */
heapSize
=
1024L
*
1024L
;
/* FIXME */
...
...
misc/commdlg.c
View file @
5c3e457b
...
@@ -425,11 +425,13 @@ static LONG FILEDLG_WMDrawItem(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam,int s
...
@@ -425,11 +425,13 @@ static LONG FILEDLG_WMDrawItem(HWND16 hWnd, WPARAM16 wParam, LPARAM lParam,int s
(
LPARAM
)
SEGPTR_GET
(
str
));
(
LPARAM
)
SEGPTR_GET
(
str
));
if
(
savedlg
)
/* use _gray_ text in FileSaveDlg */
if
(
savedlg
)
/* use _gray_ text in FileSaveDlg */
{
if
(
!
lpdis
->
itemState
)
if
(
!
lpdis
->
itemState
)
SetTextColor32
(
lpdis
->
hDC
,
GetSysColor32
(
COLOR_GRAYTEXT
)
);
SetTextColor32
(
lpdis
->
hDC
,
GetSysColor32
(
COLOR_GRAYTEXT
)
);
else
else
SetTextColor32
(
lpdis
->
hDC
,
GetSysColor32
(
COLOR_WINDOWTEXT
)
);
SetTextColor32
(
lpdis
->
hDC
,
GetSysColor32
(
COLOR_WINDOWTEXT
)
);
/* inversion of gray would be bad readable */
/* inversion of gray would be bad readable */
}
TextOut16
(
lpdis
->
hDC
,
lpdis
->
rcItem
.
left
,
lpdis
->
rcItem
.
top
,
TextOut16
(
lpdis
->
hDC
,
lpdis
->
rcItem
.
left
,
lpdis
->
rcItem
.
top
,
str
,
strlen
(
str
));
str
,
strlen
(
str
));
...
...
misc/shell.c
View file @
5c3e457b
...
@@ -667,6 +667,7 @@ HGLOBAL16 WINAPI InternalExtractIcon(HINSTANCE16 hInstance,
...
@@ -667,6 +667,7 @@ HGLOBAL16 WINAPI InternalExtractIcon(HINSTANCE16 hInstance,
/* load resources and create icons */
/* load resources and create icons */
if
(
(
pIconStorage
&&
pIconDir
)
||
lpiID
)
if
(
(
pIconStorage
&&
pIconDir
)
||
lpiID
)
{
if
(
nIconIndex
==
(
UINT16
)
-
1
)
RetPtr
[
0
]
=
iconDirCount
;
if
(
nIconIndex
==
(
UINT16
)
-
1
)
RetPtr
[
0
]
=
iconDirCount
;
else
if
(
nIconIndex
<
iconDirCount
)
else
if
(
nIconIndex
<
iconDirCount
)
{
{
...
@@ -705,6 +706,7 @@ HGLOBAL16 WINAPI InternalExtractIcon(HINSTANCE16 hInstance,
...
@@ -705,6 +706,7 @@ HGLOBAL16 WINAPI InternalExtractIcon(HINSTANCE16 hInstance,
RetPtr
[
icon
-
nIconIndex
]
=
0
;
RetPtr
[
icon
-
nIconIndex
]
=
0
;
}
}
}
}
}
if
(
lpiID
)
HeapFree
(
GetProcessHeap
(),
0
,
lpiID
);
if
(
lpiID
)
HeapFree
(
GetProcessHeap
(),
0
,
lpiID
);
else
HeapFree
(
GetProcessHeap
(),
0
,
pData
);
else
HeapFree
(
GetProcessHeap
(),
0
,
pData
);
}
}
...
...
misc/winsock.c
View file @
5c3e457b
...
@@ -500,9 +500,11 @@ void WINAPI WSASetLastError16(INT16 iError)
...
@@ -500,9 +500,11 @@ void WINAPI WSASetLastError16(INT16 iError)
int
_check_ws
(
LPWSINFO
pwsi
,
ws_socket
*
pws
)
int
_check_ws
(
LPWSINFO
pwsi
,
ws_socket
*
pws
)
{
{
if
(
pwsi
)
if
(
pwsi
)
{
if
(
pwsi
->
flags
&
WSI_BLOCKINGCALL
)
pwsi
->
err
=
WSAEINPROGRESS
;
if
(
pwsi
->
flags
&
WSI_BLOCKINGCALL
)
pwsi
->
err
=
WSAEINPROGRESS
;
else
if
(
WSI_CHECK_RANGE
(
pwsi
,
pws
)
)
return
1
;
else
if
(
WSI_CHECK_RANGE
(
pwsi
,
pws
)
)
return
1
;
else
pwsi
->
err
=
WSAENOTSOCK
;
else
pwsi
->
err
=
WSAENOTSOCK
;
}
return
0
;
return
0
;
}
}
...
@@ -611,8 +613,11 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
...
@@ -611,8 +613,11 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
#endif
#endif
if
(
_check_ws
(
pwsi
,
pws
)
)
if
(
_check_ws
(
pwsi
,
pws
)
)
{
if
(
namelen
>=
sizeof
(
*
name
)
)
if
(
namelen
>=
sizeof
(
*
name
)
)
{
if
(
((
struct
ws_sockaddr_in
*
)
name
)
->
sin_family
==
AF_INET
)
if
(
((
struct
ws_sockaddr_in
*
)
name
)
->
sin_family
==
AF_INET
)
{
if
(
bind
(
pws
->
fd
,
name
,
namelen
)
<
0
)
if
(
bind
(
pws
->
fd
,
name
,
namelen
)
<
0
)
{
{
int
loc_errno
=
errno
;
int
loc_errno
=
errno
;
...
@@ -626,8 +631,11 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
...
@@ -626,8 +631,11 @@ INT32 WINAPI WINSOCK_bind32(SOCKET32 s, struct sockaddr *name, INT32 namelen)
}
}
}
}
else
return
0
;
/* success */
else
return
0
;
/* success */
}
else
pwsi
->
err
=
WSAEAFNOSUPPORT
;
else
pwsi
->
err
=
WSAEAFNOSUPPORT
;
}
else
pwsi
->
err
=
WSAEFAULT
;
else
pwsi
->
err
=
WSAEFAULT
;
}
return
SOCKET_ERROR
;
return
SOCKET_ERROR
;
}
}
...
...
miscemu/instr.c
View file @
5c3e457b
...
@@ -472,10 +472,12 @@ BOOL32 INSTR_EmulateInstruction( SIGCONTEXT *context )
...
@@ -472,10 +472,12 @@ BOOL32 INSTR_EmulateInstruction( SIGCONTEXT *context )
(
void
)
0
;
(
void
)
0
;
if
(
repX
)
if
(
repX
)
{
if
(
long_addr
)
if
(
long_addr
)
ECX_sig
(
context
)
=
0
;
ECX_sig
(
context
)
=
0
;
else
else
CX_sig
(
context
)
=
0
;
CX_sig
(
context
)
=
0
;
}
while
(
count
--
>
0
)
while
(
count
--
>
0
)
{
{
...
...
multimedia/audio.c
View file @
5c3e457b
...
@@ -1228,10 +1228,12 @@ DWORD WINAPI wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
...
@@ -1228,10 +1228,12 @@ DWORD WINAPI wodMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
/* FIXME: For now, only one sound device (SOUND_DEV) is allowed */
/* FIXME: For now, only one sound device (SOUND_DEV) is allowed */
audio
=
open
(
SOUND_DEV
,
O_WRONLY
,
0
);
audio
=
open
(
SOUND_DEV
,
O_WRONLY
,
0
);
if
(
audio
==
-
1
)
if
(
audio
==
-
1
)
{
if
(
errno
==
EBUSY
)
if
(
errno
==
EBUSY
)
return
1
;
return
1
;
else
else
return
0
;
return
0
;
}
close
(
audio
);
close
(
audio
);
return
1
;
return
1
;
case
WODM_GETPITCH
:
case
WODM_GETPITCH
:
...
@@ -1685,10 +1687,12 @@ DWORD WINAPI widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
...
@@ -1685,10 +1687,12 @@ DWORD WINAPI widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
/* FIXME: For now, only one sound device (SOUND_DEV) is allowed */
/* FIXME: For now, only one sound device (SOUND_DEV) is allowed */
audio
=
open
(
SOUND_DEV
,
O_RDONLY
,
0
);
audio
=
open
(
SOUND_DEV
,
O_RDONLY
,
0
);
if
(
audio
==
-
1
)
if
(
audio
==
-
1
)
{
if
(
errno
==
EBUSY
)
if
(
errno
==
EBUSY
)
return
1
;
return
1
;
else
else
return
0
;
return
0
;
}
close
(
audio
);
close
(
audio
);
return
1
;
return
1
;
case
WIDM_GETPOS
:
case
WIDM_GETPOS
:
...
...
multimedia/joystick.c
View file @
5c3e457b
...
@@ -83,7 +83,8 @@ void joySendMessages(void)
...
@@ -83,7 +83,8 @@ void joySendMessages(void)
struct
js_status
js
;
struct
js_status
js
;
if
(
joy_nr_open
)
if
(
joy_nr_open
)
for
(
joy
=
0
;
joy
<
MAXJOYDRIVERS
;
joy
++
)
{
for
(
joy
=
0
;
joy
<
MAXJOYDRIVERS
;
joy
++
)
if
(
joy_dev
[
joy
]
>=
0
)
{
if
(
joy_dev
[
joy
]
>=
0
)
{
if
(
count_use
[
joy
]
>
250
)
{
if
(
count_use
[
joy
]
>
250
)
{
joyCloseDriver
(
joy
);
joyCloseDriver
(
joy
);
...
@@ -92,6 +93,7 @@ void joySendMessages(void)
...
@@ -92,6 +93,7 @@ void joySendMessages(void)
count_use
[
joy
]
++
;
count_use
[
joy
]
++
;
}
else
}
else
return
;
return
;
}
if
(
joyCaptured
==
FALSE
)
return
;
if
(
joyCaptured
==
FALSE
)
return
;
TRACE
(
mmsys
,
" --
\n
"
);
TRACE
(
mmsys
,
" --
\n
"
);
...
...
objects/bitmap.c
View file @
5c3e457b
...
@@ -465,6 +465,7 @@ HANDLE32 WINAPI LoadImage32W( HINSTANCE32 hinst, LPCWSTR name, UINT32 type,
...
@@ -465,6 +465,7 @@ HANDLE32 WINAPI LoadImage32W( HINSTANCE32 hinst, LPCWSTR name, UINT32 type,
);
);
}
}
if
(
loadflags
&
LR_DEFAULTSIZE
)
if
(
loadflags
&
LR_DEFAULTSIZE
)
{
if
(
type
==
IMAGE_ICON
)
{
if
(
type
==
IMAGE_ICON
)
{
if
(
!
desiredx
)
desiredx
=
SYSMETRICS_CXICON
;
if
(
!
desiredx
)
desiredx
=
SYSMETRICS_CXICON
;
if
(
!
desiredy
)
desiredy
=
SYSMETRICS_CYICON
;
if
(
!
desiredy
)
desiredy
=
SYSMETRICS_CYICON
;
...
@@ -472,6 +473,7 @@ HANDLE32 WINAPI LoadImage32W( HINSTANCE32 hinst, LPCWSTR name, UINT32 type,
...
@@ -472,6 +473,7 @@ HANDLE32 WINAPI LoadImage32W( HINSTANCE32 hinst, LPCWSTR name, UINT32 type,
if
(
!
desiredx
)
desiredx
=
SYSMETRICS_CXCURSOR
;
if
(
!
desiredx
)
desiredx
=
SYSMETRICS_CXCURSOR
;
if
(
!
desiredy
)
desiredy
=
SYSMETRICS_CYCURSOR
;
if
(
!
desiredy
)
desiredy
=
SYSMETRICS_CYCURSOR
;
}
}
}
if
(
loadflags
&
LR_LOADFROMFILE
)
loadflags
&=
~
LR_SHARED
;
if
(
loadflags
&
LR_LOADFROMFILE
)
loadflags
&=
~
LR_SHARED
;
switch
(
type
)
{
switch
(
type
)
{
case
IMAGE_BITMAP
:
case
IMAGE_BITMAP
:
...
...
objects/clipping.c
View file @
5c3e457b
...
@@ -491,6 +491,7 @@ INT32 WINAPI GetClipRgn32( HDC32 hdc, HRGN32 hRgn )
...
@@ -491,6 +491,7 @@ INT32 WINAPI GetClipRgn32( HDC32 hdc, HRGN32 hRgn )
{
{
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
if
(
dc
&&
hRgn
)
if
(
dc
&&
hRgn
)
{
if
(
dc
->
w
.
hClipRgn
)
if
(
dc
->
w
.
hClipRgn
)
{
{
/* this assumes that dc->w.hClipRgn is in coordinates
/* this assumes that dc->w.hClipRgn is in coordinates
...
@@ -503,6 +504,7 @@ INT32 WINAPI GetClipRgn32( HDC32 hdc, HRGN32 hRgn )
...
@@ -503,6 +504,7 @@ INT32 WINAPI GetClipRgn32( HDC32 hdc, HRGN32 hRgn )
}
}
}
}
else
return
0
;
else
return
0
;
}
return
-
1
;
return
-
1
;
}
}
...
...
objects/color.c
View file @
5c3e457b
...
@@ -795,12 +795,14 @@ COLORREF COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF
...
@@ -795,12 +795,14 @@ COLORREF COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF
(
palPalEntry
+
COLOR_PaletteLookupPixel
(
palPalEntry
,
size
,
NULL
,
color
,
FALSE
));
(
palPalEntry
+
COLOR_PaletteLookupPixel
(
palPalEntry
,
size
,
NULL
,
color
,
FALSE
));
else
if
(
spec_type
==
1
)
/* PALETTEINDEX */
else
if
(
spec_type
==
1
)
/* PALETTEINDEX */
{
if
(
(
i
=
color
&
0x0000ffff
)
>=
size
)
if
(
(
i
=
color
&
0x0000ffff
)
>=
size
)
{
{
WARN
(
palette
,
"RGB(%lx) : idx %d is out of bounds, assuming NULL
\n
"
,
color
,
i
);
WARN
(
palette
,
"RGB(%lx) : idx %d is out of bounds, assuming NULL
\n
"
,
color
,
i
);
color
=
*
(
COLORREF
*
)
palPalEntry
;
color
=
*
(
COLORREF
*
)
palPalEntry
;
}
}
else
color
=
*
(
COLORREF
*
)(
palPalEntry
+
i
);
else
color
=
*
(
COLORREF
*
)(
palPalEntry
+
i
);
}
color
&=
0x00ffffff
;
color
&=
0x00ffffff
;
return
(
0x00ffffff
&
*
(
COLORREF
*
)
return
(
0x00ffffff
&
*
(
COLORREF
*
)
...
...
objects/cursoricon.c
View file @
5c3e457b
...
@@ -1774,15 +1774,19 @@ BOOL32 WINAPI DrawIconEx32( HDC32 hdc, INT32 x0, INT32 y0, HICON32 hIcon,
...
@@ -1774,15 +1774,19 @@ BOOL32 WINAPI DrawIconEx32( HDC32 hdc, INT32 x0, INT32 y0, HICON32 hIcon,
/* Calculate the size of the destination image. */
/* Calculate the size of the destination image. */
if
(
cxWidth
==
0
)
if
(
cxWidth
==
0
)
{
if
(
flags
&
DI_DEFAULTSIZE
)
if
(
flags
&
DI_DEFAULTSIZE
)
cxWidth
=
GetSystemMetrics32
(
SM_CXICON
);
cxWidth
=
GetSystemMetrics32
(
SM_CXICON
);
else
else
cxWidth
=
ptr
->
nWidth
;
cxWidth
=
ptr
->
nWidth
;
}
if
(
cyWidth
==
0
)
if
(
cyWidth
==
0
)
{
if
(
flags
&
DI_DEFAULTSIZE
)
if
(
flags
&
DI_DEFAULTSIZE
)
cyWidth
=
GetSystemMetrics32
(
SM_CYICON
);
cyWidth
=
GetSystemMetrics32
(
SM_CYICON
);
else
else
cyWidth
=
ptr
->
nHeight
;
cyWidth
=
ptr
->
nHeight
;
}
if
(
!
(
DoOffscreen
=
(
hbr
>=
STOCK_WHITE_BRUSH
)
&&
(
hbr
<=
if
(
!
(
DoOffscreen
=
(
hbr
>=
STOCK_WHITE_BRUSH
)
&&
(
hbr
<=
STOCK_HOLLOW_BRUSH
)))
STOCK_HOLLOW_BRUSH
)))
...
@@ -1828,20 +1832,24 @@ BOOL32 WINAPI DrawIconEx32( HDC32 hdc, INT32 x0, INT32 y0, HICON32 hIcon,
...
@@ -1828,20 +1832,24 @@ BOOL32 WINAPI DrawIconEx32( HDC32 hdc, INT32 x0, INT32 y0, HICON32 hIcon,
{
{
HBITMAP32
hBitTemp
=
SelectObject32
(
hMemDC
,
hAndBits
);
HBITMAP32
hBitTemp
=
SelectObject32
(
hMemDC
,
hAndBits
);
if
(
flags
&
DI_MASK
)
if
(
flags
&
DI_MASK
)
{
if
(
DoOffscreen
)
if
(
DoOffscreen
)
StretchBlt32
(
hDC_off
,
0
,
0
,
cxWidth
,
cyWidth
,
StretchBlt32
(
hDC_off
,
0
,
0
,
cxWidth
,
cyWidth
,
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCAND
);
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCAND
);
else
else
StretchBlt32
(
hdc
,
x0
,
y0
,
cxWidth
,
cyWidth
,
StretchBlt32
(
hdc
,
x0
,
y0
,
cxWidth
,
cyWidth
,
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCAND
);
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCAND
);
}
SelectObject32
(
hMemDC
,
hXorBits
);
SelectObject32
(
hMemDC
,
hXorBits
);
if
(
flags
&
DI_IMAGE
)
if
(
flags
&
DI_IMAGE
)
{
if
(
DoOffscreen
)
if
(
DoOffscreen
)
StretchBlt32
(
hDC_off
,
0
,
0
,
cxWidth
,
cyWidth
,
StretchBlt32
(
hDC_off
,
0
,
0
,
cxWidth
,
cyWidth
,
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCPAINT
);
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCPAINT
);
else
else
StretchBlt32
(
hdc
,
x0
,
y0
,
cxWidth
,
cyWidth
,
StretchBlt32
(
hdc
,
x0
,
y0
,
cxWidth
,
cyWidth
,
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCPAINT
);
hMemDC
,
0
,
0
,
ptr
->
nWidth
,
ptr
->
nHeight
,
SRCPAINT
);
}
SelectObject32
(
hMemDC
,
hBitTemp
);
SelectObject32
(
hMemDC
,
hBitTemp
);
result
=
TRUE
;
result
=
TRUE
;
}
}
...
...
objects/dib.c
View file @
5c3e457b
...
@@ -2090,10 +2090,12 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
...
@@ -2090,10 +2090,12 @@ HBITMAP32 WINAPI CreateDIBSection32 (HDC32 hdc, BITMAPINFO *bmi, UINT32 usage,
if
(
!
res
||
!
bmp
||
!
dib
||
!
bm
.
bmBits
||
(
bm
.
bmBitsPixel
<=
8
&&
!
colorMap
))
if
(
!
res
||
!
bmp
||
!
dib
||
!
bm
.
bmBits
||
(
bm
.
bmBitsPixel
<=
8
&&
!
colorMap
))
{
{
if
(
bm
.
bmBits
)
if
(
bm
.
bmBits
)
{
if
(
section
)
if
(
section
)
UnmapViewOfFile
(
bm
.
bmBits
),
bm
.
bmBits
=
NULL
;
UnmapViewOfFile
(
bm
.
bmBits
),
bm
.
bmBits
=
NULL
;
else
else
VirtualFree
(
bm
.
bmBits
,
MEM_RELEASE
,
0L
),
bm
.
bmBits
=
NULL
;
VirtualFree
(
bm
.
bmBits
,
MEM_RELEASE
,
0L
),
bm
.
bmBits
=
NULL
;
}
if
(
dib
->
image
)
XDestroyImage
(
dib
->
image
),
dib
->
image
=
NULL
;
if
(
dib
->
image
)
XDestroyImage
(
dib
->
image
),
dib
->
image
=
NULL
;
if
(
colorMap
)
HeapFree
(
GetProcessHeap
(),
0
,
colorMap
),
colorMap
=
NULL
;
if
(
colorMap
)
HeapFree
(
GetProcessHeap
(),
0
,
colorMap
),
colorMap
=
NULL
;
...
@@ -2125,10 +2127,12 @@ void DIB_DeleteDIBSection( BITMAPOBJ *bmp )
...
@@ -2125,10 +2127,12 @@ void DIB_DeleteDIBSection( BITMAPOBJ *bmp )
DIBSECTIONOBJ
*
dib
=
bmp
->
dib
;
DIBSECTIONOBJ
*
dib
=
bmp
->
dib
;
if
(
dib
->
dibSection
.
dsBm
.
bmBits
)
if
(
dib
->
dibSection
.
dsBm
.
bmBits
)
{
if
(
dib
->
dibSection
.
dshSection
)
if
(
dib
->
dibSection
.
dshSection
)
UnmapViewOfFile
(
dib
->
dibSection
.
dsBm
.
bmBits
);
UnmapViewOfFile
(
dib
->
dibSection
.
dsBm
.
bmBits
);
else
else
VirtualFree
(
dib
->
dibSection
.
dsBm
.
bmBits
,
MEM_RELEASE
,
0L
);
VirtualFree
(
dib
->
dibSection
.
dsBm
.
bmBits
,
MEM_RELEASE
,
0L
);
}
if
(
dib
->
image
)
if
(
dib
->
image
)
XDestroyImage
(
dib
->
image
);
XDestroyImage
(
dib
->
image
);
...
...
tools/wrc/dumpres.c
View file @
5c3e457b
...
@@ -224,7 +224,8 @@ void dump_raw_data(raw_data_t *d)
...
@@ -224,7 +224,8 @@ void dump_raw_data(raw_data_t *d)
for
(
n
=
0
;
n
<
d
->
size
;
n
++
)
for
(
n
=
0
;
n
<
d
->
size
;
n
++
)
{
{
if
((
n
%
16
)
==
0
)
if
((
n
%
16
)
==
0
)
{
if
(
n
)
if
(
n
)
{
{
printf
(
"- "
);
printf
(
"- "
);
...
@@ -234,6 +235,7 @@ void dump_raw_data(raw_data_t *d)
...
@@ -234,6 +235,7 @@ void dump_raw_data(raw_data_t *d)
}
}
else
else
printf
(
"%08x: "
,
n
);
printf
(
"%08x: "
,
n
);
}
printf
(
"%02x "
,
d
->
data
[
n
]
&
0xff
);
printf
(
"%02x "
,
d
->
data
[
n
]
&
0xff
);
}
}
printf
(
"- "
);
printf
(
"- "
);
...
...
tools/wrc/parser.l
View file @
5c3e457b
...
@@ -791,10 +791,12 @@ L\" {
...
@@ -791,10 +791,12 @@ L\" {
<<EOF>> {
<<EOF>> {
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
if(!pop_buffer())
if(!pop_buffer())
{
if(YY_START == pp_strips || YY_START == pp_stripp || YY_START == pp_stripp_final)
if(YY_START == pp_strips || YY_START == pp_stripp || YY_START == pp_stripp_final)
yyerror("Unexpected end of file during c-junk scanning (started at %d)", cjunk_tagline);
yyerror("Unexpected end of file during c-junk scanning (started at %d)", cjunk_tagline);
else
else
yyterminate();
yyterminate();
}
yy_delete_buffer(b);
yy_delete_buffer(b);
}
}
%%
%%
...
...
windows/clipboard.c
View file @
5c3e457b
...
@@ -537,6 +537,7 @@ HANDLE32 WINAPI SetClipboardData32( UINT32 wFormat, HANDLE32 hData )
...
@@ -537,6 +537,7 @@ HANDLE32 WINAPI SetClipboardData32( UINT32 wFormat, HANDLE32 hData )
static
BOOL32
CLIPBOARD_RenderFormat
(
LPCLIPFORMAT
lpFormat
)
static
BOOL32
CLIPBOARD_RenderFormat
(
LPCLIPFORMAT
lpFormat
)
{
{
if
(
lpFormat
->
wDataPresent
&&
!
lpFormat
->
hData16
&&
!
lpFormat
->
hData32
)
if
(
lpFormat
->
wDataPresent
&&
!
lpFormat
->
hData16
&&
!
lpFormat
->
hData32
)
{
if
(
IsWindow32
(
hWndClipOwner
)
)
if
(
IsWindow32
(
hWndClipOwner
)
)
SendMessage16
(
hWndClipOwner
,
WM_RENDERFORMAT
,
SendMessage16
(
hWndClipOwner
,
WM_RENDERFORMAT
,
(
WPARAM16
)
lpFormat
->
wFormatID
,
0L
);
(
WPARAM16
)
lpFormat
->
wFormatID
,
0L
);
...
@@ -547,6 +548,7 @@ static BOOL32 CLIPBOARD_RenderFormat(LPCLIPFORMAT lpFormat)
...
@@ -547,6 +548,7 @@ static BOOL32 CLIPBOARD_RenderFormat(LPCLIPFORMAT lpFormat)
hWndClipOwner
=
0
;
lpFormat
->
wDataPresent
=
0
;
hWndClipOwner
=
0
;
lpFormat
->
wDataPresent
=
0
;
return
FALSE
;
return
FALSE
;
}
}
}
return
(
lpFormat
->
hData16
||
lpFormat
->
hData32
)
?
TRUE
:
FALSE
;
return
(
lpFormat
->
hData16
||
lpFormat
->
hData32
)
?
TRUE
:
FALSE
;
}
}
...
@@ -812,10 +814,12 @@ UINT32 WINAPI EnumClipboardFormats32( UINT32 wFormat )
...
@@ -812,10 +814,12 @@ UINT32 WINAPI EnumClipboardFormats32( UINT32 wFormat )
&&
!
selectionAcquired
)
CLIPBOARD_RequestXSelection
();
&&
!
selectionAcquired
)
CLIPBOARD_RequestXSelection
();
if
(
wFormat
==
0
)
if
(
wFormat
==
0
)
{
if
(
lpFormat
->
wDataPresent
||
ClipFormats
[
CF_OEMTEXT
-
1
].
wDataPresent
)
if
(
lpFormat
->
wDataPresent
||
ClipFormats
[
CF_OEMTEXT
-
1
].
wDataPresent
)
return
lpFormat
->
wFormatID
;
return
lpFormat
->
wFormatID
;
else
else
wFormat
=
lpFormat
->
wFormatID
;
/* and CF_TEXT is not available */
wFormat
=
lpFormat
->
wFormatID
;
/* and CF_TEXT is not available */
}
/* walk up to the specified format record */
/* walk up to the specified format record */
...
@@ -1183,6 +1187,7 @@ void CLIPBOARD_ReleaseSelection(Window w, HWND32 hwnd)
...
@@ -1183,6 +1187,7 @@ void CLIPBOARD_ReleaseSelection(Window w, HWND32 hwnd)
(
unsigned
)
w
,
(
unsigned
)
selectionWindow
,
(
unsigned
)
selectionPrevWindow
);
(
unsigned
)
w
,
(
unsigned
)
selectionWindow
,
(
unsigned
)
selectionPrevWindow
);
if
(
selectionAcquired
)
if
(
selectionAcquired
)
{
if
(
w
==
selectionWindow
||
selectionPrevWindow
==
None
)
if
(
w
==
selectionWindow
||
selectionPrevWindow
==
None
)
{
{
/* alright, we really lost it */
/* alright, we really lost it */
...
@@ -1198,6 +1203,7 @@ void CLIPBOARD_ReleaseSelection(Window w, HWND32 hwnd)
...
@@ -1198,6 +1203,7 @@ void CLIPBOARD_ReleaseSelection(Window w, HWND32 hwnd)
if
(
w
==
None
)
if
(
w
==
None
)
TSXSetSelectionOwner
(
display
,
XA_PRIMARY
,
selectionWindow
,
CurrentTime
);
TSXSetSelectionOwner
(
display
,
XA_PRIMARY
,
selectionWindow
,
CurrentTime
);
}
}
}
selectionPrevWindow
=
None
;
selectionPrevWindow
=
None
;
}
}
...
...
windows/mdi.c
View file @
5c3e457b
...
@@ -552,6 +552,7 @@ static LONG MDI_ChildActivate( WND *clientPtr, HWND32 hWndChild )
...
@@ -552,6 +552,7 @@ static LONG MDI_ChildActivate( WND *clientPtr, HWND32 hWndChild )
/* set appearance */
/* set appearance */
if
(
clientInfo
->
hwndChildMaximized
)
if
(
clientInfo
->
hwndChildMaximized
)
{
if
(
clientInfo
->
hwndChildMaximized
!=
hWndChild
)
if
(
clientInfo
->
hwndChildMaximized
!=
hWndChild
)
if
(
hWndChild
)
if
(
hWndChild
)
{
{
...
@@ -560,6 +561,7 @@ static LONG MDI_ChildActivate( WND *clientPtr, HWND32 hWndChild )
...
@@ -560,6 +561,7 @@ static LONG MDI_ChildActivate( WND *clientPtr, HWND32 hWndChild )
}
}
else
else
ShowWindow32
(
clientInfo
->
hwndActiveChild
,
SW_SHOWNORMAL
);
ShowWindow32
(
clientInfo
->
hwndActiveChild
,
SW_SHOWNORMAL
);
}
clientInfo
->
hwndActiveChild
=
hWndChild
;
clientInfo
->
hwndActiveChild
=
hWndChild
;
...
...
windows/message.c
View file @
5c3e457b
...
@@ -504,6 +504,7 @@ static BOOL32 MSG_PeekHardwareMsg( MSG16 *msg, HWND16 hwnd, DWORD filter,
...
@@ -504,6 +504,7 @@ static BOOL32 MSG_PeekHardwareMsg( MSG16 *msg, HWND16 hwnd, DWORD filter,
case
SYSQ_MSG_SKIP
:
case
SYSQ_MSG_SKIP
:
if
(
HOOK_IsHooked
(
WH_CBT
))
if
(
HOOK_IsHooked
(
WH_CBT
))
{
if
(
kbd_msg
)
if
(
kbd_msg
)
HOOK_CallHooks16
(
WH_CBT
,
HCBT_KEYSKIPPED
,
HOOK_CallHooks16
(
WH_CBT
,
HCBT_KEYSKIPPED
,
msg
->
wParam
,
msg
->
lParam
);
msg
->
wParam
,
msg
->
lParam
);
...
@@ -521,6 +522,7 @@ static BOOL32 MSG_PeekHardwareMsg( MSG16 *msg, HWND16 hwnd, DWORD filter,
...
@@ -521,6 +522,7 @@ static BOOL32 MSG_PeekHardwareMsg( MSG16 *msg, HWND16 hwnd, DWORD filter,
SEGPTR_FREE
(
hook
);
SEGPTR_FREE
(
hook
);
}
}
}
}
}
if
(
remove
)
if
(
remove
)
QUEUE_RemoveMsg
(
sysMsgQueue
,
pos
);
QUEUE_RemoveMsg
(
sysMsgQueue
,
pos
);
...
...
windows/nonclient.c
View file @
5c3e457b
...
@@ -164,10 +164,12 @@ NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL32 menu, DWORD exStyle)
...
@@ -164,10 +164,12 @@ NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL32 menu, DWORD exStyle)
}
}
if
((
style
&
WS_CAPTION
)
==
WS_CAPTION
)
if
((
style
&
WS_CAPTION
)
==
WS_CAPTION
)
{
if
(
exStyle
&
WS_EX_TOOLWINDOW
)
if
(
exStyle
&
WS_EX_TOOLWINDOW
)
rect
->
top
-=
SYSMETRICS_CYSMCAPTION
;
rect
->
top
-=
SYSMETRICS_CYSMCAPTION
;
else
else
rect
->
top
-=
SYSMETRICS_CYCAPTION
;
rect
->
top
-=
SYSMETRICS_CYCAPTION
;
}
}
}
if
(
menu
)
if
(
menu
)
...
...
windows/painting.c
View file @
5c3e457b
...
@@ -230,10 +230,12 @@ void WINAPI PaintRect( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
...
@@ -230,10 +230,12 @@ void WINAPI PaintRect( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
HBRUSH16
hbrush
,
const
RECT16
*
rect
)
HBRUSH16
hbrush
,
const
RECT16
*
rect
)
{
{
if
(
hbrush
<=
CTLCOLOR_MAX
)
if
(
hbrush
<=
CTLCOLOR_MAX
)
{
if
(
hwndParent
)
if
(
hwndParent
)
hbrush
=
PAINT_GetControlBrush
(
hwndParent
,
hwnd
,
hdc
,
(
UINT16
)
hbrush
);
hbrush
=
PAINT_GetControlBrush
(
hwndParent
,
hwnd
,
hdc
,
(
UINT16
)
hbrush
);
else
else
return
;
return
;
}
if
(
hbrush
)
if
(
hbrush
)
FillRect16
(
hdc
,
rect
,
hbrush
);
FillRect16
(
hdc
,
rect
,
hbrush
);
}
}
...
...
windows/winhelp.c
View file @
5c3e457b
...
@@ -53,10 +53,12 @@ BOOL32 WINAPI WinHelp32A( HWND32 hWnd, LPCSTR lpHelpFile, UINT32 wCommand,
...
@@ -53,10 +53,12 @@ BOOL32 WINAPI WinHelp32A( HWND32 hWnd, LPCSTR lpHelpFile, UINT32 wCommand,
hDest
=
FindWindow32A
(
"MS_WINHELP"
,
NULL
);
hDest
=
FindWindow32A
(
"MS_WINHELP"
,
NULL
);
if
(
!
hDest
)
if
(
!
hDest
)
{
if
(
wCommand
==
HELP_QUIT
)
if
(
wCommand
==
HELP_QUIT
)
return
TRUE
;
return
TRUE
;
else
else
return
FALSE
;
return
FALSE
;
}
switch
(
wCommand
)
switch
(
wCommand
)
{
{
case
HELP_CONTEXT
:
case
HELP_CONTEXT
:
...
...
windows/winpos.c
View file @
5c3e457b
...
@@ -2188,11 +2188,13 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
...
@@ -2188,11 +2188,13 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
}
}
}
}
else
if
(
!
(
wndPtr
->
window
))
else
if
(
!
(
wndPtr
->
window
))
{
/* FIXME: the following optimization is no good for "X-ed" windows */
/* FIXME: the following optimization is no good for "X-ed" windows */
if
(
hwndInsertAfter
==
HWND_TOP
)
if
(
hwndInsertAfter
==
HWND_TOP
)
flags
|=
(
wndPtr
->
parent
->
child
==
wndPtr
)
?
SWP_NOZORDER
:
0
;
flags
|=
(
wndPtr
->
parent
->
child
==
wndPtr
)
?
SWP_NOZORDER
:
0
;
else
/* HWND_BOTTOM */
else
/* HWND_BOTTOM */
flags
|=
(
wndPtr
->
next
)
?
0
:
SWP_NOZORDER
;
flags
|=
(
wndPtr
->
next
)
?
0
:
SWP_NOZORDER
;
}
/* Fill the WINDOWPOS structure */
/* Fill the WINDOWPOS structure */
...
@@ -2320,6 +2322,7 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
...
@@ -2320,6 +2322,7 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
wndPtr
->
rectClient
=
newClientRect
;
wndPtr
->
rectClient
=
newClientRect
;
if
(
!
(
flags
&
(
SWP_SHOWWINDOW
|
SWP_HIDEWINDOW
))
)
if
(
!
(
flags
&
(
SWP_SHOWWINDOW
|
SWP_HIDEWINDOW
))
)
{
if
(
(
oldClientRect
.
left
-
oldWindowRect
.
left
!=
if
(
(
oldClientRect
.
left
-
oldWindowRect
.
left
!=
newClientRect
.
left
-
newWindowRect
.
left
)
||
newClientRect
.
left
-
newWindowRect
.
left
)
||
(
oldClientRect
.
top
-
oldWindowRect
.
top
!=
(
oldClientRect
.
top
-
oldWindowRect
.
top
!=
...
@@ -2362,6 +2365,7 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
...
@@ -2362,6 +2365,7 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
if
(
!
wErase
)
/* just update the nonclient area */
if
(
!
wErase
)
/* just update the nonclient area */
wndPtr
->
flags
|=
WIN_NEEDS_NCPAINT
;
wndPtr
->
flags
|=
WIN_NEEDS_NCPAINT
;
}
}
}
uFlags
|=
SMC_NOPARENTERASE
;
/* X windows do not have eraseable parents */
uFlags
|=
SMC_NOPARENTERASE
;
/* X windows do not have eraseable parents */
}
}
else
/* not an X window */
else
/* not an X window */
...
...
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