~ubuntu-branches/ubuntu/feisty/wnn7egg/feisty

« back to all changes in this revision

Viewing changes to elisp/xemacs21/wnn7egg-comx21.el

  • Committer: Bazaar Package Importer
  • Author(s): ISHIKAWA Mutsumi
  • Date: 2004-09-22 17:39:30 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040922173930-pna2yuvlq63wxgc9
Tags: 1.02-5
update dolist macro confliction fix, thanks TSUCHIYA Masatoshi.
realy closes: #270839

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
;;; Commentary:
58
58
 
 
59
;;; 2002/5/16  XEmacs�ˤ����ƥ桼������Υ��饤�����ž�����Ǥ��ʤ�������б�
 
60
 
59
61
;;; Code:
60
62
 
61
63
 
85
87
          ((r0 = r1)
86
88
           (if (r1 < #x80)
87
89
               (write-read-repeat r0))
88
 
         (write-multibyte-character r4 r0)
89
 
         (read r0)
90
 
         (repeat))
 
90
           (write r4)
 
91
           (write-read-repeat r0))
91
92
        ((if (r1 > #x80)
92
 
           ((r0 &= #x7f)
93
 
            (r0 <<= 7)
94
 
            (r0 |= (r1 & #x7f))
95
 
            (write-multibyte-character r2 r0)
96
 
            (read r0)
97
 
            (repeat))
98
 
         ((r0 &= #x7f)
99
 
          (r0 <<= 7)
100
 
          (r0 |= r1)
101
 
          (write-multibyte-character r3 r0)
102
 
          (read r0)
103
 
          (repeat)))))))))
 
93
             ((write r2 r0)
 
94
              (r0 = r1)
 
95
              (write-read-repeat r0))
 
96
           ((write r3 r0)
 
97
            (r0 = (r1 | #x80))
 
98
            (write-read-repeat r0)))))))))
104
99
 
105
100
(define-ccl-program ccl-encode-fixed-euc-jp
106
101
  `(2
140
135
                             encode ,ccl-encode-fixed-euc-jp
141
136
                             mnemonic "WNN")))
142
137
 
143
 
;; Binary data
144
 
 
145
 
(if (not (coding-system-p 'egg-binary))
146
 
    (define-coding-system-alias 'egg-binary 'binary))
147
 
 
148
138
 
149
139
(defun comm-format-u32c (uint32c)
150
140
  (insert-char (logand (lsh (car uint32c) -8) 255) 1)
191
181
  (insert-char 0 1))
192
182
 
193
183
(defun comm-format-binary-data (s)
194
 
  (insert (encode-coding-string s 'egg-binary))
 
184
  (insert (encode-coding-string s 'binary))
 
185
  (save-excursion
 
186
    (goto-char (point-min))
 
187
    (wnn-perform-replace "\377" "\377\0"))
195
188
  (insert-char ?\377 2))
196
189
 
197
190
(defun comm-format-fixlen-string (s len)
327
320
      (comm-accept-process-output))
328
321
    (string-as-unibyte
329
322
     (decode-coding-string (buffer-substring start (- (point) 2))
330
 
                           'egg-binary))))
 
323
                           'binary))))
331
324
 
332
325
(defun comm-unpack-fixlen-string (len)
333
326
  (let (s)