🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.wanted.sources
1 messages
1 total messages Started by Barry Shein Sat, 05 Jul 1986 03:04
Re: Does anyone have the source for a PD cp?
#1511
Author: Barry Shein
Date: Sat, 05 Jul 1986 03:04
31 lines
1580 bytes
From: avolio@decuac.DEC.COM (Frederick M. Avolio)
>> Does anyone have the source code for a Public Domain cp?  I'm wanting to
>> write one for my IBM AT to compile and use under DOS, but I don't have the
>> slightest idea how to do it right.  Thanks in advance.

>Egad!  You don't have a degree in computer science, do you? 
>
>Ok...
>
>open first file (checking for errors ... bailout if necessary)
>creat second file (checking for errors ... bailout if necessary)
>while (read a buffer from first file) is greater than 0,
>	write a buffer to second file (check for errors..)
>exit

Gimme a break Fred, this is net.unix, people can ask questions like
this.

Besides, how does your pseudocode handle the -r option? And permissions?
And multiple file names to a directory? And the -i option? And checking
for copying a file to itself (hint: it works with links)? Cp isn't
very hairy, but it's a lot hairier than that.

Egad! You don't work for DEC, do you?

That's right, I guess the rest will be in the "next release"...

[C'mon, you asked for it]

	-Barry Shein, Boston University
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads