[TUHS] ed.c on Unix v5

Mark Longridge cubexyz at gmail.com
Fri Dec 18 01:13:37 AEST 2015


Ok, not sure if anyone will want to do this but I've just compiled
ed.c from Unix v6 on Unix v5.

It's not much bigger than the assembled ed, with 1314 lines of C code
the compiled executable is only 6518 bytes vs 4292 for the original. I
was looking at the source code and didn't see anything that the v5 cc
couldn't handle. I trimmed the source a bit, there's a function at the
end called getpid()  which is commented out.

The comment says:

/* Get process ID routine if system call is unavailable. */

but my version of v5 does have that system call so it's all good.

It's been run a few times and it seems to work just fine. It may even
have a few more features than the v5 ed, I'm not sure yet :)

Mark



More information about the TUHS mailing list