[alt.sources.d] tar

macduff@cbnewse.att.com (Roger R. Espinosa) (09/14/90)

Hi.

Having found myself suddenly wanting to download lotsa files to 
my machine at home, I was wondering if there was C source to a 
smaller tar(1) command -- I've sen GNU tar, and frankly, it's much
more than I need: the ability to extract/create (maybe) tar files. 
GNU tar has lots of UNIX-specific stuff, dealing with tapes and 
devices, which won't translate at all to the home machine.

I really *need* C source -- the machine at home isn't an IBM-type,
isn't a Macintosh, isn't an Amiga, so any known executable type
files for these sources won't help me. :-(

Thanks!
Roger
rre@ihlpn.ATT.COM

(It's an Acorn, actually, and I doubt anyone's got archives for 'em
this side of the Atlantic, but heck, if anyone has 'em...:-)

gerry@jts.com (G. Roderick Singleton ) (09/23/90)

In article <1990Sep14.132344.19099@cbnewse.att.com> macduff@cbnewse.att.com (Roger R. Espinosa) writes:
>
>Hi.
>
>Having found myself suddenly wanting to download lotsa files to 
>my machine at home, I was wondering if there was C source to a 
>smaller tar(1) command -- I've sen GNU tar, and frankly, it's much
>more than I need: the ability to extract/create (maybe) tar files. 
>GNU tar has lots of UNIX-specific stuff, dealing with tapes and 
>devices, which won't translate at all to the home machine.

see below.
>
>I really *need* C source -- the machine at home isn't an IBM-type,
>isn't a Macintosh, isn't an Amiga, so any known executable type
>files for these sources won't help me. :-(
>
I still run a cp/m-based system so I know what you mean.

>(It's an Acorn, actually, and I doubt anyone's got archives for 'em
>this side of the Atlantic, but heck, if anyone has 'em...:-)

The 6502 version or the Z80?  (Just curious.)

If you check the GNU tar sources you'll find it's compilable for Poisonous
Computer DOS (aka PC/MSDOS).  In this incarnation its quite small and works
only with files.  This version was done before the author placed it under
GNU and can probably be adapted to your platform if your compiler is
close to V7 complience.

ger
It's probably the best starting point you have until someone supplies
an Acorn version.

-- 
G. Roderick Singleton, System and Network Manager, JTS Computers 
{yunexus | uunet | geac | torsqnt}!gerry@jtsv16.jts.com

tin@szebra.uucp (Tin Le) (09/26/90)

>In article <1990Sep14.132344.19099@cbnewse.att.com> macduff@cbnewse.att.com (Roger R. Espinosa) writes:
>
>Hi.
>
>Having found myself suddenly wanting to download lotsa files to 
>my machine at home, I was wondering if there was C source to a 
>smaller tar(1) command -- I've sen GNU tar, and frankly, it's much
>more than I need: the ability to extract/create (maybe) tar files. 
>GNU tar has lots of UNIX-specific stuff, dealing with tapes and 
>devices, which won't translate at all to the home machine.
>
>
>I really *need* C source -- the machine at home isn't an IBM-type,
>isn't a Macintosh, isn't an Amiga, so any known executable type
>files for these sources won't help me. :-(
>
>(It's an Acorn, actually, and I doubt anyone's got archives for 'em
>this side of the Atlantic, but heck, if anyone has 'em...:-)
>

You might want to try pax.  The latest GNU tar v1.08 is a "little" bit
large for small machines.  However, it is still possible to get it
compiled and working with a little work.  Several years back, I got
pax compiled under MesSyDOS, and an old version of GNU tar to
compiled and work.  Most of the work was in commenting out UNIX and
network dependent stuffs that are useless to me.  I also added some
fake headers/declarations to keep the compiler happy.

It's been a while since I done that so I don't know what I did with
the modified source.  Besides, I haven't touch DOS <ahhh, relief>
for a long time.

Remember, it is possible to port GNU tar by stripping out unneeded
code - such as networks, tape devices, etc.  A lot of it is simply
putting the code between #ifdefs and have basically an empty function
like so:

network_functions()
{
#ifdef 0
.....useless code (for you)
#endif
}

Keeping the function declaration around is necessary to keep the compiler
happy.  It's too much to really do a port where you remove all calls
to the function.  Besides, a smart compiler should notice an empty
function (and one that's not called at all) and not even generate code
for it (well, maybe not compilers for small machines).

Good luck.

-- Tin Le

-- 
+-----------------------------------------------------------------
|Tin Le           | tin@smsc.sony.com or tin@szebra.uucp
|Station Zebra    |....!{claris,zorch}!szebra!tin
|Sunnyvale, CA    | (408) 739-1520  24hrs Telebit+ 300-19200bps