Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
5733ed76
Commit
5733ed76
authored
26 years ago
by
Juergen Schmied
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Small changes (uses HIWORD/LOWORD).
parent
84b358dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/ver.c
+23
-18
23 additions, 18 deletions
misc/ver.c
with
23 additions
and
18 deletions
misc/ver.c
+
23
−
18
View file @
5733ed76
...
...
@@ -71,10 +71,12 @@ static void print_vffi_debug(VS_FIXEDFILEINFO *vffi)
{
dbg_decl_str
(
ver
,
1024
);
TRACE
(
ver
,
" structversion=0x%lx.0x%lx, fileversion=0x%lx.0x%lx, productversion=0x%lx.0x%lx, flagmask=0x%lx, flags=%s%s%s%s%s%s
\n
"
,
(
vffi
->
dwStrucVersion
>>
16
),
vffi
->
dwStrucVersion
&
0xFFFF
,
vffi
->
dwFileVersionMS
,
vffi
->
dwFileVersionLS
,
vffi
->
dwProductVersionMS
,
vffi
->
dwProductVersionLS
,
TRACE
(
ver
,
" structversion=%u.%u, fileversion=%u.%u.%u.%u, productversion=%u.%u.%u.%u, flagmask=0x%lx, flags=%s%s%s%s%s%s
\n
"
,
HIWORD
(
vffi
->
dwStrucVersion
),
LOWORD
(
vffi
->
dwStrucVersion
),
HIWORD
(
vffi
->
dwFileVersionMS
),
LOWORD
(
vffi
->
dwFileVersionMS
),
HIWORD
(
vffi
->
dwFileVersionLS
),
LOWORD
(
vffi
->
dwFileVersionLS
),
HIWORD
(
vffi
->
dwProductVersionMS
),
LOWORD
(
vffi
->
dwProductVersionMS
),
HIWORD
(
vffi
->
dwProductVersionLS
),
LOWORD
(
vffi
->
dwProductVersionLS
),
vffi
->
dwFileFlagsMask
,
(
vffi
->
dwFileFlags
&
VS_FF_DEBUG
)
?
"DEBUG,"
:
""
,
(
vffi
->
dwFileFlags
&
VS_FF_PRERELEASE
)
?
"PRERELEASE,"
:
""
,
...
...
@@ -84,9 +86,9 @@ static void print_vffi_debug(VS_FIXEDFILEINFO *vffi)
(
vffi
->
dwFileFlags
&
VS_FF_SPECIALBUILD
)
?
"SPECIALBUILD,"
:
""
);
dsprintf
(
ver
,
" OS=0x%
l
x.0x%
l
x "
,
(
vffi
->
dwFileOS
&
0xFFFF0000
)
>>
16
,
vffi
->
dwFileOS
&
0x0000FFFF
dsprintf
(
ver
,
" OS=0x%x.0x%x "
,
HIWORD
(
vffi
->
dwFileOS
)
,
LOWORD
(
vffi
->
dwFileOS
)
);
switch
(
vffi
->
dwFileOS
&
0xFFFF0000
)
{
case
VOS_DOS
:
dsprintf
(
ver
,
"DOS,"
);
break
;
...
...
@@ -97,13 +99,13 @@ static void print_vffi_debug(VS_FIXEDFILEINFO *vffi)
default:
dsprintf
(
ver
,
"UNKNOWN(0x%lx),"
,
vffi
->
dwFileOS
&
0xFFFF0000
);
break
;
}
switch
(
vffi
->
dwFileOS
&
0xFFFF
)
{
switch
(
LOWORD
(
vffi
->
dwFileOS
)
)
{
case
VOS__BASE
:
dsprintf
(
ver
,
"BASE"
);
break
;
case
VOS__WINDOWS16
:
dsprintf
(
ver
,
"WIN16"
);
break
;
case
VOS__WINDOWS32
:
dsprintf
(
ver
,
"WIN32"
);
break
;
case
VOS__PM16
:
dsprintf
(
ver
,
"PM16"
);
break
;
case
VOS__PM32
:
dsprintf
(
ver
,
"PM32"
);
break
;
default:
dsprintf
(
ver
,
"UNKNOWN(0x%
l
x)"
,
vffi
->
dwFileOS
&
0xFFFF
);
break
;
default:
dsprintf
(
ver
,
"UNKNOWN(0x%x)"
,
LOWORD
(
vffi
->
dwFileOS
)
);
break
;
}
TRACE
(
ver
,
"(%s)
\n
"
,
dbg_str
(
ver
));
...
...
@@ -444,7 +446,7 @@ find_pe_resource(
pehdoffset
=
LZTELL
(
lzfd
);
LZREAD
(
&
pehd
);
resdir
=
pehd
.
OptionalHeader
.
DataDirectory
[
IMAGE_FILE_RESOURCE_DIRECTORY
];
TRACE
(
ver
,
"(.,
%p,%p,....
)
\n
"
,
typeid
,
resid
);
TRACE
(
ver
,
"(.,
type=%p, id=%p, len=%u, off=%lu
)
\n
"
,
typeid
,
resid
,
*
reslen
,
*
off
);
if
(
!
resdir
.
Size
)
{
WARN
(
ver
,
"No resource directory found in PE file.
\n
"
);
return
0
;
...
...
@@ -515,6 +517,7 @@ find_pe_resource(
}
HeapFree
(
GetProcessHeap
(),
0
,
image
);
HeapFree
(
GetProcessHeap
(),
0
,
sections
);
TRACE
(
ver
,
"-- found at off=%lu
\n
"
,
*
off
);
return
1
;
}
...
...
@@ -528,7 +531,7 @@ DWORD WINAPI GetFileResourceSize(LPCSTR filename,SEGPTR restype,SEGPTR resid,
int
reslen
=
0
;
int
res
=
0
;
TRACE
(
ver
,
"(%s,
%lx,%lx,
%p)
\n
"
,
TRACE
(
ver
,
"(%s,
type=0x%lx,id=0x%lx,off=
%p)
\n
"
,
filename
,(
LONG
)
restype
,(
LONG
)
resid
,
off
);
lzfd
=
LZOpenFile32A
(
filename
,
&
ofs
,
OF_READ
);
...
...
@@ -565,7 +568,7 @@ DWORD WINAPI GetFileResource(LPCSTR filename,SEGPTR restype,SEGPTR resid,
int
res
=
0
;
int
reslen
=
datalen
;
TRACE
(
ver
,
"(%s,
%lx,%lx,%ld,%ld,
%p)
\n
"
,
TRACE
(
ver
,
"(%s,
type=0x%lx,id=0x%lx,off=%ld,len=%ld,date=
%p)
\n
"
,
filename
,(
LONG
)
restype
,(
LONG
)
resid
,
off
,
datalen
,
data
);
...
...
@@ -589,11 +592,13 @@ DWORD WINAPI GetFileResource(LPCSTR filename,SEGPTR restype,SEGPTR resid,
if
(
reslen
>
datalen
)
reslen
=
datalen
;
memcpy
(
data
,
resdata
,
reslen
);
free
(
resdata
);
TRACE
(
ver
,
"--[1] len=%u
\n
"
,
reslen
);
return
reslen
;
}
LZSeek32
(
lzfd
,
off
,
SEEK_SET
);
reslen
=
LZRead32
(
lzfd
,
data
,
datalen
);
LZClose32
(
lzfd
);
TRACE
(
ver
,
"--[2] len=%u
\n
"
,
reslen
);
return
reslen
;
}
...
...
@@ -656,12 +661,12 @@ DWORD WINAPI GetFileVersionInfoSize32W( LPCWSTR filename, LPDWORD handle )
DWORD
WINAPI
GetFileVersionInfo16
(
LPCSTR
filename
,
DWORD
handle
,
DWORD
datasize
,
LPVOID
data
)
{
TRACE
(
ver
,
"(%s,%ld,
%ld,
%p)
\n
"
,
filename
,
handle
,
datasize
,
data
);
return
GetFileResource
(
filename
,
VS_FILE_INFO
,
VS_VERSION_INFO
,
handle
,
datasize
,
data
);
TRACE
(
ver
,
"(%s,%ld,
size=%ld,data=
%p)
\n
"
,
filename
,
handle
,
datasize
,
data
);
return
GetFileResource
(
filename
,
VS_FILE_INFO
,
VS_VERSION_INFO
,
handle
,
datasize
,
data
);
}
/* GetFileVersionInfoA [VERSION.0] */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment