From fe1420ae9ed18f2066b7bca862e2ea68d1e38ea9 Mon Sep 17 00:00:00 2001 From: slava Date: Sat, 28 Oct 2006 06:43:13 +0000 Subject: [PATCH] Update HTTPD for removal of define-open/define-close words --- contrib/httpd/html-tags.factor | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/contrib/httpd/html-tags.factor b/contrib/httpd/html-tags.factor index fc769c5707..7d48e5d09b 100644 --- a/contrib/httpd/html-tags.factor +++ b/contrib/httpd/html-tags.factor @@ -56,53 +56,52 @@ SYMBOL: html : write-html ( str -- ) H{ { html t } } format ; -: html-word ( name def -- word ) +: html-word ( name def -- ) #! Define 'word creating' word to allow #! dynamically creating words. - >r "html" create dup r> define-compound ; + >r "html" create r> define-compound ; : "<" swap ">" append3 ; : def-for-html-word- ( name -- ) #! Return the name and code for the patterned #! word. - dup swap [ write-html ] curry html-word - define-open ; + dup swap [ write-html ] curry html-word ; : ">" append ; : def-for-html-word-foo> ( name -- ) #! Return the name and code for the foo> patterned #! word. - foo> [ ">" write-html ] html-word define-open ; + foo> [ ">" write-html ] html-word ; : [ "" % ] "" make ; : def-for-html-word- ( name -- ) #! Return the name and code for the patterned #! word. - dup [ write-html ] curry html-word define-close ; + dup [ write-html ] curry html-word ; : [ "<" % % "/>" % ] "" make ; : def-for-html-word- ( name -- ) #! Return the name and code for the patterned #! word. - dup swap [ write-html ] curry html-word drop ; + dup swap [ write-html ] curry html-word ; : foo/> "/>" append ; : def-for-html-word-foo/> ( name -- ) #! Return the name and code for the foo/> patterned #! word. - foo/> [ "/>" write-html ] html-word define-close ; + foo/> [ "/>" write-html ] html-word ; : define-closed-html-word ( name -- ) #! Given an HTML tag name, define the words for