Revision Log
*** empty log message ***
;; --------- ;;
;; han2zen.l ;;
;; --------- ;;
(defun hankaku->zenkaku-sub (code)
(setq code (+ code code))
(substring
"¡¡¡ª¡É¡ô¡ð¡ó¡õ¡Ç¡Ê¡Ë¡ö¡Ü¡¤¡Ý¡¥¡¿£°£±£²£³£´£µ£¶£·£¸£¹¡§¡¨¡ã¡á¡ä¡©¡÷£Á£Â£Ã£Ä£Å£Æ£Ç£È£É£Ê£Ë£Ì£Í£Î£Ï£Ð£Ñ£Ò£Ó£Ô£Õ£Ö£×£Ø£Ù£Ú¡Î¡ï¡Ï¡°¡²£à£á£â£ã£ä£å£æ£ç£è£é£ê£ë£ì£í£î£ï£ð£ñ£ò£ó£ô£õ£ö£÷£ø£ù£ú¡Ð¡Ã¡Ñ¡±"
(- code 64)
(- code 62)))
(defun zenkaku-string (str)
(let ((len (string-length str))
(ret ""))
(do ((i 0 (1+ i)))
((>= i len) ret)
(setq ret
(string-append ret
(cond ((= (logand (sref str i) 128) 128)
(setq i (1+ i))
(substring str (1- i) (1+ i)))
(t
(hankaku->zenkaku-sub (sref str i)))))))))
(defun num->string (num)
(lets ((string (make-string 256))
(stream (string-stream string))
(standard-output (outopen stream)))
(princ num)
(substring string 0 (string-stream-index standard-output))))
|
ktanaka Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |