summaryrefslogtreecommitdiffstats
path: root/genman.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-28 11:09:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-28 11:09:03 -0700
commit0c2ccd85a2a237c442f0706e420797af64a4398f (patch)
tree705a64e6e11ad4cab66819878702ad74980cbaf4 /genman.txr
parent802d3ddb277739b204689e922005b578158cbb83 (diff)
downloadtxr-0c2ccd85a2a237c442f0706e420797af64a4398f.tar.gz
txr-0c2ccd85a2a237c442f0706e420797af64a4398f.tar.bz2
txr-0c2ccd85a2a237c442f0706e420797af64a4398f.zip
Replace new hash limit constants with variables.
* genman.txr: Call set-hash-str-limit to set a generous limit for string hashing, which restores the old hash values in the HTML document, preserving the validity of existing URLs. * hash.c (hash_str_limit, hash_rec_limit): New static variables. (HASH_STR_LIMIT, HASH_REC_LIMIT): Preprocessor symbols removed. (hash_c_str, equal_hash): Use hash_str_limit. (gethash_c, gethash, gethash_f, gethash_n, remhash, hash_equal): Use hash_rec_limit. (set_hash_str_limit, set_hash_rec_limit): New static functions. (hash_init): Register sys:set-hash-str-limit and sys:set-hash-rec-limit intrinsics.
Diffstat (limited to 'genman.txr')
-rw-r--r--genman.txr2
1 files changed, 2 insertions, 0 deletions
diff --git a/genman.txr b/genman.txr
index 405916f6..97c0486e 100644
--- a/genman.txr
+++ b/genman.txr
@@ -13,6 +13,8 @@
(defvar dupes (hash))
(defvar tagnum (hash :equal-based))
+ (sys:set-hash-str-limit 1000)
+
(defun hash-title (title)
(let* ((h (logtrunc (hash-equal title) 32))
(existing [dupes h]))