On Tue, Jan 20, 2026 at 02:52:25PM +0100, Alejandro Colomar wrote: > For example, here's how qsort(3) was implemented in 4.3BSD (1986): BTW, there's a git repository that includes all of the historic Unix systems: I use it when I need to inspect old Unix sysmtems. I have checked out a few of them in separate git-worktree(1)'s: alx@devuan:~/src/unix/unix$ ls -a . .. .bare.git 4.3BSD v3 v4 v5 v6 v7 alx@devuan:~/src/unix/unix$ ls | xargs -I {} git -C {} status HEAD detached at BSD-4_3 nothing to commit, working tree clean HEAD detached at Research-V3 nothing to commit, working tree clean HEAD detached at Research-V4 nothing to commit, working tree clean HEAD detached at Research-V5 nothing to commit, working tree clean HEAD detached at Research-V6 nothing to commit, working tree clean HEAD detached at Research-V7 nothing to commit, working tree clean > alx@devuan:~/src/unix/unix/4.3BSD$ cat ./usr/src/lib/libc/gen/qsort.c \ > | sed -n \ > -e '/^qsort/,/^{/p' \ > -e '/compar\>/p' \ > -e '/qcmp/p' \ > -e '/^}/{p;q}' \ > | uniq; > static int (*qcmp)(); /* the comparison routine */ > qsort(base, n, size, compar) > char *base; > int n; > int size; > int (*compar)(); > { > qcmp = compar; > if (qcmp(j, lo) > 0) > while (qcmp(hi -= qsz, min) > 0) > } --