Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The Earliest Unix Code: An Anniversary Source Code Release. Parent comment
int dst /*8*/, src /*9*/, c1, df, tbuf[8], dir[BIG]; char dotdot[] = ".. "; df = open(dotdot, O_RDONLY); dst = dir - 1; while (read(df, tbuf, 8) != 0) { if (tbuf[0] != 0) { c1 = -8; src = tbuf - 1; do { *++dst = *++src; } while (++c1 != 0); } } close(df); df = creat(dotdot); write(df, dir, dst - dir + 1); close(df); exit();
According to https://wiki.tuhs.org/doku.php?id=systems:pdp7_unix ‘..’ was the name of the current directory (i.e. what is now ‘.’), so this operated on the current directory.
There are no comments on this comment yet.
According to https://wiki.tuhs.org/doku.php?id=systems:pdp7_unix ‘..’ was the name of the current directory (i.e. what is now ‘.’), so this operated on the current directory.