Changeset 15328


Ignore:
Timestamp:
Apr 16, 2012, 5:34:17 PM (8 years ago)
Author:
rme
Message:

Define and export ccl:list-character-encodings. Use it
in ccl:describe-character-encodings.

Closes ticket:948.

Location:
trunk/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-unicode.lisp

    r15298 r15328  
    46974697  )
    46984698
     4699(defun list-character-encodings (&key include-aliases)
     4700  "Return a list of the names of supported character encodings."
     4701  (let ((names nil))
     4702    (maphash #'(lambda (name enc)
     4703                 (if (eq name (character-encoding-name enc))
     4704                   (push name names)
     4705                   (when include-aliases
     4706                     (push name names))))
     4707             *character-encodings*)
     4708    names))
     4709
    46994710(defun describe-character-encoding (name)
    47004711  (let* ((enc (lookup-character-encoding name)))
     
    47124723     
    47134724(defun describe-character-encodings ()
    4714   (let* ((names nil))
    4715     (maphash #'(lambda (name enc)
    4716                  (when (eq name (character-encoding-name enc))
    4717                    (push name names)))
    4718              *character-encodings*)
     4725  (let* ((names (list-character-encodings)))
    47194726    (dolist (name (sort names #'string<) (values))
    47204727      (describe-character-encoding name))))
  • trunk/source/lib/ccl-export-syms.lisp

    r15313 r15328  
    710710     character-encoding
    711711     define-character-encoding
     712     list-character-encodings
    712713     describe-character-encoding
    713714     describe-character-encodings
Note: See TracChangeset for help on using the changeset viewer.