From 337c30fd09ee75b0e250aa2b7e125002759af2ff Mon Sep 17 00:00:00 2001 From: erana Date: Wed, 1 Feb 2012 14:15:24 +0900 Subject: [PATCH] cavespider guile setup load file --- s48/cavespider/load.scm | 14 ++++++++------ s48/cavespider/util.scm | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/s48/cavespider/load.scm b/s48/cavespider/load.scm index d1436e3..9e3228d 100644 --- a/s48/cavespider/load.scm +++ b/s48/cavespider/load.scm @@ -43,14 +43,16 @@ (define keyword (symbol->string (read))) (newline) -(let ((file-contents (file->string (string-append dir-filename "/" "index.html"))));;FIXME dir -;; (do ((url-list (file-contents->url file-contents 0) -;; (file-contents->url file-contents 0))) +(let ((file-contents (file->string (string-append dir-filename "/" "index.html"))) + (htable (make-hash-table HASHTABLESIZE)) + (url-list (file-contents->url file-contents 0))) + (let ((hostname-list '()) - (keywordl '()) - (url-list (file-contents->url file-contents 0))) + (keywordl '())) + (set! hostname-list (url->hostname url-list hostname-list));;FIXME url-list (display hostname-list) - (file-contents->keyword file-contents keyword) + (set! keywordl (file-contents->keyword file-contents keyword)) (display keywordl) + (hash-set! htable keyword file-contents) )) diff --git a/s48/cavespider/util.scm b/s48/cavespider/util.scm index 901dda4..3a9f067 100644 --- a/s48/cavespider/util.scm +++ b/s48/cavespider/util.scm @@ -33,7 +33,7 @@ ; (if (eq? c #\y) ; (load "string-util-alt.scm") ; (begin -; (load "hash-util.scm") + (load "hash-util.scm") (load "string-util.scm") ;)))