[cl-l10n-cvs] CVS update: cl-l10n/ChangeLog cl-l10n/load-locale.lisp cl-l10n/printers.lisp

Sean Ross sross at common-lisp.net
Wed May 25 09:30:54 UTC 2005


Update of /project/cl-l10n/cvsroot/cl-l10n
In directory common-lisp.net:/tmp/cvs-serv12691

Modified Files:
	ChangeLog load-locale.lisp printers.lisp 
Log Message:
Changelog 2005-05-25
Date: Wed May 25 11:30:51 2005
Author: sross

Index: cl-l10n/ChangeLog
diff -u cl-l10n/ChangeLog:1.17 cl-l10n/ChangeLog:1.18
--- cl-l10n/ChangeLog:1.17	Wed May 18 17:34:07 2005
+++ cl-l10n/ChangeLog	Wed May 25 11:30:51 2005
@@ -1,3 +1,7 @@
+2005-05-25 Sean Ross	<sross at common-lisp.net>
+	* locales/ar_SA: revert.
+	* load-locale.lisp, printers.lisp: Added support for the .1 in the ar_SA locale.
+	
 2005-05-18 Sean Ross	<sross at common-lisp.net>
 	load-all-locales now works.
 	* cl-l10n.asd: Added dependency to cl-fad
@@ -9,7 +13,7 @@
 	now "%d<U0020>" parses correctly.
 	* utils.lisp: Removed awhen, awhile.
 	* printers.lisp: Added a check for #\E in date printing.
-	* locales/ar_SA: This locales ha(s/d) a .1 in front of
+	* locales/ar_SA: This locale has a .1 in front of
 	various time printing directives. I have no idea what these
 	mean....
 	


Index: cl-l10n/load-locale.lisp
diff -u cl-l10n/load-locale.lisp:1.13 cl-l10n/load-locale.lisp:1.14
--- cl-l10n/load-locale.lisp:1.13	Wed May 18 17:34:08 2005
+++ cl-l10n/load-locale.lisp	Wed May 25 11:30:51 2005
@@ -172,9 +172,13 @@
 (defun compute-order (fmt)
   (let ((res nil))
     (loop for char across fmt 
-          with perc = nil do
+          with perc = nil 
+          with in-dot = nil do
           (cond ((char= char #\%) (setf perc (not perc)))
                 ((member char date-dividers) nil)
+                ((and perc (char= char #\.))  (setf in-dot t))
+                ((and perc in-dot (char= char #\1))  
+                 (setf in-dot nil))
                 (perc (unless (char= char #\E)
                         ;; some locales (eg lo_LA) have this funny E before
                         ;; various time format designators. Debian 


Index: cl-l10n/printers.lisp
diff -u cl-l10n/printers.lisp:1.15 cl-l10n/printers.lisp:1.16
--- cl-l10n/printers.lisp:1.15	Wed May 18 17:34:08 2005
+++ cl-l10n/printers.lisp	Wed May 25 11:30:51 2005
@@ -328,13 +328,18 @@
   (declare (optimize speed) (type simple-string fmt-string))
   (let ((values (multiple-value-list (decode-universal-time ut *time-zone*))))
     (loop for x across fmt-string 
-          with perc = nil do
+          with perc = nil 
+          with in-dot = nil do
           (case x 
             (#\% (if perc 
                      (progn (princ #\% stream) (setf perc nil))
                      (setf perc t)))
             ;; see compute-order in load-locale.lisp
             ;; for why this line is here.
+            (#\. (if perc (setf in-dot t) (princ x stream)))
+            (#\1 (if (and perc in-dot) 
+                     (setf in-dot nil)
+                     (princ x stream)))
             (#\E (unless perc (princ x stream)))
             (t (if perc
                    (progn (apply (the function (lookup-formatter x))




More information about the Cl-l10n-cvs mailing list