From d3113b94f2d2275a635e92386237b4ec224cf9b0 Mon Sep 17 00:00:00 2001 From: sokumura Date: Thu, 29 Apr 1999 13:15:01 +0000 Subject: [PATCH] * mime-view.el (mime-dsiplay-application/x-postpet): more adding pet's data. i.e. health ,treasure and happiness --- ChangeLog | 5 ++++ mime-edit.el | 4 +-- mime-view.el | 95 +++++++++++++++++++++++++++++++++++++++------------------- 3 files changed, 72 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2bb53d2..8f816a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-04-29 Shigeru OKUMURA + + * mime-view.el (mime-dsiplay-application/x-postpet): + more adding pet's data. i.e. health ,treasure and happiness + 1999-04-08 Shigeru OKUMURA * mime-view.el (mime-displya-application/x-postpet): diff --git a/mime-edit.el b/mime-edit.el index 230d16c..9457189 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -502,8 +502,8 @@ If encoding is nil, it is determined from its contents." "A string formatted version of mime-transfer-level") (make-variable-buffer-local 'mime-transfer-level-string) -(put 'iso-2022-jp-2 'mime-charset-comment "RFC1554") -(put 'iso-2022-jp 'mime-charset-comment "RFC1468 with trivial bugfix") +;;(put 'iso-2022-jp-2 'mime-charset-comment "RFC1554") +;;(put 'iso-2022-jp 'mime-charset-comment "RFC1468 with trivial bugfix") ;;; @@ about content transfer encoding diff --git a/mime-view.el b/mime-view.el index 00e5685..4b88e52 100644 --- a/mime-view.el +++ b/mime-view.el @@ -553,60 +553,89 @@ Each elements are regexp of field-name.") petname owner pettype from carryingcount sentyear sentmonth sentday petbirthyear petbirthmonth petbirthday + brain health happiness sex treasure money ) + (setq p (+ p 4)) + (setq carryingcount - (+ ( char-int (aref contents (1+ (1+ (1+ p))))) - (* 256 (char-int (aref contents (1+ (1+ p))))) + (+ (char-int (aref contents (+ 3 p))) + (* 256 (char-int (aref contents (+ 2 p)))) (* 256 256 (char-int (aref contents (1+ p)))) - (* 256 256 256 (char-int (aref contents p))) - ) - ) + (* 256 256 256 (char-int (aref contents p))))) (setq p (+ p 4)) + (setq p (+ p 8)) + (setq sentyear - (+ ( char-int (aref contents (1+ p))) - (* 256 (char-int (aref contents p))) - ) - ) + (+ (char-int (aref contents (1+ p))) + (* 256 (char-int (aref contents p))))) (setq p (+ p 2)) + (setq sentmonth - (+ ( char-int (aref contents (1+ p))) - (* 256 (char-int (aref contents p))) - ) - ) + (+ (char-int (aref contents (1+ p))) + (* 256 (char-int (aref contents p))))) (setq p (+ p 2)) + (setq sentday - (+ ( char-int (aref contents (1+ p))) - (* 256 (char-int (aref contents p))) - ) - ) + (+ (char-int (aref contents (1+ p))) + (* 256 (char-int (aref contents p))))) (setq p (+ p 2)) + (setq p (+ p 8)) + (setq petname (decode-mime-charset-string (substring contents (1+ p) (setq p (+ p 1 (char-int (aref contents p))))) 'shift_jis)) (setq owner (decode-mime-charset-string (substring contents (1+ p) (setq p (+ p 1 (char-int (aref contents p))))) 'shift_jis)) (setq pettype (substring contents p (setq p (+ p 4)))) - (setq p (+ p 64)) + +;; (setq p (+ p 1)) +;; (setq health (char-int (aref contents p))) + ;; 2 byte + (setq health (+ (char-int (aref contents (1+ p))) + (* 256 (char-int (aref contents p))))) + (setq p (+ p 1)) + + (setq p (+ p 2)) + (setq p (+ p 4)) + (setq sex (char-int (aref contents p))) + + (setq p (+ p 2)) + (setq brain (char-int (aref contents p))) + (setq p (+ p 40)) + (setq happiness (char-int (aref contents p))) + (setq p (+ p 15)) + (setq petbirthyear - (+ ( char-int (aref contents (1+ p))) - (* 256 (char-int (aref contents p))) - ) - ) + (+ (char-int (aref contents (1+ p))) + (* 256 (char-int (aref contents p))))) (setq p (+ p 2)) + (setq petbirthmonth - (+ ( char-int (aref contents (1+ p))) - (* 256 (char-int (aref contents p))) - ) - ) + (+ (char-int (aref contents (1+ p))) + (* 256 (char-int (aref contents p))))) (setq p (+ p 2)) + (setq petbirthday - (+ ( char-int (aref contents (1+ p))) - (* 256 (char-int (aref contents p))) - ) - ) + (+ (char-int (aref contents (1+ p))) + (* 256 (char-int (aref contents p))))) (setq p (+ p 2)) + (setq p (+ p 8)) (setq from (substring contents (1+ p) (setq p (+ p 1 (char-int (aref contents p)))))) + (setq p (+ p 5)) + (setq p (+ p 160)) + (setq p (+ p 4)) + (setq p (+ p 8)) + + (setq p (+ p 8)) + (setq p (+ p 26)) + (setq p (+ p 1)) + (setq treasure (char-int (aref contents p))) + (setq p (+ p 1)) + (setq money (+ (char-int (aref contents (+ 3 p))) + (* 256 (char-int (aref contents (+ 2 p)))) + (* 256 256 (char-int (aref contents (1+ p)))) + (* 256 256 256 (char-int (aref contents p))))) (insert "Petname: " petname "\n" "Owner: " owner "\n" "Pettype: " pettype "\n" @@ -618,6 +647,12 @@ Each elements are regexp of field-name.") "PetbirthYear: " (int-to-string petbirthyear) "\n" "PetbirthMonth: " (int-to-string petbirthmonth) "\n" "PetbirthDay: " (int-to-string petbirthday) "\n" + "Health: " (int-to-string health) "\n" + "Sex: " (int-to-string sex) "\n" + "Brain: " (int-to-string brain) "\n" + "Happiness: " (int-to-string happiness) "\n" + "Treasure: " (int-to-string treasure) "\n" + "Money: " (int-to-string money) "\n" ) (run-hooks 'mime-display-application/x-postpet-hook)))) -- 1.7.10.4