@# This requires a hacked version of man2html @# See here: http://www.kylheku.com/cgit/man @(bind closedtxt " [+]") @(bind opentxt " [-]") @(bind xpnall "[expand all]") @(bind clpsall "[collapse all]") @(bind closed t) @(do (defvarl symhash (hash)) (defvarl tagmap (hash)) (defvarl tochash (hash)) (defvarl dupe-hashes (hash)) (defvarl dupe-titles (hash)) (defvarl direct (hash)) (defvarl disamb (hash)) (defvarl dist-counter 0) (defvarl colli (hash-props)) (defun hash-title (title) (let* ((ti title) (cntr 0) (defs (build (while-match `@nil@ttitem@rest` ti (add ttitem) (set ti rest))))) (set title (if defs (car defs) (downcase-str title)) ti title) (while* [dupe-titles title] (set title `T-@(inc cntr)-@ti`)) (set [dupe-titles title] t) (let* ((h (crc32 title)) (h (+ h (or [colli title] 0))) (existing [dupe-hashes h])) (when existing (unless (equal title existing) (error "~a ~a hash collision!" existing title))) (set [dupe-hashes h] title) (format nil "N-~,08X" h)))) (defun toc-tag (sec) `TOC-@sec`) (defun process-ambiguities (hash) (let ((rhash (hash))) (dohash (sym tags hash) (let ((shash (fmt "S-~,08X" (crc32 sym)))) (if [rhash shash] (error "~a ~a hash collision" sym [rhash shash]) (set [rhash shash] sym)) (set [hash sym] shash) (if (null (cdr tags)) (push shash [direct (car tags)]) (set [disamb shash] (reverse tags)))))))) Content-type: text/html @(skip 15)