| int PASCAL WinMain(HINSTANCE hinstCurrent, |
| OFSTRUCT SourceOpenStruct1, SourceOpenStruct2; |
| HFILE hSourceFile, hDestFile; |
| /* Most Windows compilers have something like this: */ |
| hSourceFile = LZOpenFile(_ARGV[1], (LPOFSTRUCT) &SourceOpenStruct1, OF_READ); |
| if ((_ARGC == 3) && (_ARGV[2] != NULL)) |
| lpzDestFile = OriginalName; |
| GetExpandedName(_ARGV[1], lpzDestFile); |
| hDestFile = LZOpenFile(lpzDestFile, (LPOFSTRUCT) &SourceOpenStruct2, |
| dwreturn = LZCopy(hSourceFile, hDestFile); |
| fprintf(stderr,"LZCopy failed: return is %ld\n",dwreturn); |