I got as far as trying to build and run it, but bugged out, thusly:
$ ./one-page-j
warning: this program uses gets(), which is unsafe.
Segmentation fault: 11
Ah well, its still cute to try to read and understand ..