Xref: utzoo alt.sources.d:656 comp.sources.d:5599 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!maverick.ksu.ksu.edu!deimos.cis.ksu.edu!mccall!tp From: tp@mccall.com Newsgroups: alt.sources.d,comp.sources.d Subject: Re: Unnecessary tar-compress-uuencodes Message-ID: <3119.269d97ea@mccall.com> Date: 13 Jul 90 09:44:09 GMT References: <15652@bfmny0.BFM.COM> <3114@psueea.UUCP> <1990Jul10.203015.27282@eci386.uucp> <5256@plains.UUCP> <3124@psueea.UUCP> <1990Jul13.022224.25441@lth.se> Organization: The McCall Pattern Co., Manhattan, KS, USA Lines: 45 In article <1990Jul13.022224.25441@lth.se>, bengtl@maths.lth.se (Bengt Larsson) writes: > In article <3124@psueea.UUCP> kirkenda@eecs.UUCP (Steve Kirkendall) writes: > > (a list of valid points concerning a "shar" program) > >>Did I miss anything? Did I get anything wrong? Does anybody know of an >>existing format that comes close to these specs? > > Hmmm, one way to do it would be to write a little "unpacker" program (in C), > and distribute it with the archive (in plain text). It had better be a VERY portable program! > Suggested format for archive: (borrowed heavily from VMS_SHAR, the "shar" > program for VMS) I agree that the VMS_SHARE format is quite good. However, the VMS_SHARE format is self unpacking on VMS, just like a unix shar is on unix, with no tools that are not part of the OS. The VMS_SHARE is a DCL command procedure that contains a TPU program (TPU is the VMS programmable text editor) to unpack the files. The problem with a C program, is that it is VERY hard to write a portable program with no #ifdef's that will do the job. If you go this route, write it strictly as a filter, and invoke it just like you do sed in current shar's, with the <<'EOF' input specifier and the > redirection for output. And for heaven's sake, ONLY WRITE ONE OF THEM, and use only one name for it! Whatever you write, I have to recognize explicitly (I maintain a VMS unshar program, and I'm not interested in making it into a full Bourne shell.) Perhaps this is overkill? Wouldn't it be possible to escape the most troublesome characters in such a way that you could still use sed to unpack it? Anyone currently unpacking unix shar's has already emulated sed to some degree, adding a few more substitute commands couldn't be hard. I don't advocate using AWK, while there is a VMS version, it is large and not widely installed. I suspect MSDOS or Amiga sites would have similar problems. Final note about the other proposed format, DON'T mung spaces into tabs. Some people don't use tabs. The goal should be to do as good a job as possible in reproducing the exact file that was packed. -- Terry Poot The McCall Pattern Company (uucp: ...!rutgers!ksuvax1!mccall!tp) 615 McCall Road (800)255-2762, in KS (913)776-4041 Manhattan, KS 66502, USA