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
505fadc8
Commit
505fadc8
authored
Jan 08, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Jan 08, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed GUI junk from expand.c, so you can use it in commandline mode.
Fixed hello5.c.
parent
3e1be267
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
47 deletions
+12
-47
expand.c
libtest/expand.c
+11
-46
hello5.c
libtest/hello5.c
+1
-1
No files found.
libtest/expand.c
View file @
505fadc8
...
...
@@ -10,7 +10,7 @@ int PASCAL WinMain(HINSTANCE hinstCurrent,
int
nCmdShow
)
{
OFSTRUCT
SourceOpenStruct1
,
SourceOpenStruct2
;
char
OriginalName
[
256
]
,
WriteBuf
[
256
]
;
char
OriginalName
[
256
];
char
FAR
*
lpzDestFile
;
DWORD
dwreturn
;
HFILE
hSourceFile
,
hDestFile
;
...
...
@@ -18,54 +18,19 @@ int PASCAL WinMain(HINSTANCE hinstCurrent,
extern
int
_ARGC
;
extern
char
**
_ARGV
;
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
_ARGV
[
1
],
(
LPCSTR
)
"_ARGV[1]:"
,
MB_OK
);
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
_ARGV
[
2
],
(
LPCSTR
)
"_ARGV[2]:"
,
MB_OK
);
hSourceFile
=
LZOpenFile
(
_ARGV
[
1
],
(
LPOFSTRUCT
)
&
SourceOpenStruct1
,
OF_READ
);
wsprintf
(
WriteBuf
,
"Source File Handle: %d
\n
No. of args: %d"
,
hSourceFile
,
_ARGC
);
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
WriteBuf
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
((
_ARGC
==
3
)
&&
(
_ARGV
[
2
]
!=
NULL
))
lpzDestFile
=
_ARGV
[
2
];
else
{
lpzDestFile
=
OriginalName
;
GetExpandedName
(
_ARGV
[
1
],
lpzDestFile
);
hSourceFile
=
LZOpenFile
(
_ARGV
[
1
],
(
LPOFSTRUCT
)
&
SourceOpenStruct1
,
OF_READ
);
if
((
_ARGC
==
3
)
&&
(
_ARGV
[
2
]
!=
NULL
))
lpzDestFile
=
_ARGV
[
2
];
else
{
lpzDestFile
=
OriginalName
;
GetExpandedName
(
_ARGV
[
1
],
lpzDestFile
);
};
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
lpzDestFile
,
(
LPCSTR
)
"Destination File"
,
MB_OK
);
hDestFile
=
LZOpenFile
(
lpzDestFile
,
(
LPOFSTRUCT
)
&
SourceOpenStruct2
,
OF_CREATE
|
OF_WRITE
);
wsprintf
(
WriteBuf
,
"Destination File Handle: %d
\n
No. of args: %d"
,
hDestFile
,
_ARGC
-
1
);
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
WriteBuf
,
(
LPCSTR
)
NULL
,
MB_OK
);
dwreturn
=
LZCopy
(
hSourceFile
,
hDestFile
);
if
(
dwreturn
==
LZERROR_BADINHANDLE
)
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
"LZERROR_BADINHANDLE
\n
"
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
(
dwreturn
==
LZERROR_BADOUTHANDLE
)
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
"LZERROR_BADOUTHANDLE
\n
"
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
(
dwreturn
==
LZERROR_BADVALUE
)
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
"LZERROR_BADVALUE
\n
"
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
(
dwreturn
==
LZERROR_GLOBALLOC
)
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
"LZERROR_GLOBALLOC
\n
"
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
(
dwreturn
==
LZERROR_GLOBLOCK
)
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
"LZERROR_GLOBLOCK
\n
"
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
(
dwreturn
==
LZERROR_READ
)
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
"LZERROR_READ
\n
"
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
(
dwreturn
==
LZERROR_WRITE
)
MessageBox
((
HWND
)
NULL
,
(
LPCSTR
)
"LZERROR_WRITE
\n
"
,
(
LPCSTR
)
NULL
,
MB_OK
);
if
((
long
)
dwreturn
>
0L
)
{
wsprintf
((
LPSTR
)
WriteBuf
,
(
LPCSTR
)
"Successful decompression from %s to %s
\n
"
,
_ARGV
[
1
],
lpzDestFile
);
MessageBox
((
HWND
)
NULL
,
(
LPSTR
)
WriteBuf
,
(
LPCSTR
)
NULL
,
MB_OK
);
};
LZClose
(
hSourceFile
);
LZClose
(
hDestFile
);
if
(
dwreturn
!=
0
)
fprintf
(
stderr
,
"LZCopy failed: return is %ld
\n
"
,
dwreturn
);
LZClose
(
hSourceFile
);
LZClose
(
hDestFile
);
return
dwreturn
;
}
libtest/hello5.c
View file @
505fadc8
...
...
@@ -22,7 +22,7 @@ int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show)
}
fnGetSystemInfo
(
&
si
);
fprintf
(
stderr
,
"QuerySystemInfo returns:
\n
"
);
fprintf
(
stderr
,
" wProcessorArchitecture: %d
\n
"
,
si
.
u
.
x
.
wProcessorArchitecture
);
fprintf
(
stderr
,
" wProcessorArchitecture: %d
\n
"
,
si
.
u
.
s
.
wProcessorArchitecture
);
fprintf
(
stderr
,
" dwPageSize: %ld
\n
"
,
si
.
dwPageSize
);
fprintf
(
stderr
,
" lpMinimumApplicationAddress: %p
\n
"
,
si
.
lpMinimumApplicationAddress
);
fprintf
(
stderr
,
" lpMaximumApplicationAddress: %p
\n
"
,
si
.
lpMaximumApplicationAddress
);
...
...
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