山田邦博です。

Cafe の bug fixed です。 Version 2.3-patch.1 です。

複素数を手軽に扱える(RPN)関数電卓です。
電気・電子工学の研究開発に携わる研究者、技術者のためのものです。

バグは Blank operator(Multiplication) と Dot operator(String
cancatination) に関するもので、
               pi .5
のような式で問題を起こしていました。
        上式は (pi * 0.5) と解釈されるべきですが、(pi . 5) と解釈され
        ていました。 pi も 5 も数値で、 dot operator (.) は文字列の連
        結でエラーとなっていました。
        このエラーになかなか直面しなかったのは、数値は RPN calculator
        で計算する事が普通だったのと、上式の場合は .5pi と入力するのが
        常だったからでしょう。

-...-

アーカイブ:
----------
Cafe Ver.2.3-patch.1 の全てのファイルは
        http://www.tksa.gr.jp/king/Software/Cafe/V2.3/Cafe_2.3-patch.1.tgz
または
        ftp://ftp.tksa.gr.jp/king/Cafe/Cafe_2.3-patch.1.tgz
にあります。

最新の Cafe (patch 版を含む)については
        http://www.tksa.gr.jp/king/Software/Cafe/
からたどって下さい。

また、最新および過去の全てのバージョンは
        ftp://ftp.tksa.gr.jp/king/Cafe/
以下に納められています。

-...-

以下に Ver.2.3 に対する diff を最後に添付します。
文書(doc)は diff だけ、プログラム(bin)は diff+shar です。



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


##### (BEGIN) cut here for documents #####
diff -ur Cafe_2.3/doc/README.jp.txt Cafe_2.3-patch.1/doc/README.jp.txt
--- Cafe_2.3/doc/README.jp.txt  2005-01-09 23:03:27.000000000 +0900
+++ Cafe_2.3-patch.1/doc/README.jp.txt  2005-01-12 00:45:55.000000000 +0900
@@ -817,7 +817,7 @@
                        # 最後に改行 "\n" がない場合は強制的に改行が挿
                        # 入される。
        warn            # 引数は文字列。 STDERR に出力する。 スタックに
-                       # は積まれない。 引数が文字列出ない場合は今日静
+                       # は積まれない。 引数が文字列でない場合は強制
                        # 的に文字化される。 文字列の最後に改行 "\n" が
                        # ない場合は強制的に改行が挿入される。
        ps              # stack 上の要素を表示する。
diff -ur Cafe_2.3/doc/change.log Cafe_2.3-patch.1/doc/change.log
--- Cafe_2.3/doc/change.log     2005-01-10 00:57:31.000000000 +0900
+++ Cafe_2.3-patch.1/doc/change.log     2005-08-25 18:36:55.000000000 +0900
@@ -1,3 +1,19 @@
+25 Aug.2005
+       Version: 2.3-patch.1 : released.
+
+22 Aug.2005
+       cafe: displayed -D option in help.
+
+21 Aug.2005
+       Cafe.pm:
+         bug fixed: treated as a decimal dot instead of a dot operator
+         when a blank operator follows a decimal that begins with a dot,
+         for example, (pi .5).
+       define.cafe: set version same as Cafe.pm for diagnosis.
+
+12 Jan.2005
+       README.jp.txt: corrected typo.
+
 10 Jan.2005
        Version 2.3 : released.
 
##### (END) cut here for documents #####

-...-

##### (BEGIN) cut here for binaries #####
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2005-08-25 19:26 JST by <king@gorobeh>.
# Source directory was `/home/king/tmp'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   1508 -rw-r----- Cafe_2.3-patch.1.bin-lib.diff
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
  shar_touch='touch -am $3$4$5$6$2 "$8"'
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh04641; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= Cafe_2.3-patch.1.bin-lib.diff ==============
if test -f 'Cafe_2.3-patch.1.bin-lib.diff' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'Cafe_2.3-patch.1.bin-lib.diff' '(file already exists)'
else
  $echo 'x -' extracting 'Cafe_2.3-patch.1.bin-lib.diff' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'Cafe_2.3-patch.1.bin-lib.diff' &&
diff -u Cafe_2.3/bin/cafe Cafe_2.3-patch.1/bin/cafe
--- Cafe_2.3/bin/cafe   2005-01-10 00:51:19.000000000 +0900
+++ Cafe_2.3-patch.1/bin/cafe   2005-08-22 02:31:30.000000000 +0900
@@ -152,6 +152,7 @@
X  -s:        suppress reading system definition file(define.cafe).
X  -t:        terminate before inputting from the console.
X  -v:        display the version number of the Cafe, and terminate.
+ -D:        Debug
X 
X =head1 USAGE
X 
diff -u Cafe_2.3/lib/Cafe.pm Cafe_2.3-patch.1/lib/Cafe.pm
--- Cafe_2.3/lib/Cafe.pm        2005-01-10 00:54:20.000000000 +0900
+++ Cafe_2.3-patch.1/lib/Cafe.pm        2005-08-21 23:05:00.000000000 +0900
@@ -81,7 +81,7 @@
X ###  Constants  ###
X ###################
X 
-my $VERSION = "2.3";
+my $VERSION = "2.3-patch.1";
X 
X my $INF = 1e9999999999;
X my $NAN = $INF - $INF;
@@ -3209,7 +3209,7 @@
X     my $v;
X     if (@binary and not ref $binary[0]) {
X       ### check special binary operator ###
-      if (s/^($PTN_BINARY)\s*//o) {
+      if (not /^\.\d/  and  s/^($PTN_BINARY)\s*//o) {
X       my $id = $1;
X       $cmdpnt += length($&);
X       $v = getID($id);
diff -u Cafe_2.3/lib/define.cafe Cafe_2.3-patch.1/lib/define.cafe
--- Cafe_2.3/lib/define.cafe    2005-01-10 00:54:43.000000000 +0900
+++ Cafe_2.3-patch.1/lib/define.cafe    2005-08-21 23:06:01.000000000 +0900
@@ -22,7 +22,7 @@
X #   10 Jan.2005   Ver.2.3
X #
X 
-def DEFVER=="2.3";   # Version number of define.cafe
+def DEFVER=="2.3-patch.1";   # Version number of define.cafe
X 
X def Version() = {     # Print version                 \
X       print "\tcafe system : version $(sysver)\n";  \
SHAR_EOF
  (set 20 05 08 25 19 23 11 'Cafe_2.3-patch.1.bin-lib.diff'; eval "$shar_touch") &&
  chmod 0640 'Cafe_2.3-patch.1.bin-lib.diff' ||
  $echo 'restore of' 'Cafe_2.3-patch.1.bin-lib.diff' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'Cafe_2.3-patch.1.bin-lib.diff:' 'MD5 check failed'
abe8ecc7a6f90ef61251e6f5e27aa131  Cafe_2.3-patch.1.bin-lib.diff
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'Cafe_2.3-patch.1.bin-lib.diff'`"
    test 1508 -eq "$shar_count" ||
    $echo 'Cafe_2.3-patch.1.bin-lib.diff:' 'original size' '1508,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh04641
exit 0