Rename ...-ICON-FILE-NAME -> ...-ICON-URL.

This commit is contained in:
sperber 2003-01-29 09:16:56 +00:00
parent 301d6ff4c3
commit f373a87413
2 changed files with 44 additions and 44 deletions

View File

@ -489,7 +489,7 @@ one. Here they are:
encoding. encoding.
\end{desc} \end{desc}
\defun{with-file-name->icon-file-name}{proc [options]}{options} \defun{with-file-name->icon-url}{proc [options]}{options}
\begin{desc} \begin{desc}
This specifies a procedure for determining the icon to be displayed This specifies a procedure for determining the icon to be displayed
next to a file name in a directory listing. next to a file name in a directory listing.
@ -497,19 +497,19 @@ one. Here they are:
representing the corresponding icon. representing the corresponding icon.
\end{desc} \end{desc}
\defun{with-blank-icon-file-name}{file-name [options]}{options} \defun{with-blank-icon-url}{file-name [options]}{options}
\begin{desc} \begin{desc}
This specifies a file name for the special icon that must be as wide This specifies a file name for the special icon that must be as wide
as the icons returned by the previous procedure but that is blank. as the icons returned by the previous procedure but that is blank.
\end{desc} \end{desc}
\defun{with-back-icon-file-name}{file-name [options]}{options} \defun{with-back-icon-url}{file-name [options]}{options}
\begin{desc} \begin{desc}
This specifies a file name for the special icon that is displayed This specifies a file name for the special icon that is displayed
next to the ``parent directory'' link in directory listings. next to the ``parent directory'' link in directory listings.
\end{desc} \end{desc}
\defun{with-unknown-icon-file-name}{file-name [options]}{options} \defun{with-unknown-icon-url}{file-name [options]}{options}
\begin{desc} \begin{desc}
This specifies a file name for the special icon that is displayed This specifies a file name for the special icon that is displayed
next to the unknown entries in directory listings. next to the unknown entries in directory listings.

View File

@ -12,31 +12,31 @@
(define-record-type file-directory-options :file-directory-options (define-record-type file-directory-options :file-directory-options
(really-make-file-directory-options file-name->content-type (really-make-file-directory-options file-name->content-type
file-name->content-encoding file-name->content-encoding
file-name->icon-file-name file-name->icon-url
directory-icon-file-name directory-icon-url
blank-icon-file-name blank-icon-url
back-icon-file-name back-icon-url
unknown-icon-file-name) unknown-icon-url)
file-directory-options? file-directory-options?
(file-name->content-type file-directory-options-file-name->content-type (file-name->content-type file-directory-options-file-name->content-type
set-file-directory-options-file-name->content-type!) set-file-directory-options-file-name->content-type!)
(file-name->content-encoding file-directory-options-file-name->content-encoding (file-name->content-encoding file-directory-options-file-name->content-encoding
set-file-directory-options-file-name->content-encoding!) set-file-directory-options-file-name->content-encoding!)
(file-name->icon-file-name file-directory-options-file-name->icon-file-name (file-name->icon-url file-directory-options-file-name->icon-url
set-file-directory-options-file-name->icon-file-name!) set-file-directory-options-file-name->icon-url!)
(directory-icon-file-name file-directory-options-directory-icon-file-name (directory-icon-url file-directory-options-directory-icon-url
set-file-directory-options-directory-icon-file-name!) set-file-directory-options-directory-icon-url!)
(blank-icon-file-name file-directory-options-blank-icon-file-name (blank-icon-url file-directory-options-blank-icon-url
set-file-directory-options-blank-icon-file-name!) set-file-directory-options-blank-icon-url!)
(back-icon-file-name file-directory-options-back-icon-file-name (back-icon-url file-directory-options-back-icon-url
set-file-directory-options-back-icon-file-name!) set-file-directory-options-back-icon-url!)
(unknown-icon-file-name file-directory-options-unknown-icon-file-name (unknown-icon-url file-directory-options-unknown-icon-url
set-file-directory-options-unknown-icon-file-name!)) set-file-directory-options-unknown-icon-url!))
(define (make-default-file-directory-options) (define (make-default-file-directory-options)
(really-make-file-directory-options default-file-name->content-type (really-make-file-directory-options default-file-name->content-type
default-file-name->content-encoding default-file-name->content-encoding
default-file-name->icon-file-name default-file-name->icon-url
"directory.xbm" "directory.xbm"
"blank.xbm" "blank.xbm"
"back.xbm" "back.xbm"
@ -50,21 +50,21 @@
(set-file-directory-options-file-name->content-encoding! (set-file-directory-options-file-name->content-encoding!
new-options new-options
(file-directory-options-file-name->content-encoding options)) (file-directory-options-file-name->content-encoding options))
(set-file-directory-options-file-name->icon-file-name! (set-file-directory-options-file-name->icon-url!
new-options new-options
(file-directory-options-file-name->icon-file-name options)) (file-directory-options-file-name->icon-url options))
(set-file-directory-options-directory-icon-file-name! (set-file-directory-options-directory-icon-url!
new-options new-options
(file-directory-options-directory-icon-file-name options)) (file-directory-options-directory-icon-url options))
(set-file-directory-options-blank-icon-file-name! (set-file-directory-options-blank-icon-url!
new-options new-options
(file-directory-options-blank-icon-file-name options)) (file-directory-options-blank-icon-url options))
(set-file-directory-options-back-icon-file-name! (set-file-directory-options-back-icon-url!
new-options new-options
(file-directory-options-back-icon-file-name options)) (file-directory-options-back-icon-url options))
(set-file-directory-options-unknown-icon-file-name! (set-file-directory-options-unknown-icon-url!
new-options new-options
(file-directory-options-unknown-icon-file-name options)) (file-directory-options-unknown-icon-url options))
new-options)) new-options))
(define (make-file-directory-options-transformer set-option!) (define (make-file-directory-options-transformer set-option!)
@ -81,18 +81,18 @@
(define with-file-name->content-encoding (define with-file-name->content-encoding
(make-file-directory-options-transformer (make-file-directory-options-transformer
set-file-directory-options-file-name->content-encoding!)) set-file-directory-options-file-name->content-encoding!))
(define with-file-name->icon-file-name (define with-file-name->icon-url
(make-file-directory-options-transformer (make-file-directory-options-transformer
set-file-directory-options-file-name->icon-file-name!)) set-file-directory-options-file-name->icon-url!))
(define with-blank-icon-file-name (define with-blank-icon-url
(make-file-directory-options-transformer (make-file-directory-options-transformer
set-file-directory-options-blank-icon-file-name!)) set-file-directory-options-blank-icon-url!))
(define with-back-icon-file-name (define with-back-icon-url
(make-file-directory-options-transformer (make-file-directory-options-transformer
set-file-directory-options-back-icon-file-name!)) set-file-directory-options-back-icon-url!))
(define with-unknown-icon-file-name (define with-unknown-icon-url
(make-file-directory-options-transformer (make-file-directory-options-transformer
set-file-directory-options-unknown-icon-file-name!)) set-file-directory-options-unknown-icon-url!))
(define (make-file-directory-options . stuff) (define (make-file-directory-options . stuff)
(let loop ((options (make-default-file-directory-options)) (let loop ((options (make-default-file-directory-options))
@ -274,7 +274,7 @@
;; These icons can, for example, be found in the cern-httpd-3.0 ;; These icons can, for example, be found in the cern-httpd-3.0
;; distribution at http://www.w3.org/pub/WWW/Daemon/ ;; distribution at http://www.w3.org/pub/WWW/Daemon/
(define (default-file-name->icon-file-name fname) (define (default-file-name->icon-url fname)
(let ((ext (file-name-extension fname))) (let ((ext (file-name-extension fname)))
(cond (cond
((string-ci=? ext ".txt") "text.xbm") ((string-ci=? ext ".txt") "text.xbm")
@ -384,12 +384,12 @@
(icon-name (icon-name
(case type (case type
((regular fifo socket) ((regular fifo socket)
((file-directory-options-file-name->icon-file-name options) ((file-directory-options-file-name->icon-url options)
fname)) fname))
((directory) ((directory)
(file-directory-options-directory-icon-file-name options)) (file-directory-options-directory-icon-url options))
(else (else
(file-directory-options-unknown-icon-file-name options)))) (file-directory-options-unknown-icon-url options))))
(tag-name (tag-name
(case type (case type
((regular fifo socket) "[FILE]") ((regular fifo socket) "[FILE]")
@ -445,9 +445,9 @@
(make-writer-body (make-writer-body
(lambda (port httpd-options) (lambda (port httpd-options)
(let ((back-icon (let ((back-icon
(file-directory-options-back-icon-file-name options)) (file-directory-options-back-icon-url options))
(blank-icon (blank-icon
(file-directory-options-blank-icon-file-name options))) (file-directory-options-blank-icon-url options)))
(with-tag port html () (with-tag port html ()
(let ((title (string-append "Index of /" (let ((title (string-append "Index of /"
(string-join file-path "/")))) (string-join file-path "/"))))