This is a conversion of the original V7 pwd program for use on POSIX systems (tested primarily on Linux). This is mostly of historical interest — modern systems have a library routine or system call for getting the current directory, and don’t need this.
I’ve attempted to make the minimum set of logic/functionality changes needed to make the program work, preserving the core of the original logic. I’ve made slightly more aesthetic changes, to make reading easier for a post-standardization C speaker.
↫ Cliff L. Biffle
Over on Fedi, Cliff L. Biffle provides more details as to why he undertook this project.

No Responses