ZipV - Bit Masons Zip Viewer 1.21 Copyright 1990 by Gordon Haff and Bit Masons Consulting. All rights reserved. Command: ZV Purpose: Provides a scrollable environment for selecting files contained within a ZIP file and viewing or extracting their contents Syntax: ZV [d:][\path\]filename.ZIP Commands: views files or extracts files Prereqs: 100% IBM Compatible PC running DOS 2.1 or higher Archive Name: ZIPV120.ZIP Associated Programs: In its default configuration, ZV REQUIRES Vern Buerg's LIST file viewing program and Phil Katz's PKUNZIP program. LIST and PKUNZIP are Shareware and require separate registration with their authors. While ZV can be operated from the DOS command line using the format described above, it is most conveniently called as a user-defined shell command (or SmartViewer in DF 4.0 and later) from within the author's Directory Freedom (DF) program. Other: Your COMSPEC variable must be set. See Section 2.1. ÚÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÁÄÄÄ¿ ³ (tm) Äij ³o ³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³ ÚÄÄÄÄÄÁÐÄÄ¿ ³ Association of ³ ³ ³ÄÙ Shareware ÀÄÄij o ³ Professionals ÄÄÄÄÄij º ³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÀÄÄÄÄÐÄÄÄÄÙ MEMBER ZV 1.21 2 DISCLAIMER The author hereby disclaims all warranties relating to this product, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose. The author cannot and will not be liable for any special, incidental, consequential, indirect or similar damages due to loss of data or any other reason, even if the author or an authorized agent has been advised of the possibility of such damages. In no event shall the liability for any damages ever exceed the price paid for the license to use the software, regardless of the form and/or extent of the claim. The user of this program bears all risk as to the quality and performance of the software. LICENSE ZV is distributed as free, copyrighted software. What this means is that you can use this program for as long as you like without cost or obligation. What you cannot do is to sell this software or make a profit off of it (except as described below) without the express written permission of the author. ZV is the sole property of Gordon Haff. The program may be freely copied and transferred to individual parties. It may be posted on Bulletin Board systems (BBS) for electronic access as long as NO FEE is charged for its distribution except for private BBS operations that charge a regular user subscription fee. Computer information services such as Compuserve (CIS), Genie, and Byte Information Exchange (BIX) are authorized to post this product for subscriber access. ZV may be distributed on diskette only by 1) disk distributors/vendors who are associate members of the Association of Shareware Professionals (ASP) or 2) users groups which do not charge more than a nominal fee ($5) to cover the costs of distribution. Any changes to these policies must be made in writing by the author. This program is produced by a member of the Association of Shareware Professionals (ASP). ASP wants to make sure that the shareware principle works for you. If you are unable to resolve a shareware-related problem with an ASP member by contacting the member directly, ASP may be able to help. The ASP Ombudsman can help you resolve a dispute or problem with an ASP member, but does not provide technical support for members' products. Please write to the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006 or send a Compuserve message via easyplex to ASP Ombudsman 70007,3536. ZV 1.21 3 TECHNICAL SUPPORT Since this program is a freebie, unlike the shareware programs for which I request a registration fee, I'm not going to make any guarantees here with respect to bug fixes or other technical support. Having said that, I do like my programs to be as bug-free as possible, so feel free to report any problems which you run across. Contact via: Channel 1 BBS (617) 354-8873 Compuserve User ID# 72561,2637 (See Note 1) InterNet/ARPANET 72561.2637@compuserve.com U.S. Mail 3205 Windsor Ridge Dr. Westboro MA 01581 Telephone (508) 898-3321 (after 6pm Eastern time) The above are roughly in order of preference (i.e. how quickly I'm likely to see your message and be able to respond). I check Channel One almost daily and the other electronic services at least weekly in most cases. In addition, I monitor the Interlink and the PCRelay Shareware relays through Channel One. Note 1: When contacting me via Compuserve, please use the Easyplex mail system since I do not regularly monitor any of the IBM SIG message bases. ZV 1.21 4 1.0 Why and Whence ZV? ----------------------- The main reason that I wrote ZV is the following: I have a shareware file management program called Directory Freedom which is small and fast in spite of having more wonderful and exciting features than I could possibly describe here (Plug #1). Yet, there was still one thing which I continually ended up having to exit DF to do -- namely, to view the contents of files contained within ZIP files. This annoyed me. I looked high and low for a program which I could call with DF's nifty user-defined shell function (Plug #2), but nothing did exactly what I needed. So out came the assembler and, a week or so later, out popped ZV, So.... armed with ZV, DF can now perform most of the major archiving and de-archiving functions that people who deal primarily with Phil Katz's ZIP format need. (The next major rev of DF will have the capability to archive files.) For the fancy stuff (such as selective de-archiving), you'll still need a program like ARCMASTER or SHEZ, but DF will be able to handle all the everyday stuff. ZV 1.21 5 2.0 How does it Work? ------------------------- I'm glad you asked that question. It works incredibly well. Oh.. HOW does it work. Well, there's nothing to it. The command line syntax is just: ZV [d:][\path\]filename.ZIP So, any of the following are valid: ZV TEST.ZIP ZV C:\FOO\TEST.ZIP ZV E:\FOOBAR.ZIP You do need to type the extension since ZV will look into any file (including self-extracting files). Assuming the specified file exists and is valid, you'll get a window on the screen which looks something like the following. The top line will be highlighted. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ Filename Before Method CR After Date Time CRC Attr ³ ³ ------------ -------- -------- --- ------- -------- ------ -------- ---- ³ ³ ASCAN.C 11591 Imploded 72% 3278 3-15-90 8:29p C48F03BC ---a ³ ³ ASIZE.C 17195 Imploded 76% 4134 3-15-90 12:31a A68B0C17 ---a ³ ³ BBSWEEP.C 6465 Imploded 69% 2031 1-22-90 1:06a 68E0379C ---a ³ ³ CONVERT.C 37526 Imploded 77% 8446 3-14-90 10:21p 2B42D1B8 ---a ³ ³ HEADER.C 11732 Imploded 72% 3342 3-03-90 10:03p E67A9698 ---a ³ ³ IBMDOS.C 2765 Imploded 71% 812 2-17-90 5:39p 4575BF5C ---a ³ ³ MACROS.C 301 Shrunk 31% 207 11-27-89 7:49p 9D902C85 ---a ³ ³ MAKEFILE 1602 Imploded 74% 412 3-06-90 4:51p 9C92811F ---a ³ ³ REDATE.C 17883 Imploded 79% 3710 1-22-90 1:07a 86A021A8 ---a ³ ³ SELF.C 1654 Imploded 66% 567 1-21-90 10:21p 65F69EE4 ---a ³ ³ TEST.C 10242 Imploded 69% 3142 3-15-90 8:29p B53434B5 ---a ³ ³ UNARC.C 15631 Imploded 74% 4136 3-06-90 7:35p 50C371B8 ---a ³ ³ UNIVERSE.C 7370 Imploded 69% 2256 3-14-90 9:21p 91B1CE5F ---a ³ ³ VERSION.C 1551 Imploded 48% 804 2-16-90 11:27p B7B98077 ---a ³ ³ VIEW.C 23958 Imploded 75% 6006 3-06-90 9:38p 5E983326 ---a ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ZIPV 1.21 Copyright 1990 by Gordon Haff and Bit Masons Consulting ZV 1.21 6 You can move the highlight bar arround with the , , , and , These do pretty much what you'd expect them to do. You can quit by hitting the key. And now we come to the useful part -- you can view the contents of a file by pressing the key. What the key does is pipe the contents of the highlighted file to Vernon Buerg's LIST program. PKUNZIP and LIST MUST BE PRESENT IN YOUR PATH OR THIS WON'T WORK!!! Later on, I explain how the default command line can be changed in case you've renamed LIST or know some other way to do the same thing. The default exec line is: PKUNZIP -c ~ ` | list /s where: ~ is the name of the archive being viewed ` is the name of the selected file These names are filled in dynamically by ZV. But Wait! There's more! As of Revision 1.20, you can also EXTRACT the highlighted file. Pressing or e will extract the highlighted file with the following default command line: PKUNZIP ~ ` As with the viewer, this function requires that PKUNZIP be present in your path. ZV 1.21 7 2,1 COMSPEC Variable. ---------------------- In Order for ZV to work, your COMSPEC environment variable must be set. This variable tells ZV the name and the location of the command interpreter to use when it shells to PKUNZIP. Without a COMSPEC variable, ZV will display a file listing, but you will be unable to view the contents of files, To set the COMSPEC variable, include a line such as: SET COMSPEC=C:\COMMAND.COM in your AUTOEXEC.BAT file. The above example is typical for a hard disk system but other COMSPEC lines such as: SET COMSPEC=C:\4DOS.COM and SET COMSPEC=\COMMAND.COM are also possible. The former uses J.P. Software's excellent 4DOS as the shell and the latter uses COMMAND.COM on the current logical disk (This would be common for a floppy-only system). You can view your environment settings at any time by typing SET at the DOS prompt. ZV 1.21 8 3.0 Customizing ZV. ----------------------- I haven't gone and written a fancy user-friendly configuration program for ZV, but you can do some limited modification if you have a hex editor of some sort such as Norton's DiskEdit or NU. Debug will also do in a pinch for the more adventurous. MAKE ALL MODIFICATIONS ON A COPY! ALSO -- make sure that the rev of the program matches this documentation since the offsets could change between revisions! Colors: ------- Variable Offset Default -------- ------ ------- C_NORMAL 0Dh 02h C_INVERSE 0Eh 74h C_INTENSE 0Fh 03h C_BORDER 10h 4Eh C_BORDER is the attribute for the window border, C_INTENSE for the heading in the window, C_INVERSE for the bar. The color values are in standard DOS combined foreground/background format. See the Appendix for details on the values you can enter. Command Lines: ------------- The default command line for the viewer is: PKUNZIP -c ~ ` | list /s and resides from offset 14h through 31h, padded with spaces (20h). (These offsets, like those for the colors, are relative to the beginning of the file at 0000h.) If you modify this command line, be careful not to overflow the space allotted to it (there's a NULL (00) on the end) or the results will likely be very unpleasant. The default command line for the Archive extract is: PKUNZIP ~ ` and resides from offsets 36h through 53h. ZV 1.21 9 4.0 Configuring DF to use ZV: -------------------------------- This is also very easy. Just configure one of the User-defined command lines (using DFCONFIG) to read: ZV ~ When you highlight a file with DF and press the defined function key, you will pop directly into the file listing window of ZV from which you can select files to view. No file names to type! Isn't that easy? (It'll be even easier with the SmartViewers in DF 4.0. You'll just setup ZV ~ to act on a ZIP extension. Then just press to view the contents of a .ZIP file.) 5.0 Technical and Acknowledgments. ----------------------------------- ZV was written using Borland's Turbo Assembler 2.0 and Turbo Debugger 2.0, American Cybernetic's Multi-Edit 4.0, and Base Two Development's Spontaneous Assembly assembler library. ZV 1.21 10 6.0 Other Programs from Gordon Haff and Bit Masons Consulting: ----------------------------------------------------------------- Directory Freedom (DF): Offers users a fast, compact alternative to DOS Shells which provides 1) selective file and directory operations; 2) a scrollable environment for examining files and directories; 3) user-defined keys which can operate upon highlighted files (e.g. by defining an editor). All this in a program which takes less than 20KB since it is written in assembler! Easily customized through an external configuration program. A "look- and-feel" similar to PC Mag's DR, but does much more. Shareware: $20 Registration Latest version: 3.50b (DF350B.ZIP) (Coming Soon: 4.00 with SmartViewers and many other new features!!) the last word: 'the last word' is a quotations trivia game in which 1 to 4 players compete against each other and their own high scores in identifying the source of quotations and completing partial quotes. Most answers are entered free-form and are matched against a set of acceptable responses with a sophisticated pattern-recognition algorithm. 'the last word' runs in text mode -- including on mono displays -- and offers a high level of user configurability. Shareware: $15 Registration Latest version: 1.00 (LWORD100.ZIP) ND: Renames a file to the current date. In other words, if the current date were 10-06-90, the file 'FILENAME.QWK' would be renamed to 901006.QWK. The letters A through Z will be appended as required to largely eliminate duplications. This is a handy program for archiving message packets from bulletin boards, for example. Free, copyrighted software (with 'C' source) Latest version: 1.0 (ND.ZIP or NEWDATE.ZIP) These programs and others (Multi-Edit macros for use with Qmail Deluxe, for example) are available on many fine bulletin boards. The latest releases are always available on Channel One. If you just have to get a copy of one or more of these programs and can't find one, however, I can send them out for a nominal media and postage charge. ZV 1.21 11 7.0 History: --------------- Rev. 1.21 Fixed another big with and keys when directory less than a screenful Rev. 1.20 Fixed bug with key when cursor at bottom of directory Added and keys Added Extract Archive function Rev. 1.11 Fixed problem when SHARE was installed (Thanks to Dr. Herbert Markley for finding this -- the .ZIP file wasn't closed when the EXEC occurred and PKUNZIP, being the well written program that it is, was rightly refusing to have anything to do with the file as a consequence.) Rev. 1.10 Fixed display problem on monochrome systems Fixed problems with ZIP files < 10Kbytes Rev. 1.0 Initial Release 8.0 Known Limitations: ----------------------- (i.e. This is a free program and I got tired of beating out my brains over it for the time being.) o Truncates the display of files archived with their paths and will not pipe them to the viewer properly if the entire path and filename is greater than 13 characters. o For various reasons, the central directory is only looked for in the last 10KB of the file. *Conceivably* this could cause problems if there were very large ZIP comments. ZV 1.21 12 APPENDIX A COLORS The color number stored for use in ZV are combined foreground/background attributes of the type used by DOS. This combined attribute value is simply the foreground and background numbers, as given below, bit-wise OR'd together. That's a fancy way of saying added together for our purposes here. (Remember though that these are hexadecimal numbers.) For example, yellow on a blue background is given by 1Eh (0Eh + 10h). Foreground (normal) Foreground (intense) Background -------------------------------------------------------------- 0 black 8 dark gray 0 black 1 blue 9 light blue 10h blue 2 green 0Ah light green 20h green 3 cyan 0Bh light cyan 30h cyan 4 red 0Ch light red 40h red 5 magenta 0Dh light mag. 50h magenta 6 brown 0Eh yellow 60h brown 7 gray 0Fh intense white 70h gray