Files supplied in this .ZIP file : (be sure to read further for info...) ARMOD.ARH - Modified AR DOS archiver (LHARC compatible) WAR.EXE Windows ARchiver executable module WAR.PRJ Borland C/C++ 3.1 project file WAR.DSK Borland C/C++ 3.1 IDE desktop file WAR.OBJ Compiled module WAR.C Windows ARchiver C source MAKETREE.C AR sub-module source AR.H AR C header file AR.PRJ Borland C/C++ 3.1 project file AR.C ARchiver C source IO.C AR sub-module source ENCODE.C AR sub-module source DECODE.C AR sub-module source MAKETBL.C AR sub-module source HUF.C AR sub-module source AR.CHG Log of changes to original AR source code WAR.ARH - C-language Windows Archiver; used by WLIB (not for independent launch) WAR.EXE Windows executable WAR.PRJ Borland C/C++ 3.1 project file WAR.DSK Borland C/C++ 3.1 IDE desktop file WAR.OBJ Compiled module WAR.C C-language source file WLIB.ARH - Archive Manager for Windows can launch WAR, ZIP, ARC, and LHARC! Complete with Windows Help app. ARC001.BMP Windows BMP file ARC002.BMP Windows BMP file ARC003.BMP Windows BMP file ARC004.BMP Windows BMP file ARC005.BMP Windows BMP file ARC006.BMP Windows BMP file ARC007.BMP Windows BMP file ARCMAN.HLP Windows Help file ARCMAN.HPJ Windows help compiler project file ARCMAN.RTF Help file source: Word 2.0 Rich Text Format file WLIB.H C-language header file WLIB.C C-language source file WLIB.RC Windows Resource Script WLIB.RWS Borland C/C++ Resource Workshop file WLIB.PRJ Borland C/C++ 3.1 project file WLIB.RES Binary (compiled) Windows resource file WLIB.DSK Borland C/C++ 3.1 IDE desktop file WLIB.OBJ Compiled module WLIB.DEF Windows module DEFinition file WLIB.EXE WLIB main app - Windows executable EDPATH.DLG Windows DIALOG definition EDPATH.H C-language header file EDLIB.H C-language header file EDLIB.DLG Windows DIALOG definition EDSPEC.H C-language header file EDSPEC.DLG Windows DIALOG definition EDOPTS.H C-language header file EDOPTS.DLG Windows DIALOG definition ------------------------------------------------------------------- USING THE AR UTILITY PROGRAM ------------------------------------------------------------------- AR is a freeware compression archive utility written by Haruhiko Okumura. Mr. Okumura has graciously provided the program with all of its source code free to whomever wishes to use it. AR does not sport the fastest compression times of all available utilities, but it does provide adequate compression speeds, plus two other notable features. First, AR uses the same primary compression technique as LHARC. Thus it produces some of the best compression ratios available. AR libraries can also be manipulated directly by LHARC (at least by LHARC 2.10 and 2.11, which we tested). Second, extraction and decompression of stored files is explosively fast -- just what the doctor ordered when you want to get back at stored files. The AR software is free, and you may do with it what you will. However, we would like to suggest that you observe the following when redistrib- uting the program: ... Always leave the credit to Mr. Okumura in the help blurb. He has placed no restrictions on what you may do with the code, but courtesy indicates that it should be identified as his program. As you may know, there has in the past been a considerable flap over who owns what rights to various compression algorithms and programs -- the whole affair was a prime display of greed and selfish grasping. As far as we know, only LHARC and Mr. Okumura's AR are FREE and highly functional as well. When using either of these utilities, please observe carefully all requests to leave credit statements in place. ... The author has packaged a modified version of AR on these sample diskettes in the library ARMOD.ARH. There is a change log text files in this library. We suggest that you note any modifications you make in this log before redistributing the file, out of the same considerations of courtesy already mentioned. Getting instructions for running the AR compression archive utility is very simple. Just run AR with no command tail parameters. The following help text will appear on the screen. ar -- compression archiver -- written by Haruhiko Okumura PC-VAN:SCIENCE CompuServe:74050,1022 NIFTY-Serve:PAF01022 INTERNET:74050.1022@compuserve.com See file AR.CHG for mod history. Usage: ar a|r|x|d|p|l archive [file ...] or: ar a|r|x|d|p|l archive wildarg Commands: a: Add files to archive (replace if present) x: Extract files from archive r: Replace file if present d: Delete files from archive p: Print files on standard output l: List contents of archive If no files are named, all files in archive are processed, except for commands 'a' and 'd'. You may copy, distribute, and rewrite this program freely. One of the modifications we have made to the original AR code is to provide a default library file extension of ARH. You do not have to specify this extension on the archive library name. You can specify it if you wish, however, and you can also override the extension and make it any value you wish -- but you will have to supply the override every time you use the library. ------------------------------------------------------------------- ---- GENERAL NOTES ON AR COMMAND SYNTAX AND USAGE ---- ------------------------------------------------------------------- Following the AR command itself, the operation command appears. As shown above, you can add, extract, replace, delete, or print files, and you can list the contents of the library. The ADD command will either add a file or files as new members in the library, or replace them if they already exist. The REPLACE command will only replace a member if it already exists. The next parameter is the archive library file name. We have modified the program so that a default extension of .ARH is appended to the file name if you do not supply one. If you do specify an archive file extension, it will be left intact -- ARH is not a required extension, just a convenient one. After the archive name, many of the library operations will expect to see a file specification or a file list. What kind of specification can be coded here depends on the particular operation. A (ADD) -- If you specify no files at all, a usage error results, and the help text blurb will be displayed on the screen. If you specify a list of files (separated by blanks) then just those files will be added to the archive. If you specify a file template (using wildcard characters), then all matching files in the specified directory (or default directory if no path is given) will be added to the archive. In any case, if a file name matches the file specification, and it already exists in the archive, the archive member will be replaced. NOTE that if you specify a path in the file name list or template, the path information WILL be stored in the archive directory. Later extraction will therefore require that you specify that same path information to access the member, and the member will be extracted into the original directory. R (REPLACE) -- If you specify no files at all, all the files already in the archive are replaced with copies from the current working directory. Files matching a file list or file template will also be replaced, but files not already in the archive will not be added new by the REPLACE command. X (EXTRACT) -- If you specify no files at all, all the files in the archive are extracted into the current working directory (or the original directory, if the path info was stored). Files matching a file list or file template will also be extracted into the current working directory (or the directory stored with the member). D (DELETE) -- Specifying no file, file list, or file template will result in a usage error. All files exactly matching a file list entry or file template (match must include stored path info) will be deleted from the archive. P (PRINT) -- You may provide a file list, file template, or omit any file specification to print all archive members. NOTE however that if you inadvertently select a non-printable file (such as an EXE file) an error will result an the operation is aborted. Output from the PRINT command normally goes to the STDPRN device, so you may redirect output to the screen by adding >CON to the end of the command. L (LIST) -- The list command requires no file specification. All the files in the archive and their statistics are listed on STDOUT. ------------------------------------------------------------------- RUNNING THE WINDOWS LIBRARIAN (WLIB) ------------------------------------------------------------------- WLIB, the Windows Librarian, is a true Windows application that lets you run either the AR compression librarian mentioned earlier, or one of the following popular archivers: LHARC, PKZIP/PKUNZIP, and ARC. That is, WLIB itself is only an archiver launcher: you can specify the archive program and its command tail options using WLIB's GUI interface, and then launch the archive program. WLIB launches DOS tasks for LHARC, PKZIP/PKUNZIP, and ARC. These DOS tasks run, and then return to WLIB immediately upon completion. The version of AR that is used by WLIB, however, is a special WINDOWS version named WAR. WAR spools its output messages to a true Windows window, which persists until you close it. This permits you to inspect the output messages at your leisure. Note that neither WLIB nor WAR are PDOXWIN applications: they are simply provided as a convenience and "bonus value" on the sample diskettes. WLIB is a C language Windows application which has some features of interest to those who would like to develop Windows applications. WLIB is a standard Windows application, so you can include it as a program item in your Windows applications group under Program Manager. WLIB has its own Windows help file, which includes complete hypertext instructions for using it properly. Detailed instructions are accordingly not included here. -------------------------------------------------------------------------- NOTES ON COMPILING AR.C AND WAR.C ------------------------------------------------------------------- Compiling the DOS Version of AR.C -------------------------------------------------------------------------- AR originally assumed the use of the COMPACT memory model, and this version accepted that assumption. Set up the IDE for this memory model, and create a project file containing the following files: AR.C IO.C ENCODE.C DECODE.C MAKETREE.C MAKETBL.C HUF.C WILDARGS.OBJ ***NOTE that WILDARGS.OBJ is the Borland-supplied wildcard argument handler module; it is not distributed on this diskette. -------------------------------------------------------------------------- Compiling the Windows Version of AR.C -- WAR.C -------------------------------------------------------------------------- WAR is the Windows version of AR. It was developed using the simple expedient of invoking Turbo C++ for Windows' EasyWin feature: just compile a standard DOS program as a Windows EXE file, and Turbo C++ for Windows automatically links all the required library modules. You only need to remember a couple of things to create an EasyWin application: > You must include one of the three headers stdio.h, io.h, or stream.h at the beginning of your program to pull in the header for EasyWin. > Screen I/O for the program should all be through standard C streams: stdin, stdout, stderr, stdaux, stdprn. EasyWin traps I/O calls for these standard streams, but cannot deal with direct screen I/O (such as clrscr(), gotoxy(), etc.). WAR was compiled with the COMPACT model, just as the DOS version was. There are two significant differences between WAR and AR, however: > WAR (as presently structured) does not support wildcard file specifications, because of the Windows environment in which it runs. In particular, linking WILDARGS.OBJ will cause the application to fail, and possibly crash Windows as well. Include only the following files in the project for WAR: WAR.C IO.C ENCODE.C DECODE.C MAKETREE.C MAKETBL.C HUF.C > A slight change in the archive file open logic was necessary for the Windows version. Specifically, logic was added to create new library files immediately if the first open for read access fails. Then the later remove() and rename() function calls won't fail and blow up Windows. In its current state, WAR is intended to be launched by the WLIB archive manager Windows application. This is because WAR expects a list of files to work with, and that's rather difficult to provide flexibly from Window's Program Manager. WLIB builds the WAR command line dynamically and then launches the application.