picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 26d500b90eec912588142bea979c6bc477636e87
parent b6b39018b1a4ab8a3e129fb82d11b3adbe0a1b3d
Author: Alexander Burger <abu@software-lab.de>
Date:   Sat, 28 Jan 2012 13:32:03 +0100

'locale' optional arguments
Diffstat:
MCHANGES | 1+
Mdoc/refL.html | 4++--
Mersatz/lib.l | 7++++---
Mlib/misc.l | 7++++---
4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/CHANGES b/CHANGES @@ -1,4 +1,5 @@ * XXmmm12 picoLisp-3.0.10 + 'locale' optional arguments * 30dec11 picoLisp-3.0.9 Bash completion diff --git a/doc/refL.html b/doc/refL.html @@ -456,10 +456,10 @@ href="refI.html#intern">intern</a></code>. ... </code></pre> -<dt><a name="locale"><code>(locale 'sym1 'sym2 ['sym3])</code></a> +<dt><a name="locale"><code>(locale 'sym1 'sym2 ['sym ..])</code></a> <dd>Sets the current locale to that given by the country file <code>sym1</code> and the language file <code>sym2</code> (both located in the "loc/" directory), -and an optional application-specific directory <code>sym3</code>. The locale +and optional application-specific directories <code>sym</code>. The locale influences the language, and numerical, date and other formats. See also <code><a href="refU.html#*Uni">*Uni</a></code>, <code><a href="refD.html#datStr">datStr</a></code>, <code><a diff --git a/ersatz/lib.l b/ersatz/lib.l @@ -1,4 +1,4 @@ -# 03jan12abu +# 28jan12abu # (c) Software Lab. Alexander Burger (setq *OS (java (java "java.lang.System" "getProperty" "os.name"))) @@ -415,7 +415,7 @@ (de *DayFmt "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday") (de *MonFmt "January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December") -(de locale (Ctry Lang App) # "DE" "de" ["app/loc/"] +(de locale (Ctry Lang . @) # "DE" "de" ["app/loc/" ..] (load (if (setq *Ctry Ctry) (pack "@loc/" @ ".l") "@loc/NIL.l")) (ifn (setq *Lang Lang) (for S (idx '*Uni) @@ -424,7 +424,8 @@ (sort (make ("loc" (pack "@loc/" Lang)) - (and App ("loc" (pack App Lang))) ) ) + (while (args) + ("loc" (pack (next) Lang)) ) ) ) (balance '*Uni L T) (for S L (set (car (idx '*Uni S)) (val S)) ) ) ) ) diff --git a/lib/misc.l b/lib/misc.l @@ -1,4 +1,4 @@ -# 02jan12abu +# 28jan12abu # (c) Software Lab. Alexander Burger # *Allow *Tmp @@ -17,7 +17,7 @@ (de *DayFmt "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday") (de *MonFmt "January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December") -(de locale (Ctry Lang App) # "DE" "de" ["app/loc/"] +(de locale (Ctry Lang . @) # "DE" "de" ["app/loc/" ..] (load (if (setq *Ctry Ctry) (pack "@loc/" @ ".l") "@loc/NIL.l")) (ifn (setq *Lang Lang) (for S (idx '*Uni) @@ -26,7 +26,8 @@ (sort (make ("loc" (pack "@loc/" Lang)) - (and App ("loc" (pack App Lang))) ) ) + (while (args) + ("loc" (pack (next) Lang)) ) ) ) (balance '*Uni L T) (for S L (set (car (idx '*Uni S)) (val S)) ) ) ) )