⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hp48.in

📁 MC Linux/Unix 终端下文件管理器
💻 IN
字号:
#!/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 use the hp48 external filesystem:#      - read the relevant parts of your HP48 manual#      - install kermit#      - connect the HP48 to your computer or start x48#      - below change the line which reflects the serial device you use#      - configure your HP48 (<left shift> - i/o - iopar): #        port: wire#        baud: 9600 #        transfer format: binary (fast transfers) or#                         ascii (editable on the pc)#      - start the server on the HP48: <left shift> - i/o - srvr - serve#        or the shortcut <right shift> - <right arrow>#      - on MC's commandline enter "cd hp48:"## Make sure you have kermit installed and that it's using the right serial# device by changing /dev/ttyXX on the next lineAWK=@AWK@KERMIT="kermit -l /dev/ttyS1 -b 9600"hp48_cmd(){$KERMIT -C "SET EXIT WARNING OFF,REMOTE $*,QUIT"}hp48_cd(){(echo SET EXIT WARNING OFF;echo REMOTE HOST HOMEfor HP48_DIR in `echo $*|tr '/' ' '`;do if [ "$HP48_DIR" != "." ];then echo REMOTE HOST $HP48_DIR;fidoneecho QUIT)| $KERMIT -B >/dev/null}hp48_retdir(){echo $1}hp48_retsize(){printf "%d" $2 2>/dev/null}hp48_parser(){HP48_DIRS=read INPUTwhile [ "$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 INPUTdonefor 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/nulldone}hp48_list(){(hp48_cmd DIRECTORY;echo;echo EOF)|hp48_parser}# override any locale for datesLC_ALL=Cexport LC_ALLcase $1 inlist) 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;;esacexit 1

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -