From 76709148df751ed526ae731602468093062b5ac3 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 15 Sep 1998 08:17:05 +0000 Subject: [PATCH] * Sync up with flim-1_9_2. * mime-def.el (mime-library-version): Bump up to FLAM-DOODLE 1.9.4. --- ChangeLog | 116 ++++++++++++++++++++++++++--- DOODLE-VERSION | 2 +- FLIM-CFG | 14 ++++ FLIM-MK | 38 +++++++++- FLIM-VERSION | 40 +++++----- Makefile | 15 +++- README.en | 22 ++++++ eword-decode.el | 4 +- eword-encode.el | 34 ++++++++- mime-def.el | 25 ++----- mime-en.sgml | 207 +++++++++++++++++++++++++++------------------------ mime-en.texi | 223 +++++++++++++++++++++++++++++-------------------------- mime-ja.sgml | 83 ++++++++++++--------- mime-ja.texi | 93 +++++++++++++---------- mime.el | 5 +- std11.el | 15 ++++ 16 files changed, 598 insertions(+), 338 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d8aebb..6708346 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-09-01 Tanaka Akira + + * Sync up with flim-1_9_2. + + * mime-def.el (mime-library-version): Bump up to FLAM-DOODLE + 1.9.4. + 1998-09-14 Tanaka Akira * mel-ccl.el (mel-ccl-try-to-read-crlf): New compile-time @@ -49,7 +56,7 @@ 1998-09-10 Tanaka Akira - * mime-def.el (mime-library-version-string): bump up to + * mime-def.el (mime-library-version-string): Bump up to FLAM-DOODLE 1.9.3. 1998-09-10 Tanaka Akira @@ -190,7 +197,7 @@ * Sync up with flim-1_9_1. - * mime-def.el (mime-library-version-string): bump up to + * mime-def.el (mime-library-version-string): Bump up to FLAM-DOODLE 1.9.2. 1998-08-28 Tanaka Akira @@ -687,7 +694,7 @@ 1998-08-18 Tanaka Akira - * mime-def.el (mime-library-version-string): bump up to + * mime-def.el (mime-library-version-string): Bump up to FLAM-DOODLE 1.9.1. 1998-08-18 Tanaka Akira @@ -849,7 +856,7 @@ 1998-08-16 Tanaka Akira - * mime-def.el (mime-library-version-string): bump up to FLIM-FLAM 1.9.1. + * mime-def.el (mime-library-version-string): Bump up to FLIM-FLAM 1.9.1. 1998-07-22 Tanaka Akira @@ -1081,9 +1088,94 @@ * eword-decode.el: Copied from AKEMI branch of SEMI. +1998-09-15 MORIOKA Tomohiko + + * FLIM: Version 1.9.2 (Shin-Tanabe) was released. + + * README.en (Installation): Add `install as a XEmacs package'. + +1998-09-15 MORIOKA Tomohiko + + * mime-en.sgml (Encoding Method): Translate. + +1998-09-15 MORIOKA Tomohiko + + * eword-encode.el (eword-encode-msg-id-to-rword-list): New + function. + (eword-encode-in-reply-to-to-rword-list): New function. + (eword-encode-in-reply-to): New function. + (eword-encode-field): Use `eword-encode-in-reply-to' for + `In-Reply-To' field. + + * std11.el (std11-parse-in-reply-to): New function. + +1998-09-14 MORIOKA Tomohiko + + * eword-decode.el (eword-decode-structured-field-list): Add + `User-Agent'. + +1998-09-11 MORIOKA Tomohiko + + * Makefile (package): Don't update auto-autoloads.el and + custom-load.el. + + * FLIM-MK (compile-flim-package): Update auto-autoloads.el and + custom-load.el. + +1998-09-11 MORIOKA Tomohiko + + * mime-def.el: Abolish function `butlast' and `nbutlast'. + + * mime-def.el (mime-library-version): New constant. + (mime-library-version-string): Refer `mime-library-version'. + +1998-09-11 MORIOKA Tomohiko + + * Makefile (XEMACS): New variable. + (PACKAGEDIR): New variable. + (package): New target. + (install-package): New target. + + * FLIM-CFG (PACKAGEDIR): New variable. + + * FLIM-MK (config-flim-package): New function. + (compile-flim-package): New function. + (install-flim-package): New function. + +1998-09-10 MORIOKA Tomohiko + + * mime-en.sgml (Content-Type field): Translate. + (mime-content-type): Translate. + (Content-Type parser): Translate. + (Content-Disposition): Translate. + (mime-content-disposition): Translate. + (Content-Disposition parser): Translate. + +1998-09-10 MORIOKA Tomohiko + + * Makefile (GOMI): Add Texinfo related garbages. + (clean): Delete historical setting. + +1998-09-03 MORIOKA Tomohiko + + * mime-en.sgml (mm-backend): Translate. + (Request for entity): Likewise. + (mm-backend module): Likewise. + + * mime.el (mime-entity-send): Add DOC-string. + +1998-09-01 MORIOKA Tomohiko + + * mime-en.sgml (Entity hierarchy): Translate. + +1998-09-01 MORIOKA Tomohiko + + * mime-en.sgml, mime-ja.sgml (Entity): Rearrangement. + + 1998-08-31 MORIOKA Tomohiko - * FLIM: Version 1.9.1 (Tonosh.DNr) was released.*B + * FLIM: Version 1.9.1 (Tonosh-Dò)-A was released. * mime-en.sgml (mm-backend): Translate a little. @@ -1226,7 +1318,7 @@ 1998-07-07 MORIOKA Tomohiko - * FLIM-Chao: Version 1.8.0 (Shij.DNr) was released.*B + * FLIM-Chao: Version 1.8.0 (Shij-Dò)-A was released. 1998-07-07 MORIOKA Tomohiko @@ -1338,7 +1430,7 @@ 1998-07-01 MORIOKA Tomohiko - * FLIM: Version 1.8.0 (.DNRkubo) was released.*B + * FLIM: Version 1.8.0 (-DÒkubo)-A was released. * README.en: Delete `How to use'. @@ -1463,7 +1555,7 @@ 1998-06-28 MORIOKA Tomohiko - * FLIM-Chao: Version 1.7.0 (Goj.DNr) was released.*B + * FLIM-Chao: Version 1.7.0 (Goj-Dò)-A was released. 1998-06-26 MORIOKA Tomohiko @@ -1722,7 +1814,7 @@ 1998-06-19 MORIOKA Tomohiko - * FLIM: Version 1.4.1 (Momoyama-Gory.DNrmae) was released.*B + * FLIM: Version 1.4.1 (Momoyama-Gory-Dòmae)-A was released. 1998-06-18 MORIOKA Tomohiko @@ -1842,7 +1934,7 @@ 1998-05-06 MORIOKA Tomohiko - * FLIM: Version 1.2.0 (J.DN~jNr) was released.*B + * FLIM: Version 1.2.0 (J-Dþjò)-A was released. * README.en (What's FLIM): Delete description about std11-parse.el; add description about mailcap.el. @@ -1893,7 +1985,7 @@ 1998-05-05 MORIOKA Tomohiko - * FLIM: Version 1.1.0 (T.DNrji) was released.*B + * FLIM: Version 1.1.0 (T-Dòji)-A was released. 1998-05-04 MORIOKA Tomohiko @@ -1929,7 +2021,7 @@ 1998-04-17 MORIOKA Tomohiko - * FLIM: Version 1.0.1 (Ky.DNrto) was released.*B + * FLIM: Version 1.0.1 (Ky-Dòto)-A was released. * mime-def.el (mime-spadework-module-version-string): New constant. diff --git a/DOODLE-VERSION b/DOODLE-VERSION index 88847ba..f6572cf 100644 --- a/DOODLE-VERSION +++ b/DOODLE-VERSION @@ -17,7 +17,7 @@ Order is not significant. 11 $B2+C0(B $B$o$&$?$s(B 10R5.5/14.0 FLAM-DOODLE 1.9.1 12 $B??Hl(B $B$^$R(B 10R6.0/11.0 FLAM-DOODLE 1.9.2 13 $(DT`(B $B$=$R(B 2.5YR7.0/11.0 FLAM-DOODLE 1.9.3 - 14 $B3A(B $B$+$-(B 10R6.5/10.0 + 14 $B3A(B $B$+$-(B 10R6.5/10.0 FLAM-DOODLE 1.9.4 15 $B?<;Y;R(B $B$3$-$/$A$J$7(B 10YR7.5/8.0 16 $B4;;R(B $B$3$&$8(B 7.5YR7.0/11.0 17 $B5`MU(B $B$/$A$P(B 10YR7.5/10.0 diff --git a/FLIM-CFG b/FLIM-CFG index 0e81588..37ddd2a 100644 --- a/FLIM-CFG +++ b/FLIM-CFG @@ -49,4 +49,18 @@ (setq FLIM_DIR (expand-file-name FLIM_PREFIX LISPDIR)) +(defvar PACKAGEDIR + (if (boundp 'early-packages) + (let ((dirs (append (if early-package-load-path + early-packages) + (if late-package-load-path + late-packages) + (if last-package-load-path + last-packages))) + dir) + (while (not (file-exists-p + (setq dir (car dirs)))) + (setq dirs (cdr dirs))) + dir))) + ;;; FLIM-CFG ends here diff --git a/FLIM-MK b/FLIM-MK index b76594e..3909556 100644 --- a/FLIM-MK +++ b/FLIM-MK @@ -1,6 +1,6 @@ ;;; -*-Emacs-Lisp-*- ;;; -;;; $Id: FLIM-MK,v 1.1 1998-04-13 13:08:14 morioka Exp $ +;;; $Id: FLIM-MK,v 1.1.16.1 1998-09-15 08:16:45 akr Exp $ ;;; (defun config-flim () @@ -31,4 +31,40 @@ LISPDIR=%s\n" PREFIX LISPDIR)) (install-elisp-modules flim-modules "./" FLIM_DIR) ) +(defun config-flim-package () + (let (package-dir) + (and (setq package-dir (car command-line-args-left)) + (or (string= "NONE" package-dir) + (defvar PACKAGEDIR package-dir) + )) + (setq command-line-args-left (cdr command-line-args-left)) + (load-file "FLIM-CFG") + (load-file "FLIM-ELS") + (setq flim-modules (append flim-modules + '(auto-autoloads custom-load))) + (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR)) + )) + +(defun compile-flim-package () + (config-flim-package) + + (setq autoload-package-name "flim") + (add-to-list 'command-line-args-left ".") + (batch-update-directory) + + (add-to-list 'command-line-args-left ".") + (Custom-make-dependencies) + + (compile-elisp-modules flim-modules ".") + ) + +(defun install-flim-package () + (config-flim-package) + (install-elisp-modules flim-modules + "./" + (expand-file-name FLIM_PREFIX + (expand-file-name "lisp" + PACKAGEDIR))) + ) + ;;; FLIM-MK ends here diff --git a/FLIM-VERSION b/FLIM-VERSION index 7e93731..0bd50b4 100644 --- a/FLIM-VERSION +++ b/FLIM-VERSION @@ -4,43 +4,43 @@ ;;------------------------------------------------------------------------- ;; Kinki Nippon Railway $(B6a5&F|K\E4F;(B http://www.kintetsu.co.jp/ -;; Ky-Dòto-A Line $(B5~ET@~(B +;; Ky-Dòto Line $(B5~ET@~(B-A ;;------------------------------------------------------------------------- -1.0.1 Ky-Dòto-A $(B5~ET(B ; <=> JR, $(B5~ET;T8rDL6I(B -1.1.0 T-Dòji-A $(BEl;{(B -1.2.0 J-Dþjò-A $(B==>r(B +1.0.1 Ky-Dòto $(B5~ET(B ; <=> JR, $(B5~ET;T8rDL6I(B-A +1.1.0 T-Dòji $(BEl;{(B-A +1.2.0 J-Dþjò $(B==>r(B-A 1.2.1 Kamitobaguchi $(B>eD;1)8}(B 1.2.2 Takeda $(BC]ED(B ; = $(B5~ET;T8rDL6I(B $(B1(4]@~(B 1.3.0 Fushimi $(BIz8+(B 1.4.0 Kintetsu-Tambabashi $(B6aE4C0GH66(B ; <=> $(B5~:e(B $(BC0GH66(B -1.4.1 Momoyama-Gory-Dòmae-A $(BEm;38fNMA0(B +1.4.1 Momoyama-Gory-Dòmae $(BEm;38fNMA0(B-A 1.5.0 Mukaijima $(B8~Eg(B 1.6.0 Ogura $(B>.AR(B 1.7.0 Iseda $(B0K@*ED(B -1.8.0 -DÒkubo-A $(BBg5WJ](B +1.8.0 -DÒkubo $(BBg5WJ](B-A 1.8.1 Kutsukawa $(B5WDE@n(B 1.9.0 Terada $(B;{ED(B -1.9.1 Tonosh-Dò-A $(BIYLnAq(B ------ Shin-Tanabe $(B?7EDJU(B ------ K-Dòdo-A $(B6=8M(B +1.9.1 Tonosh-Dò $(BIYLnAq(B-A +1.9.2 Shin-Tanabe $(B?7EDJU(B +----- K-Dòdo $(B6=8M(B-A ----- Miyamaki $(B;0;3LZ(B ----- Kintetsu-Miyazu $(B6aE45\DE(B ----- Komada $(B9}ED(B ------ Shin-H-Dòsono-A $(B?7=K1`(B +----- Shin-H-Dòsono $(B?7=K1`(B-A ----- Kizugawadai $(BLZDE@nBf(B ----- Yamadagawa $(B;3ED@n(B ----- Takanohara $(B9b$N86(B ------ Heij-Dò-A $(BJ?>k(B +----- Heij-Dò $(BJ?>k(B-A ----- Saidaiji $(B@>Bg;{(B ;;------------------------------------------------------------------------- ;; Kinki Nippon Railway $(B6a5&F|K\E4F;(B http://www.kintetsu.co.jp/ -;; Ky-Dòto-A Line $(B3`86@~(B +;; Ky-Dòto Line $(B3`86@~(B-A ;;------------------------------------------------------------------------- (Saidaiji) ($(B@>Bg;{(B) ----- Amagatsuji $(BFt%vDT(B ------ Nishinoky-Dò-A $(B@>$N5~(B ------ Kuj-Dò-A $(B6e>r(B ------ Kintetsu-K-Dòriyama-A $(B6aE474;3(B +----- Nishinoky-Dò $(B@>$N5~(B-A +----- Kuj-Dò $(B6e>r(B-A +----- Kintetsu-K-Dòriyama $(B6aE474;3(B-A [Chao Version names] @@ -53,8 +53,8 @@ ;;------------------------------------------------------------------------- 1.2.0 Takeda $(BC]ED(B ; = $(B6aE4(B $(B5~ET@~(B 1.3.0 Kuinabashi $(B$/$$$J66(B -1.4.0 J-Dþjò-A $(B==>r(B -1.6.0 Kuj-Dò-A $(B6e>r(B -1.6.1 Ky-Dòto-A $(B5~ET(B ; <=> JR, $(B6aE4(B -1.7.0 Goj-Dò-A $(B8^>r(B -1.8.0 Shij-Dò-A $(B;M>r(B +1.4.0 J-Dþjò $(B==>r(B-A +1.6.0 Kuj-Dò $(B6e>r(B-A +1.6.1 Ky-Dòto $(B5~ET(B ; <=> JR, $(B6aE4(B-A +1.7.0 Goj-Dò $(B8^>r(B-A +1.8.0 Shij-Dò $(B;M>r(B-A diff --git a/Makefile b/Makefile index 1eb017c..b787062 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # PACKAGE = flim -VERSION = 1.9.1 +VERSION = 1.9.2 TAR = tar RM = /bin/rm -f @@ -12,11 +12,15 @@ CP = /bin/cp -p EMACS = emacs FLAGS = -batch -q -no-site-file -eval "$${EVALARGS:-nil}" FLAGS_CURDIR = $(FLAGS) -eval '(setq load-path (cons "." load-path))' +XEMACS = xemacs PREFIX = NONE LISPDIR = NONE +PACKAGEDIR = NONE -GOMI = *.elc +GOMI = *.elc \ + *.cp *.cps *.ky *.kys *.fn *.fns *.vr *.vrs \ + *.pg *.pgs *.tp *.tps *.toc *.aux *.log FILES = README.?? Makefile FLIM-MK FLIM-CFG FLIM-ELS *.el ChangeLog @@ -26,6 +30,13 @@ elc: ew-parse.el install: elc $(EMACS) $(FLAGS) -l FLIM-MK -f install-flim $(PREFIX) $(LISPDIR) + +package: + $(XEMACS) $(FLAGS) -f compile-flim-package $(PACKAGEDIR) + +install-package: package + $(XEMACS) $(FLAGS) -f install-flim-package $(PACKAGEDIR) + clean: -$(RM) $(GOMI) diff --git a/README.en b/README.en index 74bf582..9cf5025 100644 --- a/README.en +++ b/README.en @@ -87,6 +87,28 @@ Installation You can specify other optional settings by editing the file FLIM-CFG. Please read comments in it. +(1-c) install as a XEmacs package + + If you want to install to XEmacs package directory, please do + following: + + % make install-package + + You can specify the emacs command name, for example + + % make install-package XEMACS=xemacs-21 + + If `XEMACS=...' is omitted, XEMACS=xemacs is used. + + You can specify the package directory, for example: + + % make install PACKAGEDIR=~/.xemacs + + If `PACKAGEDIR=...' is omitted, the first existing package + directory is used. + + Notice that XEmacs package system requires XEmacs 21.0 or later. + load-path (for Emacs or MULE) ============================= diff --git a/eword-decode.el b/eword-decode.el index 077ae78..dffad52 100644 --- a/eword-decode.el +++ b/eword-decode.el @@ -397,7 +397,7 @@ Each field name must be symbol." '(Reply-To Resent-Reply-To From Resent-From Sender Resent-Sender To Resent-To Cc Resent-Cc Bcc Resent-Bcc Dcc Mime-Version Content-Type Content-Transfer-Encoding - Content-Disposition) + Content-Disposition User-Agent) "*List of field-names to decode as structured field. Each field name must be symbol." :group 'eword-decode @@ -413,7 +413,7 @@ If SEPARATOR is not nil, it is used as header separator." (interactive "*") (rotate-memo args-eword-decode-header (list code-conversion)) (unless code-conversion - (message "eword-decode-header is called with no code-conversion") + (message "eword-decode-header is called without code-conversion") (sit-for 2)) (if (and code-conversion (not (mime-charset-to-coding-system code-conversion))) diff --git a/eword-encode.el b/eword-encode.el index 7b2c1b9..d7b77eb 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -529,6 +529,24 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is )) dest)) +(defsubst eword-encode-msg-id-to-rword-list (msg-id) + (cons '("<" nil nil) + (append (eword-encode-addr-seq-to-rword-list (cdr msg-id)) + '((">" nil nil))))) + +(defsubst eword-encode-in-reply-to-to-rword-list (in-reply-to) + (let (dest) + (while in-reply-to + (setq dest + (append dest + (let ((elt (car in-reply-to))) + (if (eq (car elt) 'phrase) + (eword-encode-phrase-to-rword-list (cdr elt)) + (eword-encode-msg-id-to-rword-list elt) + )))) + (setq in-reply-to (cdr in-reply-to))) + dest)) + ;;; @ application interfaces ;;; @@ -556,6 +574,15 @@ Optional argument COLUMN is start-position of the field." (std11-parse-addresses-string string)) ))) +(defun eword-encode-in-reply-to (string &optional column) + "Encode header field STRING as In-Reply-To field, and return the result. +Optional argument COLUMN is start-position of the field." + (car (eword-encode-rword-list + (or column 13) + (eword-encode-in-reply-to-to-rword-list + (std11-parse-in-reply-to + (std11-lexical-analyze string)))))) + (defun eword-encode-structured-field-body (string &optional column) "Encode header field STRING as structured field, and return the result. Optional argument COLUMN is start-position of the field." @@ -595,9 +622,12 @@ encoded-word. ASCII token is not encoded." (eword-encode-address-list field-body (+ (length field-name) 2)) ) + ((eq field-name-symbol 'In-Reply-To) + (eword-encode-in-reply-to + field-body (+ (length field-name) 2)) + ) ((memq field-name-symbol - '(In-Reply-To - Mime-Version User-Agent)) + '(Mime-Version User-Agent)) (eword-encode-structured-field-body field-body (+ (length field-name) 2)) ) diff --git a/mime-def.el b/mime-def.el index b5744c9..0f695dd 100644 --- a/mime-def.el +++ b/mime-def.el @@ -24,8 +24,15 @@ ;;; Code: +(defconst mime-library-version + '("FLAM-DOODLE" "$B3A(B 10R6.5/10.0" 1 9 4) + "Implementation name, version name and numbers of MIME-library package.") + (defconst mime-library-version-string - "FLAM-DOODLE 1.9.3 - \"$(DT`(B\" 2.5YR7.0/11.0") + `,(concat (car mime-library-version) " " + (mapconcat #'number-to-string + (cddr mime-library-version) ".") + " - \"" (cadr mime-library-version) "\"")) ;;; @ variables @@ -62,22 +69,6 @@ ;;; @ required functions ;;; -(unless (fboundp 'butlast) - (defun butlast (x &optional n) - "Returns a copy of LIST with the last N elements removed." - (if (and n (<= n 0)) x - (nbutlast (copy-sequence x) n))) - - (defun nbutlast (x &optional n) - "Modifies LIST to remove the last N elements." - (let ((m (length x))) - (or n (setq n 1)) - (and (< n m) - (progn - (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil)) - x)))) - ) - (defsubst eliminate-top-spaces (string) "Eliminate top sequence of space or tab in STRING." (if (string-match "^[ \t]+" string) diff --git a/mime-en.sgml b/mime-en.sgml index d7a7a3a..ed4b19f 100644 --- a/mime-en.sgml +++ b/mime-en.sgml @@ -42,46 +42,13 @@ a message or one of the parts in the body of a multipart entity.' In this document, the term entity indicates all of header fields and body.

-The definition of RFC 2045 indicates that a MIME message is a tree. -An message is a tree, each node is an entity, like following figure. -Namely MIME extends message to tree structure. +The definition of RFC 2045 indicates that a MIME message is a tree, +and each node of the tree is an entity. Namely MIME extends message +to tree structure.

FLIM uses mime-entity structure to represent information of entity. In this document, it is called simply `mime-entity'. -

-$BA0=R$N$h$&$K!"(Bmessage $BCf$N3F(B entity $B$OLZ$N@a$KEv$?$j$^$9$,!"$3$NLZ$K$O(B -$B?<$5$HF1$8?<$5$NCf$N=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B - - - $B(#(!(!(!($(B - $B("(B nil $B("(B - $B(&(!(((!(%(B - $B(#(!(!(!(!(!(!(!(!(!(+(!(!(!(!(!(!(!(!(!($(B - $B(#(*($(B $B(#(*($(B $B(#(*($(B - $B("#0("(B $B("#1("(B $B("#2("(B - $B(&(((%(B $B(&(((%(B $B(&(((%(B - $B("(B $B(#(!(!(!(!(+(!(!(!(!($(B $B("(B - $B(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(B - $B("(B $B#0(B.$B#0("("(B $B#1(B.$B#0("("(B $B#1(B.$B#1("("(B $B#1(B.$B#2("("(B $B#2(B.$B#0("(B - $B(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(B - - -

-$B$N$h$&$K?<$5(B n $B$N@a$K$OD9$5(B n $B$N@0?tNs$N@aHV9f$,?6$l$^$9!#$3$l(B -$B$r(B entity-number $B$H8F$S$^$9!#(Bentity-number $B$O(B S $B<0$H(B -$B$7$F$O(B (1 2 3) $B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#(B -

-mime-entity $B$G$O!"$3$l$HF1MM$N(B node-id $B$rMQ$$$^$9!#(B -node-id $B$O$A$g$&$I(B entity-number $B$r5U$K$7$?%j%9%H$G!"(Bentity-number -1.2.3 $B$KBP1~$9$k(B node-id $B$O(B (3 2 1) $B$G$9!#(B -

-$BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B -$B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer -local $BJQ?t(B mime-message-structure $B$K3JG<$9$k$3$H$K$7$^$9!#(B -$B$=$7$F!"(Bentity-number $B$d(B node-id $B$rMQ$$$k$3$H$G(B -mime-message-structure $B$K$*$1$k(B entity $B$NAjBPE*$J0LCV4X78$r(B -$B07$&$3$H$,$G$-$^$9!#(B

Functions to create mime-entity @@ -115,6 +82,50 @@ node="mm-backend"> Default value is buffer.

Features about message tree Entity hierarchy

+Structure of a MIME message is tree. +

+In the tree, root node is the entity indicates all of the message. In +this document, it is called root-entity or +message. In FLIM, it is indicated by buffer local +variable mime-message-structure. +

+Each entity except root-entity has a parent. An entity may have +children. We can indicate an entity by relative position from a base +entity, based on the parent-child relationship. +

+In addition, we can indicate an entity by absolute position of the +message. +

+Each entity, which is a node of the tree, can be numbered by +depth and left-to-right order of the depth. + + + +-------+ + | nil | + +---+---+ + +-------------------+-------------------+ + +-+-+ +-+-+ +-+-+ + | 0 | | 1 | | 2 | + +-+-+ +-+-+ +-+-+ + | +---------+---------+ | + +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ + | 0.0 | | 1.0 | | 1.1 | | 1.2 | | 2.0 | + +-----+ +-----+ +-----+ +-----+ +-----+ + + +

+Namely, if depth of a node is n, the node has a node-number, which is +consists of n integers. In this document, it is called +entity-number. An entity-number is represented by +list of integer, like (1 2 3). +

+mime-entity has also node-id. A node-id is +represented by reversed list of entity-number. For example, node-id +corresponding with 1.2.3 is (3 2 1). +

+Each entity can be indicated by entity-number or node-id in +mime-message-structure. +

Buffer local variable to store mime-entity structure of message. @@ -357,18 +368,16 @@ representations for their purposes. Each entity has representation-type. It must be specified when an entity is created.

-$BA0@a$^$G$K=R$Y$FMh$?(B entity $B$KBP$9$k=hM}$O!"(Bentity $B$KBP$7$F$=$N=hM}$r0M(B -$BMj$9$k$3$H$K$h$C$Fentity $B=hM}(B -method $B$H8F$S$^$9!#$^$?!"(Brepresentation-type $BKh$K$3$N$h$&$J4X(B -$B?t$r$^$H$a$?$b$N$r(B mm-backend $B$H8F$S$^$9!#(B +Functions about entity are implemented by request processing to the +entity. Each entity knows its representation-type. Each entity calls +processing function corresponding with the representation-type. Such +kind of function is called entity processing +method. A module, consists of them corresponding with a +representation-type, is called mm-backend.

-mm-backend $B$O(B representation-type $B$NL>A0$N@hF,$K(B mm $B$H$$$&(B -$B@\F,<-$rIU$1$?4X?tL>$+$i$J$k(B module $B$G!"$=$N(B module $BL>$OF1MM$K(B -representation-type $B$NL>A0$N@hF,$K(B mm $B$rIU$1$?$b$N$K$J$C$F(B -$B$$$^$9!#$3$N(B module $B$O(B representation-type $B$N(B entity $B$,:G=i$K@8@.$5$l$k(B -$B;~$K<+F0E*$K(B require $B$5$l$^$9!#(B +Module name of each mm-backend consists of the prefix mm +and its representation-type. The module is required automatically +when its entity is created at first.

Message-passing for entity @@ -377,18 +386,19 @@ representation-type $B$NL>A0$N@hF,$K(B mm $B$rIU$1$?$b$N$K$J$C$F entity message args

-entity $B$K(B message $B$rAw$k!#(B +Send message to entity with args, and +return the result.

-args $B$O(B message $B$N0z?t$G$"$k!#(B +args is arguments of the message.

How to make mm-backend mm-backend module

-$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9(B (^_^;$B!K(B +(It is not written yet, sorry. (^_^;)

-$B!J$H$j$"$($:!"(Bmm*.el $B$r;29M$K$7$F$/$@$5$$!K(B +(Please read mm*.el)

Information of Content-Type field @@ -414,14 +424,14 @@ Content-Type field.

Format of Content-Type field Content-Type field

-Content-Type $BMs$N7A<0$O0J2<$N$h$&$KDj5A$5$l$F$$$^$9!'(B +Format of Content-Type field is defined as follows: ``Content-Type'' ``:'' type ``/'' subtype *( ``;'' parameter )

-$BNc$($P!"(B +For example: @@ -429,25 +439,20 @@ Content-Type: image/jpeg - -$B$d(B - Content-Type: text/plain; charset=iso-2022-jp - - -$B$J$I$N$h$&$KMQ$$$i$l$^$9!#(B

-$B$3$3$G!"(B`type' $B$H(B `subtype' $B$O(B entity $B$N7A<0$r<($9$b$N$G!"N>N$7(B -$B$F!"(B`media-type' $B$H8F$V$3$H$K$7$^$9!#>e5-$NNc$K$*$1$k(B `image/jpeg' $B$d(B -`text/plain' $B$O(B media-type $B$N#1$D$G$9!#(B +`type' and `subtype' indicate format of an entity. In this document, +pair of them is called `media-type'. `image/jpeg' or `text/plain' is +a media-type.

-Content-Type $BMs$N$J$$(B entity $B$O(B +If an entity does not have Content-Type field, it is regarded as +following: @@ -456,7 +461,7 @@ Content-Type: text/plain; charset=us-ascii -$B$H$7$F2r + @@ -465,19 +470,20 @@ Content-Type: text/plain; charset=us-ascii

-Content-Type $BMs$N>pJs$r3JG<$9$k$?$a$N9=B$BN!#(B +Structure to store information of a Content-Type field.

-$B$3$N9=B$BN$r;2>H$9$k$K$O(B mime-content-type-$BMWAGL>(B $B$H$$$&L>(B -$BA0$N;2>H4X?t$rMQ$$$k!#(B +Applications should use reference functions +mime-content-type-SLOT to refer information of the +structure.

-$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'(B +Slots of the structure are following: -

primary-type
media-type $B$Nprimary-type
primary type of media-type (symbol).
-
subtype
media-type $B$NI{7?(B (symbol). +
subtype
subtype of media-type (symbol).
-
parameters
Content-Type $BMs$N(B parameter ($BO"A[(B list). +
parameters
parameters of Content-Type field (association-list).
@@ -485,13 +491,13 @@ Content-Type $BMs$N>pJs$r3JG<$9$k$?$a$N9=B$BN!#(B type subtype parameters -

content-type $B$N@8@.;R!#(B +

Constructor of content-type. content-type parameter

-content-type $B$N(B parameter $B$NCM$rJV$9!#(B +Return value of parameter of content-type. @@ -501,14 +507,15 @@ Content-Type $BMs$N>pJs$r3JG<$9$k$?$a$N9=B$BN!#(B string

-string $B$r(B content-type $B$H$7$F2r@O$7$?7k2L$rJV$9!#(B +Parse string as field-body of Content-Type field.

-$B8=:_$N(B buffer $B$N(B Content-Type $BMs$rFI$_ -Content-Type $BMs$,B8:_$7$J$$>l9g$O(B nil $B$rJV$9!#(B +Return nil if Content-Type field is not found. @@ -526,8 +533,9 @@ Return type/subtype string from type and

Information of Content-Disposition field Content-Disposition

-Content-Disposition $BMs(B $B$O(B entity $B$NI=<($d(B file $BL>$J$I(B -$B$NB0@-$K$J$I$K4X$9$k>pJs$r5-=R$9$k$?$a$N$b$N$G$9!#(B +Content-Disposition field is an optional field to +specify presentation of an entity or attributes of an entity, such as +file name. type and Internet Messages: The Content-Disposition Header" date="August 1997">

-FLIM $B$O(B Content-Disposition $BMs$r9=J82r@O$9$k4X?t$H(B Content-Disposition -$BMs$N2r@O7k2L$r3JG<$9$k9=B$BN(B -mime-content-disposition $B$rDs6!$7$^$9!#(B +FLIM provides parser for Content-Disposition field and structure +mime-content-disposition to store information of +Content-Disposition field.

mime-content-disposition structure @@ -545,17 +553,19 @@ FLIM $B$O(B Content-Disposition $BMs$r9=J82r@O$9$k4X?t$H(B Content-Dispositi

-Content-Disposition $BMs$N2r@O7k2L$r<}$a$k$?$a$N9=B$BN!#(B +Structure to store information of a Content-Disposition field.

-$B$3$N9=B$BN$r;2>H$9$k$K$O(B mime-content-disposition-$BMWAGL>(B $B$H(B -$B$$$&L>A0$N;2>H4X?t$rMQ$$$k!#(B +Applications should use reference functions +mime-content-disposition-SLOT to refer information of the +structure.

-$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'(B +Slots of the structure are following:

disposition-type
disposition-type (symbol).
-
parameters
Content-Disposition $BMs$N(B parameter ($BO"A[(B list). +
parameters
parameters of Content-Disposition field +(association-list).
@@ -563,13 +573,14 @@ Content-Disposition $BMs$N2r@O7k2L$r<}$a$k$?$a$N9=B$BN!#(B content-disposition parameter

-content-disposition $B$N(B parameter $B$NCM$rJV$9!#(B +Return value of parameter of +content-disposition. content-disposition

-content-disposition $B$N(B filename $B$NCM$rJV$9!#(B +Return filename of content-disposition. @@ -579,28 +590,30 @@ Content-Disposition $BMs$N2r@O7k2L$r<}$a$k$?$a$N9=B$BN!#(B string

-string $B$r(B content-disposition $B$H$7$F2r@O$7$?7k2L$rJV$9!#(B +Parse string as field-body of Content-Disposition field, +and return the result.

-$B8=:_$N(B buffer $B$N(B Content-Disposition $BMs$rFI$_ -Content-Disposition $BMs$,B8:_$7$J$$>l9g$O(B nil $B$rJV$9!#(B +Return nil if Content-Disposition field is not found.

Encoding Method Content-Transfer-Encoding

-Content-Transfer-Encoding $BMs(B $B$O(B entity $B$NId9f2=K!$r5-(B -$B=R$9$k$?$a$N$b$N$G$9!#(B +Content-Transfer-Encoding field is a header field +to indicate body encoding of a entity.

-FLIM $B$G$O(B Content-Transfer-Encoding $BMs$r9=J82r@O$9$k4X?t$rDs6!$7$^$9!#$3(B -$B$l$i$N4X?t$O(B Content-Transfer-Encoding $BMs$N>pJs$OJ8;zNs$GI=8=$7$^$9!#(B +FLIM provides parser functions for Content-Transfer-Encoding field. +They represent information of Content-Transfer-Encoding field as +string.

-$B$^$?!"(BContent-Transfer-Encoding $B$K4p$E$$$FId9f2=!&I|9f2=$r9T$&4X?t$bDs(B -$B6!$5$l$^$9!#(B +In addition, FLIM provides encoder/decoder functions by +Content-Transfer-Encoding.

Parser diff --git a/mime-en.texi b/mime-en.texi index 72dd84d..f3bbf8a 100644 --- a/mime-en.texi +++ b/mime-en.texi @@ -50,8 +50,6 @@ Please eval following to use MIME features provided by FLIM: @node Entity, Content-Type, How to use, Top @chapter Message and Entity -@cindex node-id -@cindex entity-number @cindex mime-entity @cindex entity @@ -61,45 +59,13 @@ message or one of the parts in the body of a multipart entity.' In this document, the term @strong{entity} indicates all of header fields and body.@refill -The definition of RFC 2045 indicates that a MIME message is a tree. An -message is a tree, each node is an entity, like following figure. -Namely MIME extends message to tree structure.@refill - -FLIM uses @strong{mime-entity} structure to represent information of -entity. In this document, it is called simply `mime-entity'.@refill - -$BA0=R$N$h$&$K!"(Bmessage $BCf$N3F(B entity $B$OLZ$N@a$KEv$?$j$^$9$,!"$3$NLZ$K$O(B -$B?<$5$HF1$8?<$5$NCf$N=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B -@example - - $B(#(!(!(!($(B - $B("(B nil $B("(B - $B(&(!(((!(%(B - $B(#(!(!(!(!(!(!(!(!(!(+(!(!(!(!(!(!(!(!(!($(B - $B(#(*($(B $B(#(*($(B $B(#(*($(B - $B("#0("(B $B("#1("(B $B("#2("(B - $B(&(((%(B $B(&(((%(B $B(&(((%(B - $B("(B $B(#(!(!(!(!(+(!(!(!(!($(B $B("(B - $B(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(B - $B("(B $B#0(B.$B#0("("(B $B#1(B.$B#0("("(B $B#1(B.$B#1("("(B $B#1(B.$B#2("("(B $B#2(B.$B#0("(B - $B(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(B -@end example +The definition of RFC 2045 indicates that a MIME message is a tree, and +each node of the tree is an entity. Namely MIME extends message to tree +structure.@refill -@noindent -$B$N$h$&$K?<$5(B n $B$N@a$K$OD9$5(B n $B$N@0?tNs$N@aHV9f$,?6$l$^$9!#$3$l(B -$B$r(B @strong{entity-number} $B$H8F$S$^$9!#(Bentity-number $B$O(B S $B<0$H(B -$B$7$F$O(B @code{(1 2 3)} $B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#(B - -mime-entity $B$G$O!"$3$l$HF1MM$N(B @strong{node-id} $B$rMQ$$$^$9!#(Bnode-id $B$O$A$g(B -$B$&$I(B entity-number $B$r5U$K$7$?%j%9%H$G!"(Bentity-number 1.2.3 $B$KBP1~$9$k(B -node-id $B$O(B @code{(3 2 1)} $B$G$9!#(B@refill - -$BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B -$B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer -local $BJQ?t(B @code{mime-message-structure} $B$K3JG<$9$k$3$H$K$7$^$9!#(B -$B$=$7$F!"(Bentity-number $B$d(B node-id $B$rMQ$$$k$3$H$G(B -@code{mime-message-structure} $B$K$*$1$k(B entity $B$NAjBPE*$J0LCV4X78$r(B -$B07$&$3$H$,$G$-$^$9!#(B +FLIM uses @strong{mime-entity} structure to represent +information of entity. In this document, it is called simply +`mime-entity'. @menu @@ -142,6 +108,53 @@ mime-entity. (cf. @ref{mm-backend}) Default value is @var{buffer}. @node Entity hierarchy, Entity Attributes, Entity creation, Entity @section Features about message tree +@cindex node-id +@cindex entity-number +@cindex message +@cindex root-entity + +Structure of a MIME message is tree.@refill + +In the tree, root node is the entity indicates all of the message. In +this document, it is called @strong{root-entity} or @strong{message}. +In FLIM, it is indicated by buffer local variable +@code{mime-message-structure}.@refill + +Each entity except root-entity has a parent. An entity may have +children. We can indicate an entity by relative position from a base +entity, based on the parent-child relationship.@refill + +In addition, we can indicate an entity by absolute position of the +message.@refill + +Each entity, which is a node of the tree, can be numbered by +depth and left-to-right order of the depth. +@example + + +-------+ + | nil | + +---+---+ + +-------------------+-------------------+ + +-+-+ +-+-+ +-+-+ + | 0 | | 1 | | 2 | + +-+-+ +-+-+ +-+-+ + | +---------+---------+ | + +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ + | 0.0 | | 1.0 | | 1.1 | | 1.2 | | 2.0 | + +-----+ +-----+ +-----+ +-----+ +-----+ +@end example + +Namely, if depth of a node is n, the node has a node-number, which is +consists of n integers. In this document, it is called +@strong{entity-number}. An entity-number is represented by list of +integer, like @code{(1 2 3)}.@refill + +mime-entity has also @strong{node-id}. A node-id is represented by +reversed list of entity-number. For example, node-id corresponding with +1.2.3 is @code{(3 2 1)}.@refill + +Each entity can be indicated by entity-number or node-id in +@code{mime-message-structure}. @defvar mime-message-structure @@ -378,7 +391,7 @@ contains @var{entity}. @node mm-backend, , Entity buffer, Entity @section Entity representations and implementations @cindex mm-backend -@cindex entity $B=hM}(B method +@cindex entity processing method @cindex representation-type Entity is an abstraction. It is designed to use various data @@ -387,18 +400,16 @@ representations for their purposes.@refill Each entity has @strong{representation-type}. It must be specified when an entity is created. (cf. @ref{Entity Creation}) @refill -$BA0@a$^$G$K=R$Y$FMh$?(B entity $B$KBP$9$k=hM}$O!"(Bentity $B$KBP$7$F$=$N=hM}$r0M(B -$BMj$9$k$3$H$K$h$C$FA0$N@hF,$K(B @code{mm} $B$H$$$&(B -$B@\F,<-$rIU$1$?4X?tL>$+$i$J$k(B module $B$G!"$=$N(B module $BL>$OF1MM$K(B -representation-type $B$NL>A0$N@hF,$K(B @code{mm} $B$rIU$1$?$b$N$K$J$C$F(B -$B$$$^$9!#$3$N(B module $B$O(B representation-type $B$N(B entity $B$,:G=i$K@8@.$5$l$k(B -$B;~$K<+F0E*$K(B require $B$5$l$^$9!#(B +Module name of each mm-backend consists of the prefix @code{mm} +and its representation-type. The module is required automatically +when its entity is created at first. @menu @@ -411,9 +422,10 @@ representation-type $B$NL>A0$N@hF,$K(B @code{mm} $B$rIU$1$?$b$N$K$J$C$F(B @defun mime-entity-send entity message &rest args -@var{entity} $B$K(B @var{message} $B$rAw$k!#(B@refill +Send @var{message} to @var{entity} with @var{args}, and return the +result.@refill -@var{args} $B$O(B @var{message} $B$N0z?t$G$"$k!#(B +@var{args} is arguments of the @var{message}. @end defun @@ -421,9 +433,9 @@ representation-type $B$NL>A0$N@hF,$K(B @code{mm} $B$rIU$1$?$b$N$K$J$C$F(B @node mm-backend module, , Request for entity, mm-backend @subsection How to make mm-backend -$B!J$9$_$^$;$s!#$=$N$&$A=q$-$^$9(B (^_^;$B!K(B@refill +(It is not written yet, sorry. (^_^;)@refill -$B!J$H$j$"$($:!"(Bmm*.el $B$r;29M$K$7$F$/$@$5$$!K(B +(Please read mm*.el) @node Content-Type, Content-Disposition, Entity, Top @@ -463,14 +475,14 @@ Content-Type field. @cindex subtype @cindex type -Content-Type $BMs$N7A<0$O0J2<$N$h$&$KDj5A$5$l$F$$$^$9!'(B +Format of Content-Type field is defined as follows: @quotation ``Content-Type'' ``:'' @strong{type} ``/'' @strong{subtype} *( ``;'' @strong{parameter} ) @end quotation -$BNc$($P!"(B +For example: @quotation @example @@ -478,8 +490,6 @@ Content-Type: image/jpeg @end example @end quotation -@noindent -$B$d(B @quotation @example @@ -487,18 +497,16 @@ Content-Type: text/plain; charset=iso-2022-jp @end example @end quotation -@noindent -$B$J$I$N$h$&$KMQ$$$i$l$^$9!#(B - -$B$3$3$G!"(B`type' $B$H(B `subtype' $B$O(B entity $B$N7A<0$r<($9$b$N$G!"N>N$7(B -$B$F!"(B`media-type' $B$H8F$V$3$H$K$7$^$9!#>e5-$NNc$K$*$1$k(B `image/jpeg' $B$d(B -`text/plain' $B$O(B media-type $B$N#1$D$G$9!#(B +`type' and `subtype' indicate format of an entity. In this document, +pair of them is called `media-type'. `image/jpeg' or `text/plain' is +a media-type. @noindent @strong{[Memo]} @quotation -Content-Type $BMs$N$J$$(B entity $B$O(B +If an entity does not have Content-Type field, it is regarded as +following: @quotation @example @@ -507,7 +515,7 @@ Content-Type: text/plain; charset=us-ascii @end quotation @noindent -$B$H$7$F2rpJs$r3JG<$9$k$?$a$N9=B$BN!#(B@refill +Structure to store information of a Content-Type field.@refill -$B$3$N9=B$BN$r;2>H$9$k$K$O(B @code{mime-content-type-$BMWAGL>(B} $B$H$$$&L>A0$N;2(B -$B>H4X?t$rMQ$$$k!#(B@refill +Applications should use reference functions +@code{mime-content-type-SLOT} to refer information of the +structure.@refill -$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'(B +Slots of the structure are following: @table @var @item primary-type -media-type $B$Nl9g$O(B nil $B$rJV$9!#(B +Return @code{nil} if Content-Type field is not found. @end defun @@ -585,10 +595,11 @@ Return type/subtype string from @var{type} and @var{subtype}. @cindex mime-content-disposition @cindex RFC 2183 @cindex Standards Track -@cindex Content-Disposition $BMs(B +@cindex Content-Disposition field -@strong{Content-Disposition $BMs(B} $B$O(B entity $B$NI=<($d(B file $BL>$J$I(B -$B$NB0@-$K$J$I$K4X$9$k>pJs$r5-=R$9$k$?$a$N$b$N$G$9!#(B +@strong{Content-Disposition field} is an optional field to +specify presentation of an entity or attributes of an entity, such as +file name. @noindent @@ -599,9 +610,9 @@ Information in Internet Messages: The Content-Disposition Header'', August 1997, Standards Track. @end quotation -FLIM $B$O(B Content-Disposition $BMs$r9=J82r@O$9$k4X?t$H(B Content-Disposition -$BMs$N2r@O7k2L$r3JG<$9$k9=B$BN(B -@strong{mime-content-disposition} $B$rDs6!$7$^$9!#(B +FLIM provides parser for Content-Disposition field and structure +@strong{mime-content-disposition} to store information of +Content-Disposition field. @menu @@ -614,19 +625,21 @@ FLIM $B$O(B Content-Disposition $BMs$r9=J82r@O$9$k4X?t$H(B Content-Dispositi @deffn{Structure} mime-content-disposition -Content-Disposition $BMs$N2r@O7k2L$r<}$a$k$?$a$N9=B$BN!#(B@refill +Structure to store information of a Content-Disposition field.@refill -$B$3$N9=B$BN$r;2>H$9$k$K$O(B @code{mime-content-disposition-$BMWAGL>(B} $B$H$$$&L>(B -$BA0$N;2>H4X?t$rMQ$$$k!#(B@refill +Applications should use reference functions +@code{mime-content-disposition-SLOT} to refer information of the +structure.@refill -$B$3$N9=B$BN$NMWAG$O0J2<$NDL$j$G$"$k!'(B +Slots of the structure are following: @table @var @item disposition-type disposition-type (symbol). @item parameters -Content-Disposition $BMs$N(B parameter ($BO"A[(B list). +parameters of Content-Disposition field +(association-list). @end table @end deffn @@ -634,13 +647,13 @@ Content-Disposition $BMs$N(B parameter ($BO"A[(B list). @defun mime-content-disposition-parameter content-disposition parameter -@var{content-disposition} $B$N(B @var{parameter} $B$NCM$rJV$9!#(B +Return value of @var{parameter} of @var{content-disposition}. @end defun @defun mime-content-disposition-filename content-disposition -@var{content-disposition} $B$N(B filename $B$NCM$rJV$9!#(B +Return filename of @var{content-disposition}. @end defun @@ -650,33 +663,33 @@ Content-Disposition $BMs$N(B parameter ($BO"A[(B list). @defun mime-parse-Content-Disposition string -@var{string} $B$r(B content-disposition $B$H$7$F2r@O$7$?7k2L$rJV$9!#(B +Parse @var{string} as field-body of Content-Disposition field, and +return the result. @end defun @defun mime-read-Content-Disposition -$B8=:_$N(B buffer $B$N(B Content-Disposition $BMs$rFI$_l9g$O(B nil $B$rJV$9!#(B +Return nil if Content-Disposition field is not found. @end defun @node Content-Transfer-Encoding, encoded-word, Content-Disposition, Top @chapter Encoding Method -@cindex Content-Transfer-Encoding $BMs(B +@cindex Content-Transfer-Encoding field -@strong{Content-Transfer-Encoding $BMs(B} $B$O(B entity $B$NId9f2=K!$r5-=R$9$k$?$a(B -$B$N$b$N$G$9!#(B@refill +@strong{Content-Transfer-Encoding field} is a header field to indicate +body encoding of a entity.@refill -FLIM $B$G$O(B Content-Transfer-Encoding $BMs$r9=J82r@O$9$k4X?t$rDs6!$7$^$9!#$3(B -$B$l$i$N4X?t$O(B Content-Transfer-Encoding $BMs$N>pJs$OJ8;zNs$GI=8=$7$^$9!#(B -@refill +FLIM provides parser functions for Content-Transfer-Encoding field. +They represent information of Content-Transfer-Encoding field as +string.@refill -$B$^$?!"(BContent-Transfer-Encoding $B$K4p$E$$$FId9f2=!&I|9f2=$r9T$&4X?t$bDs(B -$B6!$5$l$^$9!#(B +In addition, FLIM provides encoder/decoder functions by +Content-Transfer-Encoding. @menu diff --git a/mime-ja.sgml b/mime-ja.sgml index c3cfb08..8240d6b 100644 --- a/mime-ja.sgml +++ b/mime-ja.sgml @@ -47,45 +47,11 @@ field $B$HFbMF$r;X$9!W$H$J$C$F$$$^$9!#$3$3$G$O!"(BMIME $B$GDj5A$5$l$?(B head field $B0J30$NA4$F$N(B header $B$H(B body $B$r;X$98l$H$7$F(B entity$B$rMQ$$$k$3$H$K$7$^$9!#(B

-RFC 2045 $B$NDj5A$O!"(BMIME message $B$,(B entity $B$rC10L$H$9$kLZ9=B$$G$"$k$3$H$r(B -$B<($7$F$$$^$9!#(Bmessage $B$O2 FLIM $B$O(B entity $B$N>pJs$rI=8=$9$k$?$a$K(Bmime-entity $B9=(B $BB$BN$rMQ$$$^$9!#0J2<$G$OC1$K(B mime-entity $B$H8F$V$3$H$K$7$^$9!#(B -

-$BA0=R$N$h$&$K!"(Bmessage $BCf$N3F(B entity $B$OLZ$N@a$KEv$?$j$^$9$,!"$3$NLZ$K$O(B -$B?<$5$HF1$8?<$5$NCf$N=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B - - - $B(#(!(!(!($(B - $B("(B nil $B("(B - $B(&(!(((!(%(B - $B(#(!(!(!(!(!(!(!(!(!(+(!(!(!(!(!(!(!(!(!($(B - $B(#(*($(B $B(#(*($(B $B(#(*($(B - $B("#0("(B $B("#1("(B $B("#2("(B - $B(&(((%(B $B(&(((%(B $B(&(((%(B - $B("(B $B(#(!(!(!(!(+(!(!(!(!($(B $B("(B - $B(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(B - $B("(B $B#0(B.$B#0("("(B $B#1(B.$B#0("("(B $B#1(B.$B#1("("(B $B#1(B.$B#2("("(B $B#2(B.$B#0("(B - $B(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(B - - -

-$B$N$h$&$K?<$5(B n $B$N@a$K$OD9$5(B n $B$N@0?tNs$N@aHV9f$,?6$l$^$9!#$3$l(B -$B$r(B entity-number $B$H8F$S$^$9!#(Bentity-number $B$O(B S $B<0$H(B -$B$7$F$O(B (1 2 3) $B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#(B -

-mime-entity $B$G$O!"$3$l$HF1MM$N(B node-id $B$rMQ$$$^$9!#(B -node-id $B$O$A$g$&$I(B entity-number $B$r5U$K$7$?%j%9%H$G!"(Bentity-number -1.2.3 $B$KBP1~$9$k(B node-id $B$O(B (3 2 1) $B$G$9!#(B -

-$BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B -$B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer -local $BJQ?t(B mime-message-structure $B$K3JG<$9$k$3$H$K$7$^$9!#(B -$B$=$7$F!"(Bentity-number $B$d(B node-id $B$rMQ$$$k$3$H$G(B -mime-message-structure $B$K$*$1$k(B entity $B$NAjBPE*$J0LCV4X78$r(B -$B07$&$3$H$,$G$-$^$9!#(B

Entity $B$N@8@.(B @@ -119,6 +85,51 @@ node="mm-backend">

Entity $B3,AX(B Entity hierarchy

+MIME message $B$O(B entity $B$rC10L$H$9$kLZ9=B$$K$J$C$F$$$^$9!#(B +

+$B$3$NLZ$K$*$$$F:,$H$J$k@a$O(B message $BA4BN$rI=$9(B entity $B$G$9!#$3$3$G$O!"(B +$B$3$l$r(B root-entity $B$b$7$/$O(B +message $B$H8F$S$^$9!#(B +

+root-entity $B0J30$N(B entity $B$O?F$r;}$A$^$9!#$^$?!"(Bentity $B$O;R6!$r;}$D$+(B +$B$bCN$l$^$;$s!#$3$N?F;R4X78$r9M$($k$3$H$G(B entity $B$NAjBP4X78$r07$&$3$H$,(B +$B$G$-$^$9!#(B +

+$B0lJ}!"(Bentity $B$N(B message $B$K$*$1$k0LCV$r9M$($k$3$H$b$G$-$^$9!#(B +

+entity $B$O$3$NLZ$K$*$1$k@a$H$J$j$^$9$,!"$3$NLZ$K$O?<$5$HF1$8?<$5$NCf$N(B +$B=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B + + + $B(#(!(!(!($(B + $B("(B nil $B("(B + $B(&(!(((!(%(B + $B(#(!(!(!(!(!(!(!(!(!(+(!(!(!(!(!(!(!(!(!($(B + $B(#(*($(B $B(#(*($(B $B(#(*($(B + $B("#0("(B $B("#1("(B $B("#2("(B + $B(&(((%(B $B(&(((%(B $B(&(((%(B + $B("(B $B(#(!(!(!(!(+(!(!(!(!($(B $B("(B + $B(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(B + $B("(B $B#0(B.$B#0("("(B $B#1(B.$B#0("("(B $B#1(B.$B#1("("(B $B#1(B.$B#2("("(B $B#2(B.$B#0("(B + $B(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(B + + +

+$B$N$h$&$K?<$5(B n $B$N@a$K$OD9$5(B n $B$N@0?tNs$N@aHV9f$,?6$l$^$9!#$3$l(B +$B$r(B entity-number $B$H8F$S$^$9!#(Bentity-number $B$O(B S $B<0$H(B +$B$7$F$O(B (1 2 3) $B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#(B +

+mime-entity $B$G$O!"$3$l$HF1MM$N(B node-id $B$rMQ$$$^$9!#(B +node-id $B$O$A$g$&$I(B entity-number $B$r5U$K$7$?%j%9%H$G!"(Bentity-number +1.2.3 $B$KBP1~$9$k(B node-id $B$O(B (3 2 1) $B$G$9!#(B +

+$BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B +$B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer +local $BJQ?t(B mime-message-structure $B$K3JG<$9$k$3$H$K$7$^$9!#(B +

+mime-message-structure $B$r5/E@$K(B entity-number $B$d(B node-id +$B$G<($5$l$k(B entity $B$r

$B8=:_$N(B buffer $B$K$*$1$k(B message $BA4BN$N(B mime-entity $B9=B$BN$r3JG<$9$k(B diff --git a/mime-ja.texi b/mime-ja.texi index 7474bc2..c2df06a 100644 --- a/mime-ja.texi +++ b/mime-ja.texi @@ -55,8 +55,6 @@ FLIM $B$NDs6!$9$k(B MIME $B5!G=$r;H$&$?$a$K$O(B @node Entity, Content-Type, How to use, Top @chapter Message $B$H(B Entity -@cindex node-id -@cindex entity-number @cindex mime-entity @cindex entity @@ -66,46 +64,11 @@ field $B$HFbMF$r;X$9!W$H$J$C$F$$$^$9!#$3$3$G$O!"(BMIME $B$GDj5A$5$l$?(B head field $B0J30$NA4$F$N(B header $B$H(B body $B$r;X$98l$H$7$F(B @strong{entity}$B$rMQ$$$k(B $B$3$H$K$7$^$9!#(B@refill -RFC 2045 $B$NDj5A$O!"(BMIME message $B$,(B entity $B$rC10L$H$9$kLZ9=B$$G$"$k$3$H$r(B -$B<($7$F$$$^$9!#(Bmessage $B$O2pJs$rI=8=$9$k$?$a$K(B@strong{mime-entity} $B9=B$BN$rMQ$$$^(B -$B$9!#0J2<$G$OC1$K(B mime-entity $B$H8F$V$3$H$K$7$^$9!#(B@refill - -$BA0=R$N$h$&$K!"(Bmessage $BCf$N3F(B entity $B$OLZ$N@a$KEv$?$j$^$9$,!"$3$NLZ$K$O(B -$B?<$5$HF1$8?<$5$NCf$N=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B -@example - - $B(#(!(!(!($(B - $B("(B nil $B("(B - $B(&(!(((!(%(B - $B(#(!(!(!(!(!(!(!(!(!(+(!(!(!(!(!(!(!(!(!($(B - $B(#(*($(B $B(#(*($(B $B(#(*($(B - $B("#0("(B $B("#1("(B $B("#2("(B - $B(&(((%(B $B(&(((%(B $B(&(((%(B - $B("(B $B(#(!(!(!(!(+(!(!(!(!($(B $B("(B - $B(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(B - $B("(B $B#0(B.$B#0("("(B $B#1(B.$B#0("("(B $B#1(B.$B#1("("(B $B#1(B.$B#2("("(B $B#2(B.$B#0("(B - $B(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(B -@end example - -@noindent -$B$N$h$&$K?<$5(B n $B$N@a$K$OD9$5(B n $B$N@0?tNs$N@aHV9f$,?6$l$^$9!#$3$l(B -$B$r(B @strong{entity-number} $B$H8F$S$^$9!#(Bentity-number $B$O(B S $B<0$H(B -$B$7$F$O(B @code{(1 2 3)} $B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#(B - -mime-entity $B$G$O!"$3$l$HF1MM$N(B @strong{node-id} $B$rMQ$$$^$9!#(Bnode-id $B$O$A$g(B -$B$&$I(B entity-number $B$r5U$K$7$?%j%9%H$G!"(Bentity-number 1.2.3 $B$KBP1~$9$k(B -node-id $B$O(B @code{(3 2 1)} $B$G$9!#(B@refill - -$BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B -$B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer -local $BJQ?t(B @code{mime-message-structure} $B$K3JG<$9$k$3$H$K$7$^$9!#(B -$B$=$7$F!"(Bentity-number $B$d(B node-id $B$rMQ$$$k$3$H$G(B -@code{mime-message-structure} $B$K$*$1$k(B entity $B$NAjBPE*$J0LCV4X78$r(B -$B07$&$3$H$,$G$-$^$9!#(B +FLIM $B$O(B entity $B$N>pJs$rI=8=$9$k$?$a$K(B@strong{mime-entity} $B9=(B +$BB$BN$rMQ$$$^$9!#0J2<$G$OC1$K(B mime-entity $B$H8F$V$3$H$K$7$^$9!#(B @menu @@ -147,6 +110,54 @@ on representation-type. @node Entity hierarchy, Entity Attributes, Entity creation, Entity @section Entity $B3,AX(B +@cindex node-id +@cindex entity-number +@cindex message +@cindex root-entity + +MIME message $B$O(B entity $B$rC10L$H$9$kLZ9=B$$K$J$C$F$$$^$9!#(B@refill + +$B$3$NLZ$K$*$$$F:,$H$J$k@a$O(B message $BA4BN$rI=$9(B entity $B$G$9!#$3$3$G$O!"$3(B +$B$l$r(B @strong{root-entity} $B$b$7$/$O(B@strong{message} $B$H8F$S$^$9!#(B@refill + +root-entity $B0J30$N(B entity $B$O?F$r;}$A$^$9!#$^$?!"(Bentity $B$O;R6!$r;}$D$+$b(B +$BCN$l$^$;$s!#$3$N?F;R4X78$r9M$($k$3$H$G(B entity $B$NAjBP4X78$r07$&$3$H$,$G$-(B +$B$^$9!#(B@refill + +$B0lJ}!"(Bentity $B$N(B message $B$K$*$1$k0LCV$r9M$($k$3$H$b$G$-$^$9!#(B@refill + +entity $B$O$3$NLZ$K$*$1$k@a$H$J$j$^$9$,!"$3$NLZ$K$O?<$5$HF1$8?<$5$NCf$N(B +$B=gHV$K=>$C$FHV9f$,IU$1$k$3$H$,$G$-$^$9!#B($A!"(B +@example + + $B(#(!(!(!($(B + $B("(B nil $B("(B + $B(&(!(((!(%(B + $B(#(!(!(!(!(!(!(!(!(!(+(!(!(!(!(!(!(!(!(!($(B + $B(#(*($(B $B(#(*($(B $B(#(*($(B + $B("#0("(B $B("#1("(B $B("#2("(B + $B(&(((%(B $B(&(((%(B $B(&(((%(B + $B("(B $B(#(!(!(!(!(+(!(!(!(!($(B $B("(B + $B(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(#(!(*(!($(B + $B("(B $B#0(B.$B#0("("(B $B#1(B.$B#0("("(B $B#1(B.$B#1("("(B $B#1(B.$B#2("("(B $B#2(B.$B#0("(B + $B(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(&(!(!(!(%(B +@end example + +@noindent +$B$N$h$&$K?<$5(B n $B$N@a$K$OD9$5(B n $B$N@0?tNs$N@aHV9f$,?6$l$^$9!#$3$l(B +$B$r(B @strong{entity-number} $B$H8F$S$^$9!#(Bentity-number $B$O(B S $B<0$H(B +$B$7$F$O(B @code{(1 2 3)} $B$N$h$&$J@0?t$N%j%9%H$H$7$FI=8=$5$l$^$9!#(B + +mime-entity $B$G$O!"$3$l$HF1MM$N(B @strong{node-id} $B$rMQ$$$^$9!#(Bnode-id $B$O$A$g(B +$B$&$I(B entity-number $B$r5U$K$7$?%j%9%H$G!"(Bentity-number 1.2.3 $B$KBP1~$9$k(B +node-id $B$O(B @code{(3 2 1)} $B$G$9!#(B@refill + +$BA0=R$N$h$&$K!"(BMIME message $B$O(B entity $B$rC10L$H$7$?LZ9=B$$K$J$C$F$$$k$N$G!"(B +$B$3$N:,$G$"$k(B message $BA4BN$b(B mime-entity $B$GI=8=$9$k$3$H$,$G$-!"(Bbuffer +local $BJQ?t(B @code{mime-message-structure} $B$K3JG<$9$k$3$H$K$7$^$9!#(B@refill + +@code{mime-message-structure} $B$r5/E@$K(B entity-number $B$d(B node-id +$B$G<($5$l$k(B entity $B$r