mc/vfs/extfs/hp48
Norbert Warmuth e06cd1968c Mon Mar 23 01:40:35 1998 Norbert Warmuth <k3190@fh-sw.de>
* gnome/gtools.c (translate_gdk_keysym_to_curses): renamed KEY_BACKTAB
to KEY_BTAB (the name ncurses uses)

* gnome/Makefile.in: Install the icon-files and the layout-file from $srcdir.

* autogen.sh: added support for builddir != srcdir

* doc/Makefile.in: The manual pages are generated files and
located in the builddir and not in the srcdir.

* src/find.c (find_file): Use the same hotkey for the panelize button
as we use with the external panelize command.

* src/myslang.h: --with-ncurses didn't compile: renamed
KEY_BACKTAB to KEY_BTAB (the name ncurses uses)

* src/dlg.c (dlg_key_event): likewise

* src/tkmain.c (x_init_dlg): added dummy function to make it
compile

* vfs/Makefile.in, extfs/extfs.ini, extfs/hp48: New external
filesystem to view and copy files to/from the HP48.

Now it should be possible to build and install gnome edition with
builddir != srcdir.
1998-03-23 07:12:13 +00:00

86 lines
1.9 KiB
Bash

#!/bin/sh
#
# Written by Christofer Edvardsen <ce@earthling.net>, Feb 1998
#
# This script makes it possible to view and copy files to/from a hp48
# (tested with a HP48G and the emulator x48)
# To make "cd hp48:" work add this to extfs.ini: hp48:=hp48
#
# Make sure you have kermit installed and that it's using the right serial
# device by changing /dev/ttyXX on the next line
KERMIT="kermit -l /dev/ttyS1 -b 9600"
AWK=mawk
hp48_cmd()
{
$KERMIT -C "SET EXIT WARNING OFF,REMOTE $*,QUIT"
}
hp48_cd()
{
(echo SET EXIT WARNING OFF;echo REMOTE HOST HOME
for HP48_DIR in `echo $*|tr '/' ' '`;do
if [ "$HP48_DIR" != "." ];then echo REMOTE HOST $HP48_DIR;fi
done
echo QUIT)| $KERMIT -B >/dev/null
}
hp48_retdir()
{
echo $1
}
hp48_retsize()
{
printf "%d" $2 2>/dev/null
}
hp48_parser()
{
HP48_DIRS=
read INPUT
while [ "$INPUT" != "EOF" ]
do
case `echo $INPUT|$AWK '{if (int($2)) if ($3=="Directory") print "dir";else print "file"}'` in
dir) HP48_DIRS="$HP48_DIRS `hp48_retdir $INPUT`"
printf "drwxr-xr-x 1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize $INPUT` "`date +\"%b %d %Y %k:%M"`" "$HP48_CDIR/`hp48_retdir $INPUT`";;
file) printf "-rw-r--r-- 1 %-8d %-8d %8d %s %s\n" 0 0 `hp48_retsize $INPUT` "`date +"%b %d %Y %k:%M"`" "$HP48_CDIR/`hp48_retdir $INPUT`";;
esac
read INPUT
done
for HP48_DIR in $HP48_DIRS;do
HP48_PDIR=$HP48_CDIR
HP48_CDIR=$HP48_CDIR/$HP48_DIR; hp48_cmd HOST $HP48_DIR >/dev/null
hp48_list
HP48_CDIR=$HP48_PDIR; hp48_cmd HOST UPDIR >/dev/null
done
}
hp48_list()
{
(hp48_cmd DIRECTORY;echo;echo EOF)|hp48_parser
}
# override any locale for dates
LC_ALL=C
export LC_ALL
case $1 in
list) HP48_CDIR=
hp48_cmd HOST HOME >/dev/null
hp48_list
exit 0;;
copyout)
cd `dirname $4`
hp48_cd `dirname $3`
$KERMIT -B -g `basename $3` -a $4 >/dev/null
exit 0;;
copyin)
cd `dirname $4`
hp48_cd `dirname $3`
$KERMIT -B -s $4 -a `basename $3` >/dev/null
exit 0;;
esac
exit 1