Include window.h.
[bpt/emacs.git] / lisp / ps-mule.el
index 6510694..1ba8f86 100644 (file)
@@ -1,7 +1,7 @@
 ;;; ps-mule.el --- provide multi-byte character facility to ps-print
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
 ;;     Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
@@ -24,8 +24,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -639,11 +639,6 @@ The generated code is inserted on prologue part."
     (ps-output-prologue (format "/EscChar %d def\n" ps-mule-esc-char))
     (setq ps-mule-prologue-generated t)))
 
-(defsubst ps-mule-eight-bit-char (byte)
-  (if (< byte 128)
-      byte
-    (decode-char 'eight-bit byte)))
-
 (defun ps-mule-encode-region (from to font-spec-table)
   "Generate PostScript code for plotting characters in the region FROM and TO.
 
@@ -683,10 +678,10 @@ f0, f1, f2, f3, h0, h1, and H0 respectively."
            (aset str i char)
          (let* ((code (ps-mule-encode-char char font-spec)))
            (if (= (ps-mule-font-spec-bytes font-spec) 1)
-               (aset str i (ps-mule-eight-bit-char code))
-             (aset str i (ps-mule-eight-bit-char (/ code 256)))
+               (aset str i code)
+             (aset str i (/ code 256))
              (setq i (1+ i))
-             (aset str i (ps-mule-eight-bit-char (% code 256))))))
+             (aset str i (% code 256)))))
        (setq i (1+ i))
        (forward-char 1)))
     (nreverse (cons (substring str 0 i) string-list))))
@@ -716,13 +711,13 @@ f0, f1, f2, f3, h0, h1, and H0 respectively."
                 (font-id (ps-mule-font-spec-font-id font-spec))
                 (str (make-string (if (= font-id 0) 1 (+ 2 bytes)) 0)))
            (if (= font-id 0)
-               (aset str 0 (ps-mule-eight-bit-char code))
+               (aset str 0 code)
              (aset str 0 ps-mule-esc-char)
-             (aset str 1 (ps-mule-eight-bit-char font-id))
+             (aset str 1 font-id)
              (if (= bytes 1)
-                 (aset str 2 (ps-mule-eight-bit-char code))
-               (aset str 2 (ps-mule-eight-bit-char (/ code 256)))
-               (aset str 3 (ps-mule-eight-bit-char (% code 256)))))
+                 (aset str 2 code)
+               (aset str 2 (/ code 256))
+               (aset str 3 (% code 256))))
            (ps-output "[")
            (ps-output-string str)
            (ps-output (if (eq (ps-mule-font-spec-src font-spec) 'bdf)