From mboxrd@z Thu Jan 1 00:00:00 1970 From: cubexyz@gmail.com (Mark Longridge) Date: Thu, 17 Dec 2015 10:13:37 -0500 Subject: [TUHS] ed.c on Unix v5 Message-ID: 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