Initial Commit
[packages] / xemacs-packages / mew / mew / mew-mule0.el
1 ;;; mew-mule0.el --- Environment of non-Mule for Mew
2
3 ;; Author:  Kazu Yamamoto <Kazu@Mew.org>
4 ;; Created: Mar 20, 1997
5 ;; Revised: Aug 30, 1999
6
7 ;;; Code:
8
9 (defconst mew-mule0-version "mew-mule0.el version 0.10")
10
11 ;; In the context of Mew, 'charset' means MIME charset.
12 ;; 'cs' means the internal representation of Emacs (was known as Mule).
13
14 ;;
15 ;; User CS definitions
16 ;;
17
18 (defvar mew-cs-dummy          nil)
19 (defvar mew-cs-binary         nil)
20 (defvar mew-cs-text-for-read  nil)
21 (defvar mew-cs-text-for-write nil)
22 (defvar mew-cs-autoconv       nil)
23 (defvar mew-cs-7bit           nil)
24 (defvar mew-cs-7bit-crlf      nil)
25
26 (defvar mew-cs-mime-trans     nil)
27 (defvar mew-cs-rfc822-trans   nil)
28 (defvar mew-cs-draft          nil)
29 (defvar mew-cs-scan           nil)
30 (defvar mew-cs-infile         nil)
31 (defvar mew-cs-outfile        nil)
32 (defvar mew-cs-virtual        nil)
33 (defvar mew-cs-pick           nil)
34
35 (defvar mew-cs-database
36   '(("us-ascii"      (0)   nil   "7bit"             nil "Q")
37     ("iso-8859-1"    (0 1) dummy "quoted-printable" nil "Q")))
38
39 ;;
40 ;; Leading characters
41 ;;
42
43 (defvar mew-lc-ascii 0)
44 (defvar mew-lc-kana  nil) ;; dummay
45
46 (defun mew-char-charset (char)
47   ())
48
49 ;;
50 ;; CS
51 ;;
52
53 (defun mew-find-cs-region (start end)
54   (let (ret)
55     (save-excursion
56       (goto-char beg)
57       (if (re-search-forward "[\000-\177]" end t)
58           (setq ret (cons 0 ret)))
59       (goto-char beg)
60       (if (re-search-forward "[\200-\377]" end t)
61           (setq ret (cons 1 ret))))
62     ret))
63
64 ;; to internal
65 (defmacro mew-cs-decode-region (beg end cs)
66   (` ()))
67
68 ;; to extenal
69 (defmacro mew-cs-encode-region (beg end cs)
70   (` ()))
71
72 ;; to internal
73 (defmacro mew-cs-decode-string (str cs)
74   (` (, str)))
75
76 ;; to external
77 (defmacro mew-cs-encode-string (str cs)
78   (` (, str)))
79
80 ;;
81 ;; Process environment
82 ;;
83
84 (defmacro mew-set-process-cs (pro from-pro to-pro)
85   (` ()))
86
87 (defmacro mew-plet (&rest body)
88   (` (let ((call-process-hook nil))
89        (,@ body))))
90
91 (defmacro mew-piolet (input output &rest body)
92   (` (let ((call-process-hook nil))
93        (,@ body))))
94
95 (defmacro mew-pioalet (input output arg &rest body)
96   (` (let ((call-process-hook nil))
97        (,@ body))))
98
99 (defmacro mew-flet (&rest body)
100   (` (let (jam-zcat-filename-list
101            jka-compr-compression-info-list)
102        (,@ body))))
103
104 (defmacro mew-frwlet (read write &rest body)
105   (` (let (jam-zcat-filename-list
106            jka-compr-compression-info-list)
107        (,@ body))))
108
109 ;;
110 ;; Post conversion
111 ;;
112
113 (defmacro mew-cs-post-conv (cs)
114   (` ()))
115
116 ;;
117 ;;
118 ;;
119
120 (fset 'mew-aref (symbol-function 'aref))
121 (defmacro mew-charlen (c) (` 1))
122
123 ;;
124 ;;
125 ;;
126
127 (require 'mew-mule)
128 (provide 'mew-mule0)
129
130 ;;; Copyright Notice:
131
132 ;; Copyright (C) 1997, 1998, 1999 Mew developing team.
133 ;; All rights reserved.
134
135 ;; Redistribution and use in source and binary forms, with or without
136 ;; modification, are permitted provided that the following conditions
137 ;; are met:
138 ;; 
139 ;; 1. Redistributions of source code must retain the above copyright
140 ;;    notice, this list of conditions and the following disclaimer.
141 ;; 2. Redistributions in binary form must reproduce the above copyright
142 ;;    notice, this list of conditions and the following disclaimer in the
143 ;;    documentation and/or other materials provided with the distribution.
144 ;; 3. Neither the name of the team nor the names of its contributors
145 ;;    may be used to endorse or promote products derived from this software
146 ;;    without specific prior written permission.
147 ;; 
148 ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
149 ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
150 ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
151 ;; PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE
152 ;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
153 ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
154 ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
155 ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
156 ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
157 ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
158 ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
159
160 ;;; mew-mule0.el ends here