From 0c2ccd85a2a237c442f0706e420797af64a4398f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 28 May 2016 11:09:03 -0700 Subject: 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. --- genman.txr | 2 ++ 1 file changed, 2 insertions(+) (limited to 'genman.txr') 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])) -- cgit v1.2.3