X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=web-utils.lisp;h=f777f218b0dbf998cecd2f1db9153c4b35e9a065;hb=65fa5f1c69413c92a654784135d59ebdbf89966d;hp=2854064398afdf87367a32638eb8a6c3eae13367;hpb=64ab2587ad0923623832012abd1b8b2cf5a11a84;p=kmrcl.git diff --git a/web-utils.lisp b/web-utils.lisp index 2854064..f777f21 100644 --- a/web-utils.lisp +++ b/web-utils.lisp @@ -7,12 +7,13 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: web-utils.lisp,v 1.3 2002/10/09 14:24:47 kevin Exp $ +;;;; $Id: web-utils.lisp,v 1.8 2002/10/17 22:25:38 kevin Exp $ ;;;; -;;;; This file, part of Kmrcl, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; -;;;; Kmrcl users are granted the rights to distribute and use this software -;;;; as governed by the terms of the GNU General Public License. +;;;; KMRCL users are granted the rights to distribute and use this software +;;;; as governed by the terms of the Lisp Lesser GNU Public License +;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* (in-package :kmrcl) @@ -21,12 +22,22 @@ ;;; HTML/XML constants -(defvar *std-xml-header* - (format nil - "~%~%~%")) +(defvar *standard-xml-header* + #.(format nil "~%~%~%")) -(defun std-xml-header () - *std-xml-header*) +(defvar *standard-html-header* "") + +(defvar *standard-xhtml-header* + #.(format nil "~%")) + + +;;; User agent functions + +(defun user-agent-ie-p (agent) + "Takes a user-agent string and returns T for Internet Explorer." + (when (or (string-equal "Microsoft" (subseq agent 0 (length "Microsoft"))) + (string-equal "Internet Explore" (subseq agent 0 (length "Internet Explore")))) + t)) ;;; URL Functions @@ -46,4 +57,3 @@ (car var) "=" (cadr var) "&"))) vars))) ""))) -