From 8466d8cfa486fb30d1755c4261b781135083787b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:29 -0800 Subject: Import Upstream version 3a1 --- htmlform.scm | 74 ++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 27 deletions(-) (limited to 'htmlform.scm') diff --git a/htmlform.scm b/htmlform.scm index 935e006..d659aeb 100644 --- a/htmlform.scm +++ b/htmlform.scm @@ -8,7 +8,7 @@ ;1. Any copy made of this software must include this copyright notice ;in full. ; -;2. I have made no warrantee or representation that the operation of +;2. I have made no warranty or representation that the operation of ;this software will be error-free, and I am under no obligation to ;provide any services, by way of maintenance, update, or otherwise. ; @@ -22,11 +22,12 @@ (require 'parameters) (require 'object->string) (require 'string-search) -(require 'database-utilities) +(require 'databases) (require 'common-list-functions) ;;;;@code{(require 'html-form)} ;;@ftindex html-form + (define html:blank (string->symbol "")) ;;@body Returns a string with character substitutions appropriate to @@ -60,7 +61,7 @@ ;;@samp{author}, @samp{copyright}, @samp{keywords}, @samp{description}, ;;@samp{date}, @samp{robots}, @dots{}. (define (html:meta name content) - (sprintf #f "\n" name (html:atval content))) + (sprintf #f "\\n" name (html:atval content))) ;;@body Returns a tag of HTTP information suitable for passing as the ;;third argument to @code{html:head}. The tag produced is @samp{" + (sprintf #f "\\n" name (html:atval content))) ;;@args delay uri @@ -81,8 +82,8 @@ ;;this tag, Netscape or IE browsers will fetch and redisplay this page. (define (html:meta-refresh delay . uri) (if (null? uri) - (sprintf #f "\n" delay) - (sprintf #f "\n" + (sprintf #f "\\n" delay) + (sprintf #f "\\n" delay (car uri)))) ;;@args title backlink tags ... @@ -101,10 +102,12 @@ (sprintf #f "\\n") (sprintf #f "%s" (html:comment "HTML by SLIB" - "http://swissnet.ai.mit.edu/~jaffer/SLIB.html")) + "http://swissnet.ai.mit.edu/~jaffer/SLIB")) (sprintf #f " \\n %s\\n %s\\n \\n" (html:plain title) (apply string-append args)) - (sprintf #f "

%s

\\n" (or backlink (html:plain title))))) + (if (and backlink (substring-ci? "

" backlink)) + backlink + (sprintf #f "

%s

\\n" (or backlink (html:plain title)))))) ;;@body Returns HTML string to end a page. (define (html:body . body) @@ -217,7 +220,7 @@ (let ((value-list (map car foreign-values)) (visibles (map cadr foreign-values))) (string-append - (sprintf #f "\\n" (html:atval pname) (case arity ((single optional) 1) @@ -227,7 +230,7 @@ (else ""))) (apply string-append (map (lambda (value visible) - (sprintf #f "