[Openmcl-cvs-notifications] r10275 - /trunk/source/level-1/l1-application.lisp
gb at clozure.com
gb at clozure.com
Sat Aug 2 18:01:31 EDT 2008
Author: gb
Date: Sat Aug 2 18:01:31 2008
New Revision: 10275
Log:
Try to be more careful when parsing the -K (terminal encoding) option;
only set *TERMINAL-CHARACTER-ENCODING-NAME* of the option's value
names a known encoding. Todo: provide some way of specifying
line termination, which might matter on Windows.
Once the option's parsed, call SET-TERMINAL-ENCODING; assume that
streams have been initialized much earlier in the startup process.
Modified:
trunk/source/level-1/l1-application.lisp
Modified: trunk/source/level-1/l1-application.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-1/l1-application.lisp (original)
+++ trunk/source/level-1/l1-application.lisp Sat Aug 2 18:01:31 2008
@@ -149,11 +149,15 @@
(fd-write 1 s (%cstrlen s)))
(#_ _exit 0))
(let* ((encoding (assoc :terminal-encoding opts)))
- (if encoding
- (setq *terminal-character-encoding-name*
- (if (cdr encoding)
+ (when (cdr encoding)
+ (let* ((encoding-name
(let* ((*package* (find-package "KEYWORD")))
- (ignore-errors (read-from-string (cdr encoding))))))=
))))
+ (ignore-errors (read-from-string (cdr encoding))))))
+ (when encoding-name
+ (let* ((character-encoding (lookup-character-encoding enco=
ding-name)))
+ (when character-encoding
+ (setq *terminal-character-encoding-name*
+ (character-encoding-name character-encoding)))))=
)))))
(%usage-exit
(format nil
(case error-flag
@@ -177,7 +181,9 @@
(parse-application-arguments a)
(setq *unprocessed-command-line-arguments* rest-arg)
(process-application-arguments a error-flag options args)
- (initialize-interactive-streams)))
+ (let* ((encoding (lookup-character-encoding *terminal-character-encodi=
ng-name*)))
+ (when encoding
+ (set-terminal-encoding (character-encoding-name encoding))))))
=
(defmethod application-version-string ((a application))
"Return a string which (arbitrarily) represents the application version.
More information about the Openmcl-cvs-notifications
mailing list