--az5kW0TMd/poaVZ8
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=mutta03411

¤­¤¯¤¿¤Ë¡÷¤×¡Á¤¿¤í¡Á¤Ç¤¹¡£

Tue, Feb 10, 1998 at 06:04:35PM +0900 ¤Ë¤ª¤¤¤Æ
Yukihiro Matsumoto ¤µ¤óÛ©¤¯:

>   ɸ饤¥Ö¥é¥ê¤Ë¤¢¤ëÉôʬ¤¤¤¨Â±°¤Â¡Á200¹ÔÄøÅٰʲ¼
>   # ɬÍפÊÉôʬ¤òɸ饤¥Ö¥é¥ê¤ËÄɲ䷤Ƥ·¤Þ¤¦¤Î¤Ï¥¢¥ê¤Ç¤¹¡¨Â

  ¤¢¤ëÄøÅÙ¼ÂÍѾå°ÕÌ£¤Î¤¢¤ë¥×¥í¥°¥é¥à
> 
>   ´Êñ¤Ê»È¤¤Êý¤ÎÀâÌÀÉÕ¤­

ruby¤òÃΤäÆá¤¤¤¿¤Î¤¬¤³¤¨Â¤Âº£¼ê¤òÆþ¤ì¤¿¤±¤É)¡£
mime¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤Ê¤¤¥á¥¤¥é¤Ë¡¢mime¤Î¥Þ¥ë¥Á¥Ñ¡¼¥È¤Ç
Á÷¤ê¤Ä¤±¤é¤ì¤Æ¤¯¤ë¤Èº¤¤ë¤Î¤Ç¡¢¤³¤ì¤ò»È¤Ã¤Æ¤Þ¤·¤¿¡£

¤³¤ó¤Ê¤ó¤Ç¤¤¤¤¤Ç¤¹¤«¡©

-- 
¿ÍÀ¸¤òÇØÉ餤Åꤲ

µÆÃ« À¿(Kikutani Makoto)  kikutani / eis.or.jp hgf03701 / niftyserve.or.jp
                          http://www.eis.or.jp/muse/kikutani/

--az5kW0TMd/poaVZ8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=b64dec

#!/usr/local/bin/ruby
#   decode base64encoded multpart mail for non-mime-supported mailer
#   usage: b64dec [file]

require "base64.rb"

class Body
  def initialize(pn)
    @part_num  n
    @body  il
    @filename  il
    @method  il
  end

  attr("filename", TRUE)
  attr("method", TRUE)

  def append(s)
    @body + 
  end

  def decode
    begin
      if @method "base64"
	@filename  printf("part%d\.decoded", @part_num) unless @filename
	fd  pen(@filename, "w")
	printf(fd, "%s", decode64(@body))
      else
	@filename  printf("part%d", @part_num) unless @filename
	fd  pen(@filename, "w")
	printf(fd, "%s", @body)
      end
      fd.close
      printf($stderr, "%s created\n", @filename) 
    rescue
      printf($stderr, "couldn't write %s\n", @filename) 	
    end
  end
end

body  il
boundary  il
part_num  

while gets
  if /boundary(.*)\"/ # multipart boundary string has double quote
    rex  egexp.quote($1)
    boundary  ^--#{rex}/
  elsif /boundary*)/
    rex  egexp.quote($1)
    boundary  ^--#{rex}/
  elsif boundary && $_ boundary # beginning or end of multipart
    part_num + 
    if body
      body.decode
    end
    body  ody.new(part_num)
  elsif /^Content-Transfer-Encoding: (\S+)/
    body.method  1 if body && part_num > 0
  elsif /^Content-Disposition:.*filename(.*)\"/
    body.filename  1 if body
  elsif /^Content-.*:/
    # do nothing
  else
    body.append($_) if body
  end
end

--az5kW0TMd/poaVZ8--