しらいです。

 file & directory 管理ツール FDclone 2.09 の patch その 1
です。

Submitted-by: shirai@chandra2
Archive-name: FD-2.09.patch/part01

---- Cut Here and feed the following to sh ----
#!/bin/sh
# This is FD-2.09.patch, a shell archive (produced by GNU sharutils 4.2)
# 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 2006-08-22 00:00 JST by <shirai@chandra2>.
# Source directory was `/usr/home/shirai/src/fd2'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This is part 1 of a multipart archive.                                   
# Do not concatenate these parts, unpack them in order with `/bin/sh'.     
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
# 493669 -rw-r--r-- FD-2.09.patch
#
echo=echo
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
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 1231235999 $$.touch
#
if mkdir _sh00904; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
if test -r _sh00904/seq; then
  $echo 'Must unpack archives in sequence!'
  $echo 'Please unpack part' '`cat _sh00904/seq`' 'next!'
  exit 1
fi
# ============= FD-2.09.patch ==============
if test -f 'FD-2.09.patch' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'FD-2.09.patch' '(file already exists)'
  rm -f _sh00904/new
else
  > _sh00904/new
  $echo 'x -' extracting 'FD-2.09.patch' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'FD-2.09.patch' &&
diff -urNP ../FD-2.08f/FAQ ./FAQ
--- ../FD-2.08f/FAQ     Tue Aug  8 00:00:00 2006
+++ ./FAQ       Tue Aug 22 00:00:00 2006
@@ -110,11 +110,14 @@
X       ードの側に合わせることは、残念ながらできません。悪し
X       からず。
X 
+       (Ver. 2.09 以降は内部変数 (または環境変数) FUNCLAYOUT
+       によってファンクションキーの表示レイアウトを設定でき
+       ます。)
+
X Q2-05.        どういう風にカスタマイズされたかを確認したいのですが。
X A2-05.        EXECUTE_SH コマンドにある組込みコマンドで確認できま
X       す。例えば、キー割当てならば printbind、内部変数定義
-       ならば printenv です。詳しくは man ページを参照して
-       下さい。
+       ならば set です。詳しくは man ページを参照して下さい。
X 
X       (Ver. 2.00 以降ではカスタマイザ画面で設定内容を統合
X       的に確認・設定できます。)
@@ -577,6 +580,10 @@
X       で持ち越すべきものでもなく、また保存ファイルの管理等
X       面倒な問題も生じるので、パス名履歴は保存しない仕様に
X       してあります。
+
+       (Ver. 2.09 以降は内部変数 (または環境変数) SAVEDIRHIST
+       や DIRHISTFILE によってパス名履歴を保存する設定にで
+       きます。)
X 
X Q4-02.        INFO_FILESYS コマンドで、値が "?" となってしまうこと
X       があるのですが。
diff -urNP ../FD-2.08f/FAQ.eng ./FAQ.eng
--- ../FD-2.08f/FAQ.eng Tue Aug  8 00:00:00 2006
+++ ./FAQ.eng   Tue Aug 22 00:00:00 2006
@@ -103,14 +103,18 @@
X       you change a key binding of the function key into
X       your customization. See man page for details.
X       But, if your keyboard layout is different from the
-       function lines, you can not suit a display to a
+       function line, you can not suit a display to a
X       keyboard. Sorry.
X 
+       (You can set up the function line layout with the
+       internal variable (or the environment variable)
+       FUNCLAYOUT, from Ver. 2.09 downward.)
+
X Q2-05.        I want to confirm how it is customized.
X A2-05.        You can confirm with some builtin commands in EXECUTE_SH
X       command. For example, "printbind" for the key binding,
-       "printenv" for the internal variable definition. See
-       man page for details.
+       "set" for the internal variable definition. See man
+       page for details.
X 
X       (You can confirm and set up the configurations with
X       the customizer all at once, from Ver. 2.00 downward.)
@@ -594,6 +598,10 @@
X       troublesome problems such as management of a save
X       file, the pathname history has been made into the
X       specification not to save.
+
+       (You can set up to save the history of a pathname with
+       the internal variables (or the environment variables)
+       SAVEDIRHIST and DIRHISTFILE, from Ver. 2.09 downward.)
X 
X Q4-02.        Value by INFO_SYSTEM command may sometimes become "?".
X A4-02.        There is the case that it cannot get any file system
diff -urNP ../FD-2.08f/HISTORY ./HISTORY
--- ../FD-2.08f/HISTORY Tue Aug  8 00:00:00 2006
+++ ./HISTORY   Tue Aug 22 00:00:00 2006
@@ -1,3 +1,23 @@
+Ver. 2.09      内部変数 IMEKEY, IMEBUFFER の追加。
+ (08/22/06)    内部変数 BASICCUSTOM の追加。
+               内部変数 PROGRESSBAR, PRECOPYMENU の追加。
+               内部変数 SAVEDIRHIST, DIRHISTFILE の追加。
+               内部変数 FUNCLAYOUT の追加。
+               内部変数 MESSAGELANG の追加。
+               内部変数 LANGUAGE 等の設定値に UTF8-iconv の追加。
+               内部変数 UTF8ICONVPATH の追加。
+               %JI マクロの追加。
+               内部変数 SORTTYPE にアーカイブブラウザのソート保存機能を追加。
+               内部変数 ANSIPALETTE に実行ファイルの配色を追加。
+               組込みコマンド setroman, printroman の追加。
+               組込みコマンド bind が F20 までコメント指定可能に。
+               疑似端末メニューに漢字入力を追加。
+               疑似端末メニューの文字コード入力で漢字コードに対応。
+               PTYMODE=1 時に Cygwin でフリーズしていた点を修正。
+               ログ出力指定時に異常終了することがある点を修正。
+               UTF8 のファイル名が扱えない点を修正。
+               UNICODEBUFFER=1 時に UTF8 環境で異常終了する点を修正。
+
X Ver. 2.08f    NFS 上の履歴セーブファイル保護用にファイルロックに対応。
X  (08/08/06)   非 ANSI 環境でコンパイルに失敗する点を修正。
X               Cygwin 1.5.21 対応。
diff -urNP ../FD-2.08f/HISTORY.eng ./HISTORY.eng
--- ../FD-2.08f/HISTORY.eng     Tue Aug  8 00:00:00 2006
+++ ./HISTORY.eng       Tue Aug 22 00:00:00 2006
@@ -1,3 +1,23 @@
+Ver. 2.09      Add 'IMEKEY', 'IMEBUFFER' internal variables.
+ (08/22/06)    Add 'BASICCUSTOM' internal variable.
+               Add 'PROGRESSBAR', 'PRECOPYMENU' internal variables.
+               Add 'SAVEDIRHIST', 'DIRHISTFILE' internal variables.
+               Add 'FUNCLAYOUT' internal variable.
+               Add 'MESSAGELANG' internal variable.
+               'LANGUAGE' etc. support the value of UTF8-iconv.
+               Add 'UTF8ICONVPATH' internal variable.
+               Add %JI macro.
+               'SORTTYPE' supports preserving sort type in archive browser.
+               'ANSIPALETTE' supports the color of executable files.
+               Add 'setroman', 'printroman' builtins.
+               Support specifying key comment up to F20 with 'bind' builtin.
+               Add Kanji input to the pseudo terminal menu.
+               Support Kanji code on 'InputCode' of the pseudo terminal menu.
+               Freezing when PTYMODE=1 on Cygwin is fixed.
+               Abortion when the log file is specified is fixed.
+               Bug that no UTF8 filename can be treated is fixed.
+               Abortion with the UTF8 environment on UNICODEBUFFER=1 is fixed.
+
X Ver. 2.08f    Support locking on NFS to protect the command history file.
X  (08/08/06)   Failure to compile on the non-ANSI environment is fixed.
X               Support Cygwin 1.5.21.
diff -urNP ../FD-2.08f/Install ./Install
--- ../FD-2.08f/Install Tue Aug  8 00:00:00 2006
+++ ./Install   Tue Aug 22 00:00:00 2006
@@ -18,34 +18,32 @@
X    無理に変更すると却って失敗しますので、そのまま次のステッ
X    プに進んで下さい。
X       Sun     SunOS           (5.x)
-       SGI     IRIX            (R5.x)
X       HP      HP-UX           (11.x)
-       DEC     OSF/1           (V4.x, V5.x)
X       (free)  Cygwin          (1.5.x)
X       (free)  Linux           (2.x)
X       (free)  FreeBSD         (2.x, 3.x, 4.x, 5.x)
X       (free)  NetBSD          (1.x, 2.x, 3.x)
X       (free)  OpenBSD         (2.x, 3.x)
X       ASCII   BSD on Windows  (1.0, 1.5)
-       Apple   Mac OS X        (10.x)
X 
-   また、以下の OS は、Ver. 2.05 での動作確認は行なわれてい
+   また、以下の OS は、Ver. 2.09 での動作確認は行なわれてい
X    ませんが、各 OS 用のコードが記述されていますので、多分変
X    更の必要がないものと思われます。
X    少なくとも、無変更のままコンパイルが無事通るようであれば、
X    余計な変更は行なわない方が無難だと思います。
X       Sun     SunOS           (4.1.x)
X       SONY    NEWS-OS         (3.2, 4.x, 6.x)
-       SGI     IRIX            (R4.0.5, R6.x)
+       SGI     IRIX            (R4.0.5, R5.x, R6.x)
X       HP      HP-UX           (9.x, 10.01)
X       HITACHI HI-UX/WE2       (01-x, 02-01, 04-02)
X       NEC     EWS-UX/V(Rel4.x)(R5.3, R7.1, R8.1, R9.1, R10.1, R12.3, R13.1)
X       OMRON   UniOS-U         (Ver3.00)
X       OMRON   UniOS-B         (2.00)
X       OMRON   Luna/Mach       (2.5)
-       DEC     OSF/1           (V1.2, V2.0, V3.2)
+       DEC     OSF/1           (V1.2, V2.0, V3.2, V4.x, V5.x)
X       DEC     ULTRIX          (V4.x)
X       IBM     AIX             (3.x, 4.x)
+       Apple   Mac OS X        (10.x)
X       Apple   A/UX            (3.0)
X       DG      DG/UX           (5.4)
X       Fujitsu UXP/M           (4.0, 4.1)
@@ -110,6 +108,9 @@
X    てからもう一度 make します。この場合、各ドキュメントの記
X    載と矛盾することにはなりますが、プログラム実行には支障あ
X    りません。
+   また、DICTSRC を書き換えることで、かな漢字変換辞書を標準
+   の単漢字辞書から他のものに変更することもできます。詳細は
+   TECHKNOW の項目 11. を参照して下さい。
X 
X 6. _fdrc を fdrc という名前でコピーし、fdrc を自分の環境に
X    応じて書き換えます。一から作成しても構いません。
diff -urNP ../FD-2.08f/Install.eng ./Install.eng
--- ../FD-2.08f/Install.eng     Tue Aug  8 00:00:00 2006
+++ ./Install.eng       Tue Aug 22 00:00:00 2006
@@ -19,34 +19,32 @@
X    these two configurations. If you force to change anything,
X    you will fail. So, you should go to the next step.
X       Sun     SunOS           (5.x)
-       SGI     IRIX            (R5.x)
X       HP      HP-UX           (11.x)
-       DEC     OSF/1           (V4.x, V5.x)
X       (free)  Cygwin          (1.5.x)
X       (free)  Linux           (2.x)
X       (free)  FreeBSD         (2.x, 3.x, 4.x, 5.x)
X       (free)  NetBSD          (1.x, 2.x, 3.x)
X       (free)  OpenBSD         (2.x, 3.x)
X       ASCII   BSD on Windows  (1.0, 1.5)
-       Apple   Mac OS X        (10.x)
X 
X    In the following OS, while it is not confirmed whether Ver.
-   2.05 will be running normally, the codes for these OS are
+   2.09 will be running normally, the codes for these OS are
X    described. Then you seem to need no change.
X    At least, if you can compile it with no change, it seems
X    that any changes are not necessary.
X       Sun     SunOS           (4.1.x)
X       SONY    NEWS-OS         (3.2, 4.x, 6.x)
-       SGI     IRIX            (R4.0.5, R6.x)
+       SGI     IRIX            (R4.0.5, R5.x, R6.x)
X       HP      HP-UX           (9.x, 10.01)
X       HITACHI HI-UX/WE2       (01-x, 02-01, 04-02)
X       NEC     EWS-UX/V(Rel4.x)(R5.3, R7.1, R8.1, R9.1, R10.1, R12.3, R13.1)
X       OMRON   UniOS-U         (Ver3.00)
X       OMRON   UniOS-B         (2.00)
X       OMRON   Luna/Mach       (2.5)
-       DEC     OSF/1           (V1.2, V2.0, V3.2)
+       DEC     OSF/1           (V1.2, V2.0, V3.2, V4.x, V5.x)
X       DEC     ULTRIX          (V4.x)
X       IBM     AIX             (3.x, 4.x)
+       Apple   Mac OS X        (10.x)
X       Apple   A/UX            (3.0)
X       DG      DG/UX           (5.4)
X       Fujitsu UXP/M           (4.0, 4.1)
@@ -113,6 +111,10 @@
X    clean" and do "make" again. In this case, while each
X    description in documentation is different from the fact,
X    there is no problem in executing this program.
+   You can rewrite also DICTSRC, to change the Kana-Kanji
+   translation dictionary from the standard Tan-Kanji
+   dictionary to the other one. You should refer the #11 in
+   TECHKNOW.eng for details.
X 
X 6. You can copy _fdrc as the name of fdrc, and rewrite fdrc
X    according to your environment. Or, you can create it from
diff -urNP ../FD-2.08f/Makefile ./Makefile
--- ../FD-2.08f/Makefile        Tue Aug  8 00:00:00 2006
+++ ./Makefile  Tue Aug 22 00:00:00 2006
@@ -12,9 +12,11 @@
X CC    = cc
X HOSTCC        = $(CC)
X SED   = sed
+DICTSRC        =
X 
X DEFCFLAGS = -DPREFIX='"'$(PREFIX)'"' \
X       -DCONFDIR='"'$(CONFDIR)'"' \
+       -DDICTSRC='"''$(DICTSRC)''"' \
X       -DFD=$(VERMAJ) \
X       -DCCCOMMAND='"'$(CC)'"' \
X       -DHOSTCCCOMMAND='"'$(HOSTCC)'"'
@@ -117,7 +119,7 @@
X makefile.bpc makefile.b98
X       $(MAKE) -f Makefile.tmp $@
X 
-clean: Makefile.tmp
+clean rmdict: Makefile.tmp
X       $(MAKE) -f Makefile.tmp $@
X       -rm -f Makefile.tmp mkmf.sed
X       -rm -f mkmfsed mkmfsed.exe
diff -urNP ../FD-2.08f/Makefile.in ./Makefile.in
--- ../FD-2.08f/Makefile.in     Tue Aug  8 00:00:00 2006
+++ ./Makefile.in       Tue Aug 22 00:00:00 2006
@@ -23,6 +23,9 @@
X BLDRC = $(BUILD)$(DEFRC)
X DOSRC = ~FD\\fd__RCVERSION__rc
X UNITBL        = fd-unicd.tbl
+DICTTBL        = fd-dict.tbl
+DICTTXT        = fd-dict.txt
+DICTSRC        = __DICTSRC__
X 
X SRC   = main.c printf.c termio.c term.c pathname.c \
X       system.c posixsh.c doscom.c log.c \
@@ -32,6 +35,7 @@
X       libc.c file.c apply.c \
X       parse.c builtin.c shell.c \
X       kanji.c input.c \
+       ime.c roman.c dict.c mkdict.c mktankan.c \
X       info.c rockridg.c archive.c tree.c \
X       custom.c command.c browse.c \
X       kanjicnv.c mkfuncno.c expfunc.c mkmfsed.c
@@ -40,7 +44,7 @@
X       wait.h system.h \
X       dosdisk.h \
X       unixdisk.h unixemu.h \
-       termemu.h \
+       termemu.h roman.h hinsi.h \
X       func.h functabl.h
X 
X DOC   = README.eng HISTORY.eng FAQ.eng TECHKNOW.eng \
@@ -95,7 +99,7 @@
X       pty__OBJ__ termemu__OBJ__ frontend__OBJ__ backend__OBJ__ \
X       libc__OBJ__ file__OBJ__ apply__OBJ__ \
X       parse__OBJ__ builtin__OBJ__ shell__OBJ__
-OBJ3   = kanji__OBJ__ input__OBJ__ \
+OBJ3   = kanji__OBJ__ input__OBJ__ __IMEOBJS__ \
X       info__OBJ__ rockridg__OBJ__ archive__OBJ__ tree__OBJ__ \
X       custom__OBJ__ command__OBJ__ browse__OBJ__
X SOBJ  = ssystem__OBJ__ sposixsh__OBJ__ sdoscom__OBJ__ \
@@ -120,7 +124,7 @@
X #     Dependency Rules
X ############################################################
X 
-all: $(PROGRAM)__EXE__ $(PROGRAM).$(MANSEC) __UNITBL__
+all: $(PROGRAM)__EXE__ $(PROGRAM).$(MANSEC) __UNITBL__ __DICTTBL__
X 
X $(PROGRAM)__EXE__: $(OBJ1) $(OBJ2) $(OBJ3) $(ARGS)
X       $(CC) __MEM__ __LNK__ __OBJLIST__ $(LDFLAGS)
@@ -210,19 +214,58 @@
X 
X 
X ############################################################
+# Kanji transfer table generating module
+
+$(DICTTBL): mkdict__EXE__ $(DICTSRC)
+       ./mkdict$(EXE) __MKDICTOPTION__ $@ $(DICTSRC)
+
+mkdict__EXE__: mkdict__OBJ__ troman__OBJ__ tkanji__OBJ__
+       $(HOSTCC) $(HOSTCFLAGS) $(CPPFLAGS) __LNK__ mkdict__OBJ__ troman__OBJ__ tkanji__OBJ__
+       __RENAME__ $@ mkdict
+       __AOUT2EXE__ mkdict
+       __REMOVE__ mkdict
+
+mktankan__EXE__: mktankan__OBJ__ troman__OBJ__ tkanji__OBJ__
+       $(HOSTCC) $(HOSTCFLAGS) $(CPPFLAGS) __LNK__ mktankan__OBJ__ troman__OBJ__ tkanji__OBJ__
+       __RENAME__ $@ mktankan
+       __AOUT2EXE__ mktankan
+       __REMOVE__ mktankan
+
+mkdict__OBJ__: mkdict.c machine.h config.h printf.h kctype.h roman.h
+       $(HOSTCC) $(HOSTCFLAGS) $(CPPFLAGS) -c __OUT__ mkdict.c
+
+mktankan__OBJ__: mktankan.c machine.h config.h printf.h kctype.h roman.h
+       $(HOSTCC) $(HOSTCFLAGS) $(CPPFLAGS) -c __OUT__ mktankan.c
+
+troman__OBJ__: roman.c machine.h config.h printf.h kctype.h roman.h
+       $(HOSTCC) $(HOSTCFLAGS) $(CPPFLAGS) -c __OUT__ roman.c
+
+tkanji__OBJ__: kanji.c machine.h config.h printf.h kctype.h
+       $(HOSTCC) $(HOSTCFLAGS) $(CPPFLAGS) -c __OUT__ kanji.c
+
+rmdict:
+       -$(RM) $(DICTTBL)
+
+$(DICTTXT): mktankan__EXE__
+       ./mktankan$(EXE) $@
+
+
+############################################################
X # to install all
X 
-install: $(PROGRAM)__EXE__ $(PROGRAM).$(MANSEC) __UNITBL__
+install: $(PROGRAM)__EXE__ $(PROGRAM).$(MANSEC) __UNITBL__ __DICTTBL__
X       $(INSTALL) __INSTSTRIP__ $(PROGRAM)$(EXE) $(BINDIR)
X       $(CHMOD) a+rx $(BINDIR)/$(PROGRAM)$(EXE)
X       -$(RM) $(BINDIR)/$(ALIAS)$(EXE)
X       $(LN) $(BINDIR)/$(PROGRAM)$(EXE) $(BINDIR)/$(ALIAS)$(EXE)
X       $(CHMOD) a+rx $(BINDIR)/$(ALIAS)$(EXE)
+       [ -d $(JMANDIR) ] || mkdir $(JMANDIR)
X       $(INSTALL) $(PROGRAM).$(MANSEC) $(JMANDIR)/$(PROGRAM).$(MANSEC)
X       $(CHMOD) a+r-x $(JMANDIR)/$(PROGRAM).$(MANSEC)
X       -$(RM) $(JMANDIR)/$(ALIAS).$(MANSEC)
X       $(LN) $(JMANDIR)/$(PROGRAM).$(MANSEC) $(JMANDIR)/$(ALIAS).$(MANSEC)
X       $(CHMOD) a+r-x $(JMANDIR)/$(ALIAS).$(MANSEC)
+       [ -d $(MANDIR) ] || mkdir $(MANDIR)
X       $(INSTALL) $(MANSRC) $(MANDIR)/$(PROGRAM).$(MANSEC)
X       $(CHMOD) a+r-x $(MANDIR)/$(PROGRAM).$(MANSEC)
X       -$(RM) $(MANDIR)/$(ALIAS).$(MANSEC)
@@ -237,6 +280,11 @@
X               $(INSTALL) $(UNITBL) __DATADIR__; \
X               $(CHMOD) a+r-x __DATADIR__/$(UNITBL); \
X       fi
+       -if [ -f $(DICTTBL) ]; then \
+               [ -d __DATADIR__ ] || mkdir __DATADIR__; \
+               $(INSTALL) $(DICTTBL) __DATADIR__; \
+               $(CHMOD) a+r-x __DATADIR__/$(DICTTBL); \
+       fi
X 
X catman: $(MANCAT)
X       $(INSTALL) $(MANCAT) $(CATDIR)/$(PROGRAM).$(MANSEC)
@@ -418,7 +466,7 @@
X       shar -L50 -apc -n $(TITLE)$(VERSION) -o $(TITLE)$(VERSION).shar \
X       -T $(SRCS) -C $(JSRCS)
X 
-ipk: $(PROGRAM)__EXE__ __UNITBL__
+ipk: $(PROGRAM)__EXE__ __UNITBL__ __DICTTBL__
X       -[ -d $(IPKWDIR)/$(BINDIR) ] || mkdir -p $(IPKWDIR)/$(BINDIR)
X       -[ -d $(IPKWDIR)/__DATADIR__ ] || mkdir -p $(IPKWDIR)/__DATADIR__
X       -[ -d $(IPKWDIR)/$(CONFDIR) ] || mkdir -p $(IPKWDIR)/$(CONFDIR)
@@ -487,6 +535,10 @@
X               cp -p $(UNITBL) $(IPKWDIR)/__DATADIR__; \
X               $(CHMOD) a+r-x $(IPKWDIR)/__DATADIR__/$(UNITBL); \
X       fi
+       -if [ -f $(DICTTBL) ]; then \
+               cp -p $(DICTTBL) $(IPKWDIR)/__DATADIR__; \
+               $(CHMOD) a+r-x $(IPKWDIR)/__DATADIR__/$(DICTTBL); \
+       fi
X       $(ECHO) "Package: fd" > $(IPKWDIR)/CONTROL/control
X       $(ECHO) "Priority: optional" >> $(IPKWDIR)/CONTROL/control
X       $(ECHO) "Section: extras" >> $(IPKWDIR)/CONTROL/control
@@ -518,6 +570,8 @@
X       -$(RM) expfunc$(EXE)
X       -$(RM) mkfuncno$(EXE)
X       -$(RM) mkunitbl$(EXE)
+       -$(RM) mkdict$(EXE)
+       -$(RM) mktankan$(EXE)
X       -$(RM) fdsh$(EXE)
X       -$(RM) fdbsh$(EXE)
X       -$(RM) $(PROGRAM)$(EXE)
@@ -527,6 +581,8 @@
X       -$(RM) $(PROGRAM).doc
X       -$(RM) $(ARGS)
X       -$(RM) __UNITBL__
+       -$(RM) $(DICTTXT)
+       -$(RM) __DICTTBL__
X # DO NOT DELETE THIS LINE -- make depend depends on it.
X 
X main__OBJ__: fd.h
@@ -618,8 +674,8 @@
X frontend__OBJ__: printf.h
X frontend__OBJ__: kctype.h
X frontend__OBJ__: pathname.h term.h funcno.h func.h
-frontend__OBJ__: dosdisk.h kanji.h termemu.h system.h
-frontend__OBJ__: termio.h
+frontend__OBJ__: dosdisk.h kanji.h termemu.h roman.h
+frontend__OBJ__: system.h termio.h
X frontend__OBJ__: wait.h
X backend__OBJ__: fd.h
X backend__OBJ__: machine.h config.h
@@ -669,7 +725,7 @@
X builtin__OBJ__: dosdisk.h funcno.h kanji.h system.h
X builtin__OBJ__: termio.h
X builtin__OBJ__: wait.h
-builtin__OBJ__: termemu.h
+builtin__OBJ__: termemu.h roman.h
X shell__OBJ__: fd.h
X shell__OBJ__: machine.h config.h types.h
X shell__OBJ__: printf.h
@@ -689,6 +745,31 @@
X input__OBJ__: func.h
X input__OBJ__: dosdisk.h kanji.h system.h termio.h
X input__OBJ__: wait.h
+ime__OBJ__: fd.h
+ime__OBJ__: machine.h config.h types.h
+ime__OBJ__: printf.h kctype.h
+ime__OBJ__: pathname.h term.h func.h
+ime__OBJ__: dosdisk.h kanji.h wait.h
+ime__OBJ__: roman.h termemu.h
+roman__OBJ__: machine.h config.h
+roman__OBJ__: printf.h
+roman__OBJ__: kctype.h
+roman__OBJ__: roman.h
+dict__OBJ__: fd.h
+dict__OBJ__: machine.h config.h types.h
+dict__OBJ__: printf.h
+dict__OBJ__: kctype.h
+dict__OBJ__: pathname.h term.h termio.h
+dict__OBJ__: func.h
+dict__OBJ__: dosdisk.h roman.h
+dict__OBJ__: hinsi.h
+mkdict__OBJ__: machine.h config.h
+mkdict__OBJ__: printf.h
+mkdict__OBJ__: kctype.h
+mkdict__OBJ__: roman.h hinsi.h
+mktankan__OBJ__: machine.h config.h
+mktankan__OBJ__: printf.h kctype.h
+mktankan__OBJ__: roman.h
X info__OBJ__: fd.h
X info__OBJ__: machine.h
X info__OBJ__: config.h types.h
diff -urNP ../FD-2.08f/README ./README
--- ../FD-2.08f/README  Tue Aug  8 00:00:00 2006
+++ ./README    Tue Aug 22 00:00:00 2006
@@ -1,9 +1,9 @@
X ############################################################
X #
-#      FDclone Ver. 2.08 に関して
+#      FDclone Ver. 2.09 に関して
X #
X #     Takashi SHIRAI, <shirai@unixusers.net>
-#      Aug 8, 2006
+#      Aug 22, 2006
X #
X ############################################################
X 
@@ -64,6 +64,8 @@
X mkfunkno.c    コマンド番号定数の定義ファイル作成プログラム
X expfunc.c     sh 関数展開プログラム (旧式の /bin/sh 用)
X mkunitbl.c    UNICODE 変換テーブルファイル生成プログラム
+mkdict.c       かな漢字変換テーブルファイル変換プログラム
+mktankan.c     単漢字変換テーブルファイル生成プログラム
X mkmfsedg.sed  djgpp v1.xx 向けメイクファイル加工用スクリプト
X mkmfsedd.sed  djgpp v2.xx 向けメイクファイル加工用スクリプト
X mkmfdosl.sed  LSI C-86 3.5 向けメイクファイル加工用スクリプト
@@ -112,6 +114,11 @@
X shell.c               シェルコマンド関連
X kanji.c               漢字コードコンバート関連
X input.c               ユーザ入力関連
+ime.c          簡易日本語 IME
+roman.c                ローマ字かな変換関連
+roman.h                roman.c 用のヘッダ
+dict.c         漢字辞書検索関連
+hinsi.h                品詞文法用のヘッダ
X info.c                各種情報表示用
X rockridg.c    ISO 9660 RockRidge 拡張関連
X archive.c     アーカイバ関連
diff -urNP ../FD-2.08f/README.eng ./README.eng
--- ../FD-2.08f/README.eng      Tue Aug  8 00:00:00 2006
+++ ./README.eng        Tue Aug 22 00:00:00 2006
@@ -1,9 +1,9 @@
X ############################################################
X #
-#      About FDclone Ver. 2.08
+#      About FDclone Ver. 2.09
X #
X #     Takashi SHIRAI, <shirai@unixusers.net>
-#      Aug 8, 2006
+#      Aug 22, 2006
X #
X ############################################################
X 
@@ -62,6 +62,8 @@
X mkfunkno.c    command serial number generator
X expfunc.c     shell function expander (for obsolete /bin/sh)
X mkunitbl.c    UNICODE translation table generator
+mkdict.c       Kana-Kanji translation table convertor
+mktankan.c     Tan-Kanji translation table generator
X mkmfsedg.sed  sed script filtering Makefile for djgpp v1.xx
X mkmfsedd.sed  sed script filtering Makefile for djgpp v2.xx
X mkmfdosl.sed  sed script filtering Makefile for LSI C-86 3.5
@@ -110,6 +112,11 @@
X shell.c               shell command module
X kanji.c               kanji code convert module
X input.c               user input module
+ime.c          tiny Kanji Input Method Editor
+roman.c                Roman-Kana translation module
+roman.h                header for roman.c
+dict.c         Kanji dictionary searching module
+hinsi.h                header for Hinsi grammar
X info.c                various information module
X rockridg.c    ISO 9660 RockRidge extension module
X archive.c     archiver module
diff -urNP ../FD-2.08f/TECHKNOW ./TECHKNOW
--- ../FD-2.08f/TECHKNOW        Tue Aug  8 00:00:00 2006
+++ ./TECHKNOW  Tue Aug 22 00:00:00 2006
@@ -57,9 +57,10 @@
X       のように環境変数 LANG で示される文字列を含み、多国語
X       対応されています。
X USEDATADIR
-       UNICODE 変換テーブル fd-unicd.tbl を fd の起動ディレ
-       クトリでなく Makefile.in の DATADIR で指定されたディ
-       レクトリに置きます。
+       UNICODE 変換テーブル fd-unicd.tbl や日本語入力用かな
+       漢字変換テーブル fd-dict.tbl を、fd の起動ディレクト
+       リでなく Makefile.in の DATADIR で指定されたディレク
+       トリに置きます。
X SUPPORTSJIS
X       cc(1) や man(1) が完全に Shift JIS を正しく扱えます。
X       2 byte 目に '\' が来るような漢字に対しても、この '\'
@@ -924,6 +925,7 @@
X       _NOPTY          疑似端末機能が使用不能
X       _NOEXTRAATTR    ファイル属性変更コマンドの拡張機能が使用不能
X       _NOLOGGING      ログファイル機能が使用不能
+       _NOIME          簡易日本語 IME 機能が使用不能
X 
X  config.hin を編集してこれらの識別子の定義を追加しておけば、
X 機能を縮小してサイズを小さくしたり、エンドユーザに使用させた
@@ -1230,3 +1232,38 @@
X ト文字列は複数登録しておくべきでしょう。
X  同様に、-i オプションや -e オプションも複数登録しておくと
X 良いでしょう。
+
+
+11.かな漢字変換辞書
+
+ 標準状態では、同梱の mktankan.c が単漢字変換用のテキスト辞
+書を作成し、これを元にかな漢字変換辞書 fd-dict.tbl が作成さ
+れます。
+ この状態では、fd-dict.tbl は品詞情報を含んでいませんので、
+これをそのまま用いる限りは、かな漢字変換入力モードでは単漢字
+変換しかできません。
+ 内蔵の変換エンジンは品詞情報を元にした単文節変換に対応して
+いますので、品詞情報を含むテキスト辞書を別途用意してやれば、
+かな漢字変換入力モードで単文節変換を行なうことができます。
+
+ 対応している辞書形式は pubdic 形式です。また、Wnn、Canna、
+SJ3 の辞書をテキスト変換したものも使うことができます。
+ これらの辞書をコンパイル時に Makefile.in の DICTSRC に記述
+することで、かな漢字変換辞書 fd-dict.tbl がこれらの辞書に基
+づくものになります。
+
+ DICTSRC に記述する際は、絶対パスもしくはコンパイルするディ
+レクトリからの相対パスで辞書ファイル名を記述して下さい。勿論、
+同じディレクトリに置いた場合はファイル名のみの記述で構いませ
+ん。
+ 複数の辞書ファイルを記述する場合は、空白で区切って列挙して
+下さい。但し、実行時にそれらの辞書を使い分けることはできない
+ので、全ての辞書から変換候補が選ばれます。
+ また、辞書が一つしかない場合は、「make DICTSRC=./pubdic.p」
+のように make のコマンドラインから指定しても構いません。
+
+ 一旦コンパイルを実行してしまった後に辞書指定を変更する場合
+は、先に作成されている fd-dict.tbl を削除してからコンパイル
+する必要があります。
+ この場合は「make rmdict」を実行して下さい。他のコンパイル
+結果を保持したまま辞書関連のファイルだけを削除します。
diff -urNP ../FD-2.08f/TECHKNOW.eng ./TECHKNOW.eng
--- ../FD-2.08f/TECHKNOW.eng    Tue Aug  8 00:00:00 2006
+++ ./TECHKNOW.eng      Tue Aug 22 00:00:00 2006
@@ -58,8 +58,10 @@
X       string shown by the environment variable LANG, such
X       as '/usr/man/ja_JP.SJIS/', to support M17N.
X USEDATADIR
-       fd-unicd.tbl, which is the transformation table for
-       UNICODE, is not placed on the same directory as the
+       fd-unicd.tbl, which is the translation table for
+       UNICODE, and fd-dict.tbl, which is the Kana-Kanji
+       translation table for the Japanese input method
+       editor, are not placed on the same directory as the
X       executable binary of fd, but on the directory which
X       is specified by DATADIR in Makefile.in.
X SUPPORTSJIS
@@ -973,6 +975,7 @@
X       _NOPTY          cannot use pseudo terminal
X       _NOEXTRAATTR    cannot use extra attribute changing command
X       _NOLOGGING      cannot use system logging
+       _NOIME          cannot use tiny Input Method Editor
X 
X   If you edit config.hin to add the definition of these
X identifiers, you can reduce functions to make size small,
@@ -1287,3 +1290,45 @@
X remote hosts.
X   Like this, you should also register the multiple -i options
X and -e options.
+
+
+11.Kana-Kanji Translation Dictionary
+
+  In the standard state, the included mktankan.c makes the
+text dictionary for the Tan-Kanji translation to make
+fd-dict.tbl, the Kana-Kanji translation dictionary, from it.
+  In this state, fd-dict.tbl does not include any Hinsi
+information. Then you will be able to use only the Tan-Kanji
+translation in the Kana-Kanji IME mode, if you use this as
+is.
+  The internal translation engine supports the Tan-Bunsetsu
+translation based on the Hinsi translation. If you prepare
+the other text dictionary with the Hinsi information, you
+can use Ren-Bubsetsu translation in the Kana-Kanji IME mode.
+
+  The supported dictionary form is the pubdic form. And you
+can also use the text converted from the dictionary of Wnn,
+Canna and SJ3.
+  If you describe these dictionaries as DICTSRC in Makefile.in
+at compile time, fd-dict.tbl, the Kana-Kanji translation
+dictionary, will be based on these dictionaries.
+
+  When you describe it as DICTSRC, you should describe it
+with the absolute path or the relative path from the
+directory where they are compiled. You may describe only the
+filename, of cource, when you place them at the same
+directory.
+  When you describe multiple dictionaries, you should
+separate them with spaces. You can not choose one of them
+at execution, so that the translation candidate will be
+selected from all of them.
+  You can specify it from the command line of 'make' such as
+"make DICTSRC=./puvdic.p", in the case of a single
+dictionary.
+
+  When you change the dictionary specification after once
+compiling, you must delete the compiled fd-dict.tbl and
+compile it.
+  In this case, you can execute "make rmdict".  Then only
+the files related to the dictionary will be deleted, and
+the other compile results will be leaved as they were.
diff -urNP ../FD-2.08f/_fdrc ./_fdrc
--- ../FD-2.08f/_fdrc   Tue Aug  8 00:00:00 2006
+++ ./_fdrc     Tue Aug 22 00:00:00 2006
@@ -1,6 +1,11 @@
X # Initialize file for FD
X #
X 
+# whether if limit configuration items or not in the customizer
+#      0: not limit (Default)
+#      >= 1: limit
+#BASICCUSTOM=0
+
X # default sort type
X #     0: not sort (Default)
X #     1: alphabetical 9: alphabetical (reversal)
@@ -9,6 +14,7 @@
X #     4: date         12: date (reversal)
X #     5: length       13: length (reversal)
X #     100-113: preserve previous sort type
+#      200-213: preserve previous sort type also in the archive browser
X #             (the least 2 digits are effective just after initialize)
X #SORTTYPE=0
X 
@@ -44,6 +50,16 @@
X #     >= 1: inherit
X #INHERITCOPY=0
X 
+# whether if display progress bar on copying/moving files
+#      0: not dislpay (Default)
+#      >= 1: dislpay
+#PROGRESSBAR=0
+
+# whether if query overwriting policy in advance before copying/moving files
+#      0: not query (Default)
+#      >= 1: query
+#PRECOPYMENU=0
+
X # whether if adjust tty or not when exiting
X #     0: not adjust (Default)
X #     >= 1: adjust
@@ -69,6 +85,10 @@
X #     Default: ~/.fd_history
X #HISTFILE=~/.fd_history
X 
+# history file of path input
+#      Default: none
+#DIRHISTFILE=""
+
X # history size of sh mode
X #     Default: 50
X #HISTSIZE=50
@@ -81,6 +101,10 @@
X #     Default: 50
X #SAVEHIST=50
X 
+# size of saved directory history
+#      Default: 50
+#SAVEDIRHIST=50
+
X # limit of counting files in directory, on tree mode
X #     Default: 50
X #DIRCOUNTLIMIT=50
@@ -105,6 +129,22 @@
X #     >= 1: show
X #SIZEINFO=0
X 
+# layout form of the function line
+#      value: n * 100 + size
+#      n: the number of function keys
+#      size: the block size of function keys
+#      Default: 10 * 100 + 5
+#FUNCLAYOUT=1005
+
+# key to invoke tiny Kanji Input Method Editor
+#      Default: none
+#IMEKEY=""
+
+# whether if hold the Kana-Kanji translation table on memory
+#      0: not hold (Default)
+#      >= 1: hold
+#IMEBUFFER=0
+
X # whether if support ANSI color escape sequence
X #     0: monochrome (Default)
X #     1: color
@@ -124,18 +164,19 @@
X #     7: white
X #     8: default color for foreground
X #     9: default color for background
-#      default palette: 8962435188
-#                       ||||||||||
-#      normal file -----+|||||||||
-#      background -------+||||||||
-#      directory ---------+|||||||
-#      unwritable ---------+||||||
-#      unreadable ----------+|||||
-#      symbolic link --------+||||
-#      socket ----------------+|||
-#      fifo (named pipe) ------+||
-#      block device ------------+|
-#      character device ---------+
+#      default palette: 89624351888
+#                       |||||||||||
+#      normal file -----+||||||||||
+#      background -------+|||||||||
+#      directory ---------+||||||||
+#      unwritable ---------+|||||||
+#      unreadable ----------+||||||
+#      symbolic link --------+|||||
+#      socket ----------------+||||
+#      fifo (named pipe) ------+|||
+#      block device ------------+||
+#      character device ---------+|
+#      exectable -----------------+
X #ANSIPALETTE=""
X 
X # edit mode with your favorite editor type
@@ -242,7 +283,8 @@
X #     ojunet, OJUNET: old ISO-2022-JP
X #     utf8, UTF8: UTF-8
X #     utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
-#      eng, ENG, C: English
+#      utf8-iconv, UTF8-ICONV: UTF-8 for iconv
+#      en, EN, C: English
X #LANGUAGE=""
X 
X # system default Kanji code
@@ -259,6 +301,7 @@
X #     cap, CAP: CAP
X #     utf8, UTF8: UTF-8
X #     utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
+#      utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X #DEFKCODE=""
X 
X # Kanji code to be inputted
@@ -267,6 +310,7 @@
X #     sjis, SJIS: Shift JIS
X #     utf8, UTF8: UTF-8
X #     utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
+#      utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X #INPUTKCODE=""
X 
X # Kanji code to be inputted to the pseudo terminal
@@ -275,6 +319,7 @@
X #     sjis, SJIS: Shift JIS
X #     utf8, UTF8: UTF-8
X #     utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
+#      utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X #PTYINKCODE=""
X 
X # Kanji code to be outputted from the pseudo terminal
@@ -283,6 +328,7 @@
X #     sjis, SJIS: Shift JIS
X #     utf8, UTF8: UTF-8
X #     utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
+#      utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X #PTYOUTKCODE=""
X 
X # Kanji code in filename
@@ -299,57 +345,67 @@
X #     cap, CAP: CAP
X #     utf8, UTF8: UTF-8
X #     utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
+#      utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X #FNAMEKCODE=""
X 
-# directories on which language code type in filename is SJIS
+# language code to be displayed
+#      Default: No convert
+#      en, EN, C: English
+#MESSAGELANG=""
+
+# directories on which Kanji code in filename is SJIS
X #     Default: none
X #SJISPATH=""
X 
-# directories on which language code type in filename is EUC-JP
+# directories on which Kanji code in filename is EUC-JP
X #     Default: none
X #EUCPATH=""
X 
-# directories on which language code type in filename is 7bits JIS
+# directories on which Kanji code in filename is 7bits JIS
X #     Default: none
X #JISPATH=""
X 
-# directories on which language code type in filename is 8bits JIS
+# directories on which Kanji code in filename is 8bits JIS
X #     Default: none
X #JIS8PATH=""
X 
-# directories on which language code type in filename is ISO-2022-JP
+# directories on which Kanji code in filename is ISO-2022-JP
X #     Default: none
X #JUNETPATH=""
X 
-# directories on which language code type in filename is old 7bits JIS
+# directories on which Kanji code in filename is old 7bits JIS
X #     Default: none
X #OJISPATH=""
X 
-# directories on which language code type in filename is old 8bits JIS
+# directories on which Kanji code in filename is old 8bits JIS
X #     Default: none
X #OJIS8PATH=""
X 
-# directories on which language code type in filename is old ISO-2022-JP
+# directories on which Kanji code in filename is old ISO-2022-JP
X #     Default: none
X #OJUNETPATH=""
X 
-# directories on which language code type in filename is HEX
+# directories on which Kanji code in filename is HEX
X #     Default: none
X #HEXPATH=""
X 
-# directories on which language code type in filename is CAP
+# directories on which Kanji code in filename is CAP
X #     Default: none
X #CAPPATH=""
X 
-# directories on which language code type in filename is UTF-8
+# directories on which Kanji code in filename is UTF-8
X #     Default: none
X #UTF8PATH=""
X 
-# directories on which language code type in filename is UTF-8 for Mac OS X
+# directories on which Kanji code in filename is UTF-8 for Mac OS X
X #     Default: none
X #UTF8MACPATH=""
X 
-# directories on which language code type in filename is not converted
+# directories on which Kanji code in filename is UTF-8 for iconv
+#      Default: none
+#UTF8ICONVPATH=""
+
+# directories on which Kanji code in filename is not converted
X #     Default: none
X #NOCONVPATH=""
X 
diff -urNP ../FD-2.08f/_fdrc.dif ./_fdrc.dif
--- ../FD-2.08f/_fdrc.dif       Tue Aug  8 00:00:00 2006
+++ ./_fdrc.dif Tue Aug 22 00:00:00 2006
@@ -1,15 +1,29 @@
X --- ../FD-1.03u/_fdrc Tue Dec 18 00:00:00 2001
-+++ _fdrc      Mon Dec 26 00:00:00 2005
-@@ -10,7 +10,7 @@
++++ _fdrc      Tue Aug 22 00:00:00 2006
+@@ -1,6 +1,11 @@
+ # Initialize file for FD
+ #
+ 
++# whether if limit configuration items or not in the customizer
++#     0: not limit (Default)
++#     >= 1: limit
++#BASICCUSTOM=0
++
+ # default sort type
+ #     0: not sort (Default)
+ #     1: alphabetical 9: alphabetical (reversal)
+@@ -9,8 +14,9 @@
+ #     4: date         12: date (reversal)
X  #    5: length       13: length (reversal)
X  #    100-113: preserve previous sort type
++#     200-213: preserve previous sort type also in the archive browser
X  #            (the least 2 digits are effective just after initialize)
X -#SORTTYPE    =       0
X +#SORTTYPE=0
X  
X  # default display mode
X  #    0: normal (Default)
-@@ -21,98 +21,245 @@
+@@ -21,98 +27,282 @@
X  #    5: sym-link status &                                invisible dot file
X  #    6:                      file type symbol &  invisible dot file
X  #    7: sym-link status &        file type symbol &  invisible dot file
@@ -38,6 +52,16 @@
X +#    0: not inherit (Default)
X +#    >= 1: inherit
X +#INHERITCOPY=0
++
++# whether if display progress bar on copying/moving files
++#     0: not dislpay (Default)
++#     >= 1: dislpay
++#PROGRESSBAR=0
++
++# whether if query overwriting policy in advance before copying/moving files
++#     0: not query (Default)
++#     >= 1: query
++#PRECOPYMENU=0
X  
X  # whether if adjust tty or not when exiting
X  #    0: not adjust (Default)
@@ -66,6 +90,10 @@
X +# history file of sh mode
X +#    Default: ~/.fd_history
X +#HISTFILE=~/.fd_history
++
++# history file of path input
++#     Default: none
++#DIRHISTFILE=""
X  
X  # history size of sh mode
X  #    Default: 50
@@ -82,6 +110,10 @@
X  #    Default: 50
X -#SAVEHIST    =       50
X +#SAVEHIST=50
++
++# size of saved directory history
++#     Default: 50
++#SAVEDIRHIST=50
X  
X  # limit of counting files in directory, on tree mode
X  #    Default: 50
@@ -110,6 +142,22 @@
X  #    >= 1: show
X -#SIZEINFO    =       0
X +#SIZEINFO=0
++
++# layout form of the function line
++#     value: n * 100 + size
++#     n: the number of function keys
++#     size: the block size of function keys
++#     Default: 10 * 100 + 5
++#FUNCLAYOUT=1005
++
++# key to invoke tiny Kanji Input Method Editor
++#     Default: none
++#IMEKEY=""
++
++# whether if hold the Kana-Kanji translation table on memory
++#     0: not hold (Default)
++#     >= 1: hold
++#IMEBUFFER=0
X  
X  # whether if support ANSI color escape sequence
X  #    0: monochrome (Default)
@@ -131,18 +179,19 @@
X +#    7: white
X +#    8: default color for foreground
X +#    9: default color for background
-+#     default palette: 8962435188
-+#                      ||||||||||
-+#     normal file -----+|||||||||
-+#     background -------+||||||||
-+#     directory ---------+|||||||
-+#     unwritable ---------+||||||
-+#     unreadable ----------+|||||
-+#     symbolic link --------+||||
-+#     socket ----------------+|||
-+#     fifo (named pipe) ------+||
-+#     block device ------------+|
-+#     character device ---------+
++#     default palette: 89624351888
++#                      |||||||||||
++#     normal file -----+||||||||||
++#     background -------+|||||||||
++#     directory ---------+||||||||
++#     unwritable ---------+|||||||
++#     unreadable ----------+||||||
++#     symbolic link --------+|||||
++#     socket ----------------+||||
++#     fifo (named pipe) ------+|||
++#     block device ------------+||
++#     character device ---------+|
++#     exectable -----------------+
X +#ANSIPALETTE=""
X  
X  # edit mode with your favorite editor type
@@ -247,6 +296,8 @@
X  #    euc, EUC: EUC-JP
X  #    sjis, SJIS: Shift JIS
X  #    jis, JIS: 7bits JIS
+-#     eng, ENG, C: English
+-#LANGUAGE     =       ""
X +#    jis8, JIS8: 8bits JIS
X +#    junet, JUNET: ISO-2022-JP
X +#    ojis, OJIS: old 7bits JIS
@@ -254,8 +305,8 @@
X +#    ojunet, OJUNET: old ISO-2022-JP
X +#    utf8, UTF8: UTF-8
X +#    utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
- #     eng, ENG, C: English
--#LANGUAGE     =       ""
++#     utf8-iconv, UTF8-ICONV: UTF-8 for iconv
++#     en, EN, C: English
X +#LANGUAGE=""
X +
X +# system default Kanji code
@@ -272,15 +323,17 @@
X +#    cap, CAP: CAP
X +#    utf8, UTF8: UTF-8
X +#    utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
++#     utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X +#DEFKCODE=""
X  
X  # Kanji code to be inputted
X  #    Default: No convert
-@@ -120,49 +267,218 @@
+@@ -120,49 +310,231 @@
X  #    sjis, SJIS: Shift JIS
X  #    utf8, UTF8: UTF-8
X  #    utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
X -#INPUTKCODE  =       ""
++#     utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X +#INPUTKCODE=""
X  
X -#PAGER       =       more%K
@@ -292,6 +345,7 @@
X +#    sjis, SJIS: Shift JIS
X +#    utf8, UTF8: UTF-8
X +#    utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
++#     utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X +#PTYINKCODE=""
X +
X +# Kanji code to be outputted from the pseudo terminal
@@ -300,6 +354,7 @@
X +#    sjis, SJIS: Shift JIS
X +#    utf8, UTF8: UTF-8
X +#    utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
++#     utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X +#PTYOUTKCODE=""
X +
X +# Kanji code in filename
@@ -316,57 +371,67 @@
X +#    cap, CAP: CAP
X +#    utf8, UTF8: UTF-8
X +#    utf8-mac, UTF8-MAC: UTF-8 for Mac OS X
++#     utf8-iconv, UTF8-ICONV: UTF-8 for iconv
X +#FNAMEKCODE=""
X +
-+# directories on which language code type in filename is SJIS
++# language code to be displayed
++#     Default: No convert
++#     en, EN, C: English
++#MESSAGELANG=""
++
++# directories on which Kanji code in filename is SJIS
X +#    Default: none
X +#SJISPATH=""
X +
-+# directories on which language code type in filename is EUC-JP
++# directories on which Kanji code in filename is EUC-JP
X +#    Default: none
X +#EUCPATH=""
X +
-+# directories on which language code type in filename is 7bits JIS
++# directories on which Kanji code in filename is 7bits JIS
X +#    Default: none
X +#JISPATH=""
X +
-+# directories on which language code type in filename is 8bits JIS
++# directories on which Kanji code in filename is 8bits JIS
X +#    Default: none
X +#JIS8PATH=""
X +
-+# directories on which language code type in filename is ISO-2022-JP
++# directories on which Kanji code in filename is ISO-2022-JP
X +#    Default: none
X +#JUNETPATH=""
X +
-+# directories on which language code type in filename is old 7bits JIS
++# directories on which Kanji code in filename is old 7bits JIS
X +#    Default: none
X +#OJISPATH=""
X +
-+# directories on which language code type in filename is old 8bits JIS
++# directories on which Kanji code in filename is old 8bits JIS
X +#    Default: none
X +#OJIS8PATH=""
X +
-+# directories on which language code type in filename is old ISO-2022-JP
++# directories on which Kanji code in filename is old ISO-2022-JP
X +#    Default: none
X +#OJUNETPATH=""
X +
-+# directories on which language code type in filename is HEX
++# directories on which Kanji code in filename is HEX
X +#    Default: none
X +#HEXPATH=""
X +
-+# directories on which language code type in filename is CAP
++# directories on which Kanji code in filename is CAP
X +#    Default: none
X +#CAPPATH=""
X +
-+# directories on which language code type in filename is UTF-8
++# directories on which Kanji code in filename is UTF-8
X +#    Default: none
X +#UTF8PATH=""
X +
-+# directories on which language code type in filename is UTF-8 for Mac OS X
++# directories on which Kanji code in filename is UTF-8 for Mac OS X
X +#    Default: none
X +#UTF8MACPATH=""
X +
-+# directories on which language code type in filename is not converted
++# directories on which Kanji code in filename is UTF-8 for iconv
++#     Default: none
++#UTF8ICONVPATH=""
++
++# directories on which Kanji code in filename is not converted
X +#    Default: none
X +#NOCONVPATH=""
X +
@@ -525,7 +590,7 @@
X  
X  # archiver definition
X  #(Default)
-@@ -178,6 +494,7 @@
+@@ -178,6 +550,7 @@
X  #(Examples)
X  #arch ".zip"       "zip -q %C %TA"                       "unzip -q %C %TA"
X  #arch ".zoo"       "zoo aq %C %TA"                       "zoo xq %C %TA"
@@ -533,7 +598,7 @@
X  
X  # examples for MS-DOS
X  #arch ".lzh"       "lha a %S %TA"                        "lha x %S %TA"
-@@ -198,22 +515,52 @@
+@@ -198,22 +571,52 @@
X  #bind '{'    ROLL_UP
X  #bind '}'    ROLL_DOWN
X  #bind '~'    "cd ~%N%K"
@@ -596,7 +661,7 @@
X  #}
X  
X  # MS-DOS drive definition
-@@ -222,7 +569,7 @@
+@@ -222,7 +625,7 @@
X  
X  # alias definition
X  #(Example)
diff -urNP ../FD-2.08f/apply.c ./apply.c
--- ../FD-2.08f/apply.c Tue Aug  8 00:00:00 2006
+++ ./apply.c   Tue Aug 22 00:00:00 2006
@@ -11,6 +11,11 @@
X 
X #define       MAXTIMESTR      8
X #define       ATTRWIDTH       10
+#if    MSDOS
+#define        DIRENTSIZ(s)    DOSDIRENT
+#else
+#define        DIRENTSIZ(s)    (sizeof(struct dirent) - DNAMESIZE + strlen(s) + 1)
+#endif
X 
X typedef struct _attrib_t {
X       short nlink;
@@ -59,14 +64,19 @@
X static char *NEAR getdestdir __P_((char *, char *));
X static int NEAR getdestpath __P_((char *, char *, struct stat *));
X static int NEAR getcopypolicy __P_((char *));
-static int NEAR getremovepolicy __P_((char *));
+static int NEAR getremovepolicy __P_((char *, int));
X static int NEAR checkdupl __P_((char *, char *, struct stat *, struct stat *));
X static int NEAR checkrmv __P_((char *, int));
X #ifndef       _NOEXTRACOPY
X static int NEAR isxdev __P_((char *, struct stat *));
+static VOID NEAR addcopysize __P_((off_t));
+static VOID NEAR _showprogress __P_((int));
+static int countcopysize __P_((char *));
+static int countmovesize __P_((char *));
+static int NEAR prepareprogress __P_((int, int (*)(char *)));
X #endif
-static VOID NEAR preparecopy __P_((VOID_A));
-static VOID NEAR preparemove __P_((VOID_A));
+static int NEAR preparecopy __P_((int, int));
+static int NEAR preparemove __P_((int, int));
X static int safecopy __P_((char *));
X static int safemove __P_((char *));
X static int cpdir __P_((char *));
@@ -74,6 +84,7 @@
X #ifndef       _NOEXTRACOPY
X static int mvdir1 __P_((char *));
X static int mvdir2 __P_((char *));
+static int countremovesize __P_((char *));
X #endif
X static VOID NEAR showmode __P_((attrib_t *, int, int));
X static VOID NEAR showattr __P_((namelist *, attrib_t *, int));
@@ -89,6 +100,10 @@
X static int forcetouchdir __P_((char *));
X 
X char *destpath = NULL;
+#ifndef        _NOEXTRACOPY
+int progressbar = 0;
+int precopymenu = 0;
+#endif
X 
X static int copypolicy = 0;
X static int removepolicy = 0;
@@ -119,6 +134,14 @@
X #if   !defined (_NOEXTRACOPY) && !defined (_NODOSDRIVE)
X static int forwarddrive = -1;
X #endif
+#ifndef        _NOEXTRACOPY
+static int copycolumn = -1;
+static int copyline = 0;
+static long copyunit = 0L;
+static long maxcopyunit = 0L;
+static off_t copysize = (off_t)0;
+static off_t maxcopysize = (off_t)0;
+#endif
X 
X 
X static int NEAR issamedir(path, org)
@@ -335,26 +358,34 @@
X       return(copypolicy);
X }
X 
-static int NEAR getremovepolicy(s)
+static int NEAR getremovepolicy(s, pre)
X char *s;
+int pre;
X {
X       char *str[4];
-       int n, ch, val[4];
+       int i, n, ch, val[4];
X 
X       Xlocate(0, L_CMDLINE);
X       Xputterm(L_CLEAR);
X       Xkanjiputs(s);
X 
-       str[0] = ANYES_K;
-       val[0] = CHK_OK;
-       str[1] = ANNO_K;
-       val[1] = CHK_ERROR;
-       str[2] = ANALL_K;
-       val[2] = RMP_REMOVEALL;
-       str[3] = ANKEP_K;
-       val[3] = RMP_KEEPALL;
+       i = 0;
+       if (pre) {
+               str[i] = ANCNF_K;
+               val[i++] = CHK_OK;
+       }
+       else {
+               str[i] = ANYES_K;
+               val[i++] = CHK_OK;
+               str[i] = ANNO_K;
+               val[i++] = CHK_ERROR;
+       }
+       str[i] = ANALL_K;
+       val[i++] = RMP_REMOVEALL;
+       str[i] = ANKEP_K;
+       val[i++] = RMP_KEEPALL;
X       n = CHK_OK;
-       ch = selectstr(&n, 4, 0, str, val);
+       ch = selectstr(&n, i, 0, str, val);
X       if (ch == K_ESC) return(CHK_ERROR);
X       else if (ch != K_CR) return(CHK_CANCEL);
X       else if (n <= 0) return(n);
@@ -397,6 +428,10 @@
X                       cp = SAMEF_K;
X                       i = strlen2(cp) - strsize("%.*s");
X                       cp = asprintf3(cp, n_column - i, dest);
+
+#ifndef        _NOEXTRACOPY
+                       copycolumn = -1;
+#endif
X                       if (!n) n = getcopypolicy(cp);
X                       else {
X                               Xlocate(0, L_CMDLINE);
@@ -537,7 +572,10 @@
X               cp = DELPM_K;
X               len = strlen2(cp) - strsize("%.*s");
X               cp = asprintf3(cp, n_column - len, path);
-               n = getremovepolicy(cp);
+#ifndef        _NOEXTRACOPY
+               copycolumn = -1;
+#endif
+               n = getremovepolicy(cp, 0);
X               free(cp);
X       }
X       if (n > 0) n -= RMP_BIAS;
@@ -570,20 +608,164 @@
X 
X       return(0);
X }
+
+static VOID NEAR addcopysize(size)
+off_t size;
+{
+       if (size <= MAXTYPE(off_t) - maxcopysize) maxcopysize += size;
+       else {
+               maxcopysize -= MAXTYPE(off_t) - size;
+               maxcopyunit++;
+       }
+}
+
+static VOID NEAR _showprogress(n)
+int n;
+{
+       int i, max;
+
+       max = n_column - 1;
+       Xlocate(0, copyline);
+       for (i = 0; i < n; i++) Xputch2('o');
+       for (; i < max; i++) Xputch2('.');
+       Xlocate(n, copyline);
+       Xtflush();
+}
+
+VOID showprogress(size)
+off_t size;
+{
+       long unit;
+       int n, max;
+
+       if (!maxcopysize && !maxcopyunit) return;
+
+       max = n_column - 1;
+       for (n = 0; n < max; n++) {
+               if (size <= MAXTYPE(off_t) - copysize) copysize += size;
+               else {
+                       copysize -= MAXTYPE(off_t) - size + 1;
+                       copyunit++;
+               }
+       }
+
+       size = copysize;
+       unit = copyunit;
+       for (n = 0; n < max; n++) {
+               if (maxcopysize <= size) size -= maxcopysize;
+               else if (!unit) break;
+               else {
+                       size += MAXTYPE(off_t) - maxcopysize + 1;
+                       unit--;
+               }
+               if (unit < maxcopyunit) break;
+               unit -= maxcopyunit;
+       }
+
+       if (n > copycolumn) _showprogress(copycolumn = n);
+}
+
+VOID fshowprogress(path)
+char *path;
+{
+       char *cp;
+
+       if (!(cp = strrdelim(path, 1))) cp = path;
+       showprogress(DIRENTSIZ(cp));
+}
+
+static int countcopysize(path)
+char *path;
+{
+       struct stat st;
+       char *cp;
+
+       if (!(cp = strrdelim(path, 1))) cp = path;
+       addcopysize(DIRENTSIZ(cp));
+       if (Xlstat(path, &st) < 0) return(APL_ERROR);
+       addcopysize(st.st_size);
+
+       return(APL_OK);
+}
+
+static int countmovesize(path)
+char *path;
+{
+       struct stat st;
+       int n;
+       char *cp;
+
+       if (!(cp = strrdelim(path, 1))) cp = path;
+       addcopysize(DIRENTSIZ(cp));
+       if ((n = isxdev(path, &st)) < 0) return(APL_ERROR);
+       else if (n && !s_isdir(&st)) addcopysize(st.st_size);
+
+       return(APL_OK);
+}
+
+static int NEAR prepareprogress(isdir, func)
+int isdir;
+int (*func)__P_((char *));
+{
+       int ret;
+
+       copycolumn = -1;
+       copyline = 0;
+       copyunit = maxcopyunit = 0L;
+       copysize = maxcopysize = (off_t)0;
+       if (progressbar) {
+               if (!isdir) {
+                       copyline = L_CMDLINE;
+                       VOID_C applyfile(func, NULL);
+               }
+               else {
+                       copyline = L_STACK;
+                       ret = applydir(filelist[filepos].name, func,
+                               NULL, func, ORD_NOPREDIR, NULL);
+                       if (ret == APL_ERROR) return(-1);
+                       if (ret == APL_CANCEL) {
+                               maxcopyunit = 0L;
+                               maxcopysize = (off_t)0;
+                       }
+               }
+       }
+
+       return(0);
+}
X #endif        /* !_NOEXTRACOPY */
X 
-static VOID NEAR preparecopy(VOID_A)
+/*ARGSUSED*/
+static int NEAR preparecopy(isdir, narg)
+int isdir, narg;
X {
X       copypolicy = (issamedir(destpath, NULL))
X               ? (FLAG_SAMEDIR | CPP_RENAME) : 0;
+#ifndef        _NOEXTRACOPY
+       if (precopymenu && !copypolicy && (isdir || narg > 1))
+               if (getcopypolicy(PRECP_K) < 0) return(-1);
+       if (prepareprogress(isdir, countcopysize)) return(-1);
+#endif /* !_NOEXTRACOPY */
X #ifndef       _NODOSDRIVE
X       if (dospath3(nullstr)) waitmes();
X #endif
+
+       return(0);
X }
X 
-static VOID NEAR preparemove(VOID_A)
+/*ARGSUSED*/
+static int NEAR preparemove(isdir, narg)
+int isdir, narg;
X {
X       copypolicy = removepolicy = 0;
+#ifndef        _NOEXTRACOPY
+       if (precopymenu && (isdir || narg > 1)) {
+               if (getcopypolicy(PRECP_K) < 0) return(-1);
+               if (getremovepolicy(PRERM_K, 1) < 0) return(-1);
+       }
+       if (prepareprogress(isdir, countmovesize) < 0) return(-1);
+#endif /* !_NOEXTRACOPY */
+
+       return(0);
X }
X 
X static int safecopy(path)
@@ -724,14 +906,37 @@
X       st.st_atime = destatime;
X       if (touchfile(dest, &st) < 0) return(APL_ERROR);
X       if (Xrmdir(path) < 0) return(APL_ERROR);
+#ifndef        _NOEXTRACOPY
+       fshowprogress(path);
+#endif
+
+       return(APL_OK);
+}
+
+static int countremovesize(path)
+char *path;
+{
+       char *cp;
+
+       if (!(cp = strrdelim(path, 1))) cp = path;
+       addcopysize(DIRENTSIZ(cp));
X 
X       return(APL_OK);
X }
X #endif        /* !_NOEXTRACOPY */
X 
-VOID prepareremove(VOID_A)
+/*ARGSUSED*/
+int prepareremove(isdir, narg)
+int isdir, narg;
X {
X       removepolicy = 0;
+#ifndef        _NOEXTRACOPY
+       if (precopymenu && (isdir || narg > 1))
+               if (getremovepolicy(PRERM_K, 1) < 0) return(-1);
+       if (prepareprogress(isdir, countremovesize)) return(-1);
+#endif /* !_NOEXTRACOPY */
+
+       return(0);
X }
X 
X int rmvfile(path)
@@ -742,6 +947,9 @@
X       if ((n = checkrmv(path, W_OK)) < 0)
X               return((n == CHK_CANCEL) ? APL_CANCEL : APL_IGNORE);
X       if (Xunlink(path) < 0) return(APL_ERROR);
SHAR_EOF
  : || $echo 'restore of' 'FD-2.09.patch' 'failed'
fi
$echo 'End of' 'FD-2.09.patch' 'part' '1'
$echo 'File' 'FD-2.09.patch' 'is continued in part' '2'
echo 2 > _sh00904/seq
exit 0
-- 
                                               しらい たかし