1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: General tools
6 ;;; --------------------------------------------------------------------------
8 ;;; (C) 2010 Philippe Brochard <hocwp@free.fr>
10 ;;; This program is free software; you can redistribute it and/or modify
11 ;;; it under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or
13 ;;; (at your option) any later version.
15 ;;; This program is distributed in the hope that it will be useful,
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with this program; if not, write to the Free Software
22 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 ;;; --------------------------------------------------------------------------
27 (in-package :common-lisp-user
)
52 :with-all-internal-symbols
53 :export-all-functions
:export-all-variables
54 :export-all-functions-and-variables
58 :is-config-p
:config-documentation
:config-group
88 :get-command-line-words
91 :string-to-list-multichar
101 :parse-integer-in-list
103 :next-in-list
:prev-in-list
114 (setq *random-state
* (make-random-state t
))
119 (defmacro awhen
(test &body body
)
124 (defmacro aif
(test then
&optional else
)
125 `(let ((it ,test
)) (if it
,then
,else
)))
128 (defun find-in-hash (val hashtable
&optional
(test #'equal
))
129 "Return the key associated to val in the hashtable"
130 (maphash #'(lambda (k v
)
131 (when (and (consp v
) (funcall test
(first v
) val
))
132 (return-from find-in-hash
(values k v
))))
136 (defun nfuncall (function)
140 (defun pfuncall (function &rest args
)
142 (or (functionp function
)
143 (and (symbolp function
) (fboundp function
))))
144 (apply function args
)))
147 (defun symbol-search (search symbol
)
148 "Search the string 'search' in the symbol name of 'symbol'"
149 (search search
(symbol-name symbol
) :test
#'string-equal
))
151 (eval-when (:compile-toplevel
:load-toplevel
:execute
)
152 (defun mkstr (&rest args
)
153 (with-output-to-string (s)
157 (defun symb (&rest args
)
158 (values (intern (apply #'mkstr args
)))))
164 (defun call-hook (hook &optional args
)
165 "Call a hook (a function, a symbol or a list of functions)
166 Return the result of the last hook"
171 (cons (dolist (h hook
)
173 (t (setf result
(apply hook args
)))))))
178 (defmacro add-hook
(hook &rest value
)
179 `(setf ,hook
(append (typecase ,hook
184 (defmacro remove-hook
(hook &rest value
)
186 `(dolist (,i
(list ,@value
))
187 (setf ,hook
(remove ,i
,hook
)))))
193 (defparameter *timer-list
* nil
)
195 (declaim (inline realtime-
>s s-
>realtime
))
197 (defun realtime->s
(rtime)
198 (float (/ rtime internal-time-units-per-second
)))
200 (defun s->realtime
(second)
201 (round (* second internal-time-units-per-second
)))
204 (defun clear-timers ()
205 (setf *timer-list
* nil
))
207 (defun add-timer (delay fun
&optional
(id (gensym)))
208 "Start the function fun at delay seconds."
210 (let ((time (+ (get-internal-real-time) (s->realtime delay
))))
212 (when (>= (get-internal-real-time) time
)
218 (defun at (delay fun
&optional
(id (gensym)))
219 "Start the function fun at delay seconds."
220 (funcall #'add-timer delay fun id
))
222 (defmacro with-timer
((delay &optional
(id (gensym))) &body body
)
223 "Same thing as add-timer but with syntaxic sugar"
230 (defun process-timers ()
231 "Call each timers in *timer-list* if needed"
232 (dolist (timer *timer-list
*)
233 (when (funcall (second timer
))
234 (setf *timer-list
* (remove timer
*timer-list
* :test
#'equal
)))))
236 (defun erase-timer (id)
237 "Erase the timer identified by its id"
238 (dolist (timer *timer-list
*)
239 (when (equal id
(first timer
))
240 (setf *timer-list
* (remove timer
*timer-list
* :test
#'equal
)))))
242 (defun timer-test-loop ()
244 (princ ".") (force-output)
250 ;; (erase-timer :toto))
254 ;; (add-timer 5 #'toto :toto))
256 ;;(add-timer 5 #'toto :toto)
257 ;;(add-timer 30 #'plop)
266 (defvar *%dbg-name%
* "dbg")
267 (defvar *%dbg-count%
* 0)
270 (defmacro dbg
(&rest forms
)
272 ,@(mapcar #'(lambda (form)
274 (string `(setf *%dbg-name%
* ,form
))
275 (number `(setf *%dbg-count%
* ,form
))))
277 (format t
"~&DEBUG[~A - ~A] " (incf *%dbg-count%
*) *%dbg-name%
*)
278 ,@(mapcar #'(lambda (form)
280 ((or string number
) nil
)
281 (t `(format t
"~A=~S " ',form
,form
))))
287 (defmacro dbgnl
(&rest forms
)
289 ,@(mapcar #'(lambda (form)
291 (string `(setf *%dbg-name%
* ,form
))
292 (number `(setf *%dbg-count%
* ,form
))))
294 (format t
"~&DEBUG[~A - ~A] --------------------~%" (incf *%dbg-count%
*) *%dbg-name%
*)
295 ,@(mapcar #'(lambda (form)
297 ((or string number
) nil
)
298 (t `(format t
" - ~A=~S~%" ',form
,form
))))
304 (defun dbgc (obj &optional newline
)
313 (defmacro with-all-internal-symbols
((var package
) &body body
)
314 "Bind symbol to all internal symbols in package"
315 `(do-symbols (,var
,package
)
316 (multiple-value-bind (sym status
)
317 (find-symbol (symbol-name ,var
) ,package
)
318 (declare (ignore sym
))
319 (when (eql status
:internal
)
323 (defun export-all-functions (package &optional
(verbose nil
))
324 (with-all-internal-symbols (symbol package
)
325 (when (fboundp symbol
)
327 (format t
"Exporting ~S~%" symbol
))
328 (export symbol package
))))
331 (defun export-all-variables (package &optional
(verbose nil
))
332 (with-all-internal-symbols (symbol package
)
333 (when (boundp symbol
)
335 (format t
"Exporting ~S~%" symbol
))
336 (export symbol package
))))
338 (defun export-all-functions-and-variables (package &optional
(verbose nil
))
339 (with-all-internal-symbols (symbol package
)
340 (when (or (fboundp symbol
) (boundp symbol
))
342 (format t
"Exporting ~S~%" symbol
))
343 (export symbol package
))))
347 (defun ensure-function (object)
348 (if (functionp object
)
350 (symbol-function object
)))
355 (defun empty-string-p (string)
359 (defun find-common-string (string list
&optional orig
)
360 "Return the string in common in all string in list"
362 (let ((result (remove-if-not (lambda (x)
363 (zerop (or (search string x
:test
#'string-equal
) -
1)))
365 (if (= (length result
) (length list
))
366 (if (> (length (first list
)) (length string
))
367 (find-common-string (subseq (first list
) 0 (1+ (length string
))) list string
)
374 ;;; Auto configuration tools
375 ;;; Syntaxe: (defparameter symbol value "Config(config group): documentation string")
376 (let* ((start-string "Config(")
377 (start-len (length start-string
))
379 (stop-len (length stop-string
)))
380 (defun is-config-p (symbol)
381 (when (boundp symbol
)
382 (let ((doc (documentation symbol
'variable
)))
384 (= (or (search start-string doc
:test
#'string-equal
) -
1) 0)
385 (search stop-string doc
)
388 (defun config-documentation (symbol)
389 (when (is-config-p symbol
)
390 (let ((doc (documentation symbol
'variable
)))
391 (string-trim " " (subseq doc
(+ (search stop-string doc
) stop-len
))))))
393 (defun config-group (symbol)
394 (when (is-config-p symbol
)
395 (let* ((doc (documentation symbol
'variable
))
396 (group (string-trim " " (subseq doc
(+ (search start-string doc
) start-len
)
397 (search stop-string doc
)))))
398 (if (empty-string-p group
) "Miscellaneous group" group
)))))
404 (defmacro setf
/= (var val
)
405 "Set var to val only when var not equal to val"
406 (let ((gval (gensym)))
408 (when (/= ,var
,gval
)
409 (setf ,var
,gval
)))))
414 (defun create-symbol (&rest names
)
415 "Return a new symbol from names"
416 (intern (string-upcase (apply #'concatenate
'string names
))))
418 (defun number->char
(number)
420 (code-char (+ (char-code #\a) number
))
423 (defun simple-type-of (object)
424 (let ((type (type-of object
)))
431 (defun nth-insert (n elem list
)
432 "Insert elem in (nth n list)"
433 (nconc (subseq list
0 n
)
439 (defun split-string (string &optional
(separator #\Space
))
440 "Return a list from a string splited at each separators"
441 (loop for i
= 0 then
(1+ j
)
442 as j
= (position separator string
:start i
)
443 as sub
= (subseq string i j
)
444 unless
(string= sub
"") collect sub
448 (defun append-newline-space (string)
449 "Append spaces before Newline on each line"
450 (with-output-to-string (stream)
451 (loop for c across string do
452 (when (equal c
#\Newline
)
457 (defun expand-newline (list)
458 "Expand all newline in strings in list"
461 (setf acc
(append acc
(split-string l
#\Newline
))))
464 (defun ensure-list (object)
465 "Ensure an object is a list"
471 (defun ensure-printable (string &optional
(new #\?))
472 "Ensure a string is printable in ascii"
473 (or (substitute-if-not new
#'standard-char-p
(or string
"")) ""))
475 (defun limit-length (string &optional
(length 10))
476 (subseq string
0 (min (length string
) length
)))
479 (defun ensure-n-elems (list n
)
480 "Ensure that list has exactly n elements"
481 (let ((length (length list
)))
482 (cond ((= length n
) list
)
483 ((< length n
) (ensure-n-elems (append list
'(nil)) n
))
484 ((> length n
) (ensure-n-elems (butlast list
) n
)))))
486 (defun begin-with-2-spaces (string)
487 (and (> (length string
) 1)
488 (eql (char string
0) #\Space
)
489 (eql (char string
1) #\Space
)))
491 (defun string-equal-p (x y
)
492 (when (stringp y
) (string-equal x y
)))
497 (defun find-assoc-word (word line
&optional
(delim #\"))
499 (let* ((pos (search word line
))
500 (pos-1 (position delim line
:start
(or pos
0)))
501 (pos-2 (position delim line
:start
(1+ (or pos-1
0)))))
502 (when (and pos pos-1 pos-2
)
503 (subseq line
(1+ pos-1
) pos-2
))))
506 (defun print-space (n &optional
(stream *standard-output
*))
507 "Print n spaces on stream"
509 (princ #\Space stream
)))
512 (defun escape-string (string &optional
(escaper '(#\
/ #\
: #\
) #\
( #\Space
#\
; #\,)) (char #\_))
513 "Replace in string all characters found in the escaper list"
515 (escape-string (substitute char
(car escaper
) string
) (cdr escaper
) char
)
520 (defun first-position (word string
)
521 "Return true only if word is at position 0 in string"
522 (zerop (or (search word string
) -
1)))
525 (defun find-free-number (l) ; stolen from stumpwm - thanks
526 "Return a number that is not in the list l."
527 (let* ((nums (sort l
#'<))
528 (new-num (loop for n from
0 to
(or (car (last nums
)) 0)
534 ;; there was no space between the numbers, so use the last + 1
535 (if (car (last nums
))
536 (1+ (car (last nums
)))
543 ;;; Shell part (taken from ltk)
544 (defun do-execute (program args
&optional
(wt nil
) (io :stream
))
545 "execute program with args a list containing the arguments passed to
546 the program if wt is non-nil, the function will wait for the execution
547 of the program to return.
548 returns a two way stream connected to stdin/stdout of the program"
549 #-CLISP
(declare (ignore io
))
550 (let ((fullstring program
))
552 (setf fullstring
(concatenate 'string fullstring
" " a
)))
553 #+:cmu
(let ((proc (ext:run-program program args
:input
:stream
:output
:stream
:wait wt
)))
555 (error "Cannot create process."))
557 (ext:process-output proc
)
558 (ext:process-input proc
)))
559 #+:clisp
(ext:run-program program
:arguments args
:input io
:output io
:wait wt
)
560 #+:sbcl
(let ((proc (sb-ext:run-program program args
:input
:stream
:output
:stream
:wait wt
)))
562 (error "Cannot create process."))
564 (sb-ext:process-output proc
)
565 (sb-ext:process-input proc
)))
566 #+:lispworks
(system:open-pipe fullstring
:direction
:io
)
567 #+:allegro
(let ((proc (excl:run-shell-command
568 (apply #'vector program program args
)
569 :input
:stream
:output
:stream
:wait wt
)))
571 (error "Cannot create process."))
573 #+:ecl
(ext:run-program program args
:input
:stream
:output
:stream
575 #+:openmcl
(let ((proc (ccl:run-program program args
:input
579 (error "Cannot create process."))
581 (ccl:external-process-output-stream proc
)
582 (ccl:external-process-input-stream proc
)))))
584 (defun do-shell (program &optional args
(wait nil
) (io :stream
))
585 (do-execute "/bin/sh" `("-c" ,program
,@args
) wait io
))
593 "Return the value of the environment variable."
594 #+allegro
(sys::getenv
(string var
))
595 #+clisp
(ext:getenv
(string var
))
597 (cdr (assoc (string var
) ext
:*environment-list
* :test
#'equalp
599 #+gcl
(si:getenv
(string var
))
600 #+lispworks
(lw:environment-variable
(string var
))
601 #+lucid
(lcl:environment-variable
(string var
))
602 #+(or mcl ccl
) (ccl::getenv var
)
603 #+sbcl
(sb-posix:getenv
(string var
))
604 #+ecl
(si:getenv
(string var
))
605 #-
(or allegro clisp cmu gcl lispworks lucid mcl sbcl scl ecl ccl
)
606 (error 'not-implemented
:proc
(list 'getenv var
)))
609 (defun (setf getenv
) (val var
)
610 "Set an environment variable."
611 #+allegro
(setf (sys::getenv
(string var
)) (string val
))
612 #+clisp
(setf (ext:getenv
(string var
)) (string val
))
614 (let ((cell (assoc (string var
) ext
:*environment-list
* :test
#'equalp
617 (setf (cdr cell
) (string val
))
618 (push (cons (intern (string var
) "KEYWORD") (string val
))
619 ext
:*environment-list
*)))
620 #+gcl
(si:setenv
(string var
) (string val
))
621 #+lispworks
(setf (lw:environment-variable
(string var
)) (string val
))
622 #+lucid
(setf (lcl:environment-variable
(string var
)) (string val
))
623 #+sbcl
(sb-posix:putenv
(format nil
"~A=~A" (string var
) (string val
)))
624 #+ecl
(si:setenv
(string var
) (string val
))
625 #+ccl
(ccl::setenv
(string var
) (string val
))
626 #-
(or allegro clisp cmu gcl lispworks lucid sbcl scl ecl ccl
)
627 (error 'not-implemented
:proc
(list '(setf getenv
) var
)))
636 #+(or clisp cmu
) (ext:quit
)
640 #+lispworks
(lw:quit
)
641 #+(or allegro-cl allegro-cl-trial
) (excl:exit
)
647 (defun remove-plist (plist &rest keys
)
648 "Remove the keys from the plist.
649 Useful for re-using the &REST arg after removing some options."
651 ((null (setq rest
(nth-value 2 (get-properties plist keys
))))
652 (nreconc copy plist
))
653 (do () ((eq plist rest
))
654 (push (pop plist
) copy
)
655 (push (pop plist
) copy
))
656 (setq plist
(cddr plist
))))
661 (defun urun-prog (prog &rest opts
&key args
(wait t
) &allow-other-keys
)
662 "Common interface to shell. Does not return anything useful."
663 #+gcl
(declare (ignore wait
))
664 (setq opts
(remove-plist opts
:args
:wait
))
665 #+allegro
(apply #'excl
:run-shell-command
(apply #'vector prog prog args
)
667 #+(and clisp lisp
=cl
)
668 (apply #'ext
:run-program prog
:arguments args
:wait wait opts
)
669 #+(and clisp
(not lisp
=cl
))
671 (apply #'lisp
:run-program prog
:arguments args opts
)
672 (lisp:shell
(format nil
"~a~{ '~a'~} &" prog args
)))
673 #+cmu
(apply #'ext
:run-program prog args
:wait wait
:output
*standard-output
* opts
)
674 #+gcl
(apply #'si
:run-process prog args
)
675 #+liquid
(apply #'lcl
:run-program prog args
)
676 #+lispworks
(apply #'sys
::call-system-showing-output
677 (format nil
"~a~{ '~a'~}~@[ &~]" prog args
(not wait
))
679 #+lucid
(apply #'lcl
:run-program prog
:wait wait
:arguments args opts
)
680 #+sbcl
(apply #'sb-ext
:run-program prog args
:wait wait
:output
*standard-output
* opts
)
681 #+ecl
(apply #'ext
:run-program prog args opts
)
682 #+ccl
(apply #'ccl
:run-program prog args opts
:wait wait
)
683 #-
(or allegro clisp cmu gcl liquid lispworks lucid sbcl ecl ccl
)
684 (error 'not-implemented
:proc
(list 'run-prog prog opts
)))
687 ;;(defparameter *shell-cmd* "/usr/bin/env")
688 ;;(defparameter *shell-cmd-opt* nil)
690 #+UNIX
(defparameter *shell-cmd
* "/bin/sh")
691 #+UNIX
(defparameter *shell-cmd-opt
* '("-c"))
693 #+WIN32
(defparameter *shell-cmd
* "cmd.exe")
694 #+WIN32
(defparameter *shell-cmd-opt
* '("/C"))
697 (defun ushell (&rest strings
)
698 (urun-prog *shell-cmd
* :args
(append *shell-cmd-opt
* strings
)))
701 (urun-prog *shell-cmd
* :args
(append *shell-cmd-opt
* (list string
))))
704 (defun set-shell-dispatch (&optional
(shell-fun 'ushell
))
705 (labels ((|shell-reader|
(stream subchar arg
)
706 (declare (ignore subchar arg
))
707 (list shell-fun
(read stream t nil t
))))
708 (set-dispatch-macro-character #\
# #\
# #'|shell-reader|
)))
711 (defun ushell-loop (&optional
(shell-fun #'ushell
))
713 (format t
"UNI-SHELL> ")
714 (let* ((line (read-line)))
715 (cond ((zerop (or (search "quit" line
) -
1)) (return))
716 ((zerop (or (position #\
! line
) -
1))
717 (funcall shell-fun
(subseq line
1)))
718 (t (format t
"~{~A~^ ;~%~}~%"
720 (ignore-errors (eval (read-from-string line
))))))))))
727 (defun cldebug (&rest rest
)
734 (defun get-command-line-words ()
735 #+sbcl
(cdr sb-ext
:*posix-argv
*)
736 #+(or clozure ccl
) (cddddr (ccl::command-line-arguments
))
737 #+gcl
(cdr si
:*command-args
*)
738 #+ecl
(loop for i from
1 below
(si:argc
) collect
(si:argv i
))
739 #+cmu
(cdddr extensions
:*command-line-strings
*)
740 #+allegro
(cdr (sys:command-line-arguments
))
741 #+lispworks
(cdr sys
:*line-arguments-list
*)
743 #-
(or sbcl clozure gcl ecl cmu allegro lispworks clisp
)
744 (error "get-command-line-arguments not supported for your implementation"))
749 (defun string-to-list (str &key
(split-char #\space
))
750 (do* ((start 0 (1+ index
))
751 (index (position split-char str
:start start
)
752 (position split-char str
:start start
))
755 (unless (string= (subseq str start
) "")
756 (push (subseq str start
) accum
))
758 (when (/= start index
)
759 (push (subseq str start index
) accum
))))
762 (defun near-position (chars str
&key
(start 0))
763 (do* ((char chars
(cdr char
))
764 (pos (position (car char
) str
:start start
)
765 (position (car char
) str
:start start
))
777 ;;;(defun near-position2 (chars str &key (start 0))
778 ;;; (loop for i in chars
779 ;;; minimize (position i str :start start)))
781 ;;(format t "~S~%" (near-position '(#\! #\. #\Space #\;) "klmsqk ppii;dsdsqkl.jldfksj lkm" :start 0))
782 ;;(format t "~S~%" (near-position '(#\Space) "klmsqk ppii;dsdsqkl.jldfksj lkm" :start 0))
783 ;;(format t "~S~%" (near-position '(#\; #\l #\m) "klmsqk ppii;dsdsqkl.jldfksj lkm" :start 0))
784 ;;(format t "result=~S~%" (string-to-list-multichar "klmsqk ppii;dsdsqkl.jldfksj lkm" :preserve t))
785 ;;(format t "result=~S~%" (string-to-list-multichar "klmsqk ppii;dsd!sqkl.jldfksj lkm"
786 ;; :split-chars '(#\k #\! #\. #\; #\m)
790 (defun string-to-list-multichar (str &key
(split-chars '(#\space
)) (preserve nil
))
791 (do* ((start 0 (1+ index
))
792 (index (near-position split-chars str
:start start
)
793 (near-position split-chars str
:start start
))
796 (unless (string= (subseq str start
) "")
797 (push (subseq str start
) accum
))
799 (let ((retstr (subseq str start
(if preserve
(1+ index
) index
))))
800 (unless (string= retstr
"")
801 (push retstr accum
)))))
807 (defun list-to-string (lst)
808 (string-trim " () " (format nil
"~A" lst
)))
812 (defun clean-string (string)
813 "Remove Newline and upcase string"
815 (string-right-trim '(#\Newline
) string
)))
817 (defun one-in-list (lst)
818 (nth (random (length lst
)) lst
))
820 (defun exchange-one-in-list (lst1 lst2
)
821 (let ((elem1 (one-in-list lst1
))
822 (elem2 (one-in-list lst2
)))
823 (setf lst1
(append (remove elem1 lst1
) (list elem2
)))
824 (setf lst2
(append (remove elem2 lst2
) (list elem1
)))
828 (defun rotate-list (list)
830 (append (cdr list
) (list (car list
)))))
832 (defun anti-rotate-list (list)
834 (append (last list
) (butlast list
))))
837 (defun append-formated-list (base-str
839 &key
(test-not-fun #'(lambda (x) x nil
))
840 (print-fun #'(lambda (x) x
))
842 (let ((str base-str
) (first t
))
844 (cond ((funcall test-not-fun i
) nil
)
846 (concatenate 'string str
849 (funcall print-fun i
))))
851 (if (string= base-str str
)
852 (concatenate 'string str default-str
) str
)))
855 (defun shuffle-list (list &key
(time 1))
856 "Shuffle a list by swapping elements time times"
857 (let ((result (copy-list list
))
858 (ind1 0) (ind2 0) (swap 0))
860 (setf ind1
(random (length result
)))
861 (setf ind2
(random (length result
)))
863 (setf swap
(nth ind1 result
))
864 (setf (nth ind1 result
) (nth ind2 result
))
865 (setf (nth ind2 result
) swap
))
870 (defun convert-to-number (str)
871 (cond ((stringp str
) (parse-integer str
:junk-allowed t
))
872 ((numberp str
) str
)))
874 (defun parse-integer-in-list (lst)
875 "Convert all integer string in lst to integer"
876 (mapcar #'(lambda (x) (convert-to-number x
)) lst
))
880 (defun next-in-list (item lst
)
881 (do ((x lst
(cdr x
)))
883 (when (equal item
(car x
))
884 (return (if (cadr x
) (cadr x
) (car lst
))))))
886 (defun prev-in-list (item lst
)
887 (next-in-list item
(reverse lst
)))
890 (let ((jours '("Lundi" "Mardi" "Mercredi" "Jeudi" "Vendredi" "Samedi" "Dimanche"))
891 (mois '("Janvier" "Fevrier" "Mars" "Avril" "Mai" "Juin" "Juillet"
892 "Aout" "Septembre" "Octobre" "Novembre" "Decembre"))
893 (days '("Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday"))
894 (months '("January" "February" "March" "April" "May" "June" "July"
895 "August" "September" "October" "November" "December")))
896 (defun date-string ()
897 (multiple-value-bind (second minute hour date month year day
)
899 (if (search "fr" (getenv "LANG") :test
#'string-equal
)
900 (format nil
" ~2,'0D:~2,'0D:~2,'0D ~A ~2,'0D ~A ~A "
902 (nth day jours
) date
(nth (1- month
) mois
) year
)
903 (format nil
" ~2,'0D:~2,'0D:~2,'0D ~A ~A ~2,'0D ~A "
905 (nth day days
) (nth (1- month
) months
) date year
)))))