Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!samsung!think!snorkelwacker!apple!portal!cup.portal.com!Sullivan From: Sullivan@cup.portal.com (sullivan - segall) Newsgroups: comp.sys.amiga.tech Subject: UNSH V0,10 Message-ID: <30175@cup.portal.com> Date: 24 May 90 07:15:35 GMT Distribution: na Organization: The Portal System (TM) Lines: 213 This is a short little shar archive containing documentation, source and executable in ANSI C for a shar archive dearchiving program. (I was getting annoyed because 'shar -u' kept crashing the machine.) Btw: There seems to be a bug in Manx 5.0. When initializing a string variable with a null string, the machine guru's. ie: void main(void) { char buf[30] = ""; } will compile, but won't run. Could someone with access to Compu$erve pass this along? (They don't answer my mail.) # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # unsh.doc # unsh.uue # This archive created: Wed May 23 23:09:47 1990 cat << \SHAR_EOF > unsh.doc This silly little program is Copyright 1990 by Kevin Smathers, all rights reserved. Permission is granted to distribute this program through normal freely distributable routes. This program (in a single routine) parses shell archives to extract their contents. It cheats somewhat by knowing the format of the file. File lines are assumed to begin with an 'X' character, (although any could theoretically be used) and it doesn't really try to parse the parameters to 'sed', it just looks for an output filename. These and other limitations should be easy enough to fix should it ever become neccessary. (The program *is* pretty robust. It should be pretty difficult to crash it even with random input files.) Really the only reason this program exists is because 'unbob' stopped working on me about 5 months ago, and 'shar' has always guru'd when I run it with the '-u' switch. The obvious solution was to write a program which wouldn't crash. To extract files from a shell archive, invoke UNSH with the name of the shell archive: E.g: UNSH filename Running UNSH without any parameters will produce a short usage note, and the revision number. -Sullivan Segall _________________________________________________________________ /V\ Sullivan was the first to learn how to jump without moving. ' Is it not proper that the student should surpass the teacher? To Quote the immortal Socrates: "I drank what?" -Sullivan _________________________________________________________________ Mail to: ...sun!portal!cup.portal.com!Sullivan or Sullivan@cup.portal.com SHAR_EOF c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