home *** CD-ROM | disk | FTP | other *** search
- Toad Hall Shar v1.1, 14 Jun 89, for Turbo Pascal v5.0
-
- TOADSHAR public domain shar/unshar utility
-
- Usage: shar [-u] [file1]..[filen]
-
- Where file1..filen can be up to 20 MS-DOS path\filenames
- (wildcards permitted).
-
- When creating a shar file, TOADSHAR output is to StdOut
- (e.g., redirectable to the file or device of your choice).
-
- -u Unshar (extract) members from shar file(s).
- Yes, the -u (case immaterial) MUST be the first command line parameter!
- (And no, slashes won't work!)
- TOADSHAR outputs each shar member to its original name.
- shar filenames can be full DOS paths,
- with a default file type of ".SHR" (added if required).
- Existing files will NOT be overwritten.
-
- Comments:
-
- Other shars available for MS-DOS had no wildcard capability;
- had problems with some of the weird (non-MS-DOS) member filenames;
- and I got BLOODY tired of typing in long lines of target filenames
- at the DOS command line when I wanted to shar some files!
-
- TOADSHAR has wildcard capability (both for shar creation and extraction).
-
- I've arbitrarily decided to force the world to accept the MS-DOS shar
- file type of ".SHR" for a shar file type (when wildcard extracting)
- (since we primitive MS-DOS users can't use the standard Unix ".shar"
- filetype).
-
- You don't like it? Recode it! (Or quote me an IEEE standard!)
-
-
- During shar creation:
- The .SHR files produced will be simplistic (e.g., none of the fancy
- Unix switches are available). However, they should be compatible
- with Unix shars (provided you work around the line ending problem,
- of course).
-
- Shar-formatted output is to StdOut (via redirection at the DOS
- command line). No check is made for an output file's existence
- (naturally). Output is standard DOS text file (e.g., CR/LF line
- endings).
-
- No tests are made to filter out control characters, etc., and target
- member files are treated as text files. I would NOT suggest using
- this shar on anything but pure Ascii text files! GIGO.
-
- Any error msgs will go to StdErr (e.g., console). (v1.1)
-
-
- During extraction:
-
- You can wildcard the extracting. (E.g., if you have FOO1.SHR and
- FOO2.SHR, just enter:
-
- TOADSHAR -u FOO*
-
- and both files will be unshared.)
-
- Existing files will NOT be overwritten! You'll get a warning message,
- and TOADSHAR will continue to chug its way through the remaining shar
- file members (if any) (if it can!).
-
- No tests are made (to date) to replicate sed or sh errorchecking
- (e.g., the simplistic character count).
-
- Some sed/sh "echo" commands are echoed to StdOut during extraction.
-
- I've tested TOADSHAR on Unix and MS-DOS .shar files created with various
- switch settings .. seems to work ok.
-
- This sucker isn't ALL it could be yet .. possible enhancements could
- include:
- - More file read/write error trapping.
- - More sophisticated sh-like testing
- (char counts, tests for file overwriting, etc.)
- - Unix-compatible switches (for LF line terminators
- rather than the MS-DOS CR/LF).
-
- .. but it'll do for now.
-
- Credits:
- Fancy dynamic arrays of FindFirst and FindNext SearchRecs,
- thanks to a (severe) hack of:
-
- "Linked list modules from LINKLIST.PAS"
- Copyright (c) 1985 by Alan D. Hull
-
- Boyer-Moore string searching algorithm/code
- from Dr. Dobbs Journal (full credits in source).
-
- Released to the public domain.
-
- David P Kirschbaum
- Toad Hall
- kirsch@braggvax.ARPA
- (or maybe kirsch%braggvax.ARPA@cacfs.army.mil)
- (919) 868-3471