Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!lll-lcc!csustan!rayz From: rayz@csustan.UUCP Newsgroups: comp.sys.cbm Subject: Re: Paperclip/XMODEM Message-ID: <404@csustan.UUCP> Date: Sun, 25-Jan-87 02:10:12 EST Article-I.D.: csustan.404 Posted: Sun Jan 25 02:10:12 1987 Date-Received: Sun, 25-Jan-87 10:42:38 EST References: <2767@udenva.UUCP> Reply-To: rayz@csustan.UUCP (R. L. Zarling) Organization: CSU, Stanislaus; Turlock, California Lines: 99 In article <2767@udenva.UUCP> slindahl@udenva.UUCP (Steve "Mr. MBA" Lindahl) writes: >Has anyone experienced problems in downloading text files via xmodem for >the Paperclip 64 word processor? The problem seems to be specific to the >files that I store on BSD4.2. Xmodem does not convert the character sets-- Unix uses real ascii, while most files on Commodore equipment are stored in Commodore ascii. In particular, Paperclip expects sequential files to be in Commodore Ascii. (Paperclip's PRG files are even worse: they are stored in screen code.) I do the same kinds of things you do between the two systems. I find the following two shell scripts work well to convert the character sets. I run the scripts under Unix, before sending a file to the CBM machine, or after receiving one. unixtoc64 will convert the ascii to cbm format, for downloading using, for instance, xmodem. c64tounix does the opposite. Both scripts handle C-Power special characters, as well as ordinary cbm characters. -----Cut Here----------------------------- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # /usr/local/c64tounix # /usr/local/unixtoc64 # This archive created: Thu Oct 30 19:40:14 1986 export PATH; PATH=/bin:/usr/bin:$PATH echo shar: "extracting 'c64tounix'" '(570 characters)' if test -f 'c64tounix' then echo shar: "will not over-write existing file 'c64tounix'" else sed 's/^ X//' << \SHAR_EOF > 'c64tounix' X: X# Script to translate c64 C-Power files which have been uploaded X# by xmodem to unix format. This script also works for other sequential X# ascii files, since the only difference between a C-Power file and X# simple ascii is that C-Power uses some Commodore graphic characters X# for the {}\|` and ~ characters. X# X# R. L. Zarling 3/86 X# Xif /bin/test $# -lt 1 Xthen X echo "Usage: $0 filename [ filename ... ]" X exit 1 Xfi Xfor i in $* Xdo X echo "$i ..." X tr "\015\244\333\337\335\257" "\012\137\173\174\175\176" < $i | \ X tr "[\301-\332A-Z]" "[A-Za-z]" > t$$ X mv t$$ $i Xdone SHAR_EOF if test 570 -ne "`wc -c < 'c64tounix'`" then echo shar: "error transmitting 'c64tounix'" '(should have been 570 characters)' fi chmod +x 'c64tounix' fi echo shar: "extracting 'unixtoc64'" '(572 characters)' if test -f 'unixtoc64' then echo shar: "will not over-write existing file 'unixtoc64'" else sed 's/^ X//' << \SHAR_EOF > 'unixtoc64' X: X# Script to translate unix files into Commodore C-Power format for X# downloading. This script also works for standard ascii files, X# since C-Power format is a proper superset of the standard sequential X# format (adding a representation for {}\|` and ~, which are not X# normal Commodore characters). X# X# R. L. Zarling 3/86 X# Xif /bin/test $# -lt 1 Xthen X echo "Usage: $0 filename [ filename ... ]" X exit 1 Xfi Xfor i in $* Xdo X echo "$i ..." X expand -3 <$i | tr "[A-Za-z]" "[\301-\332A-Z]" | \ X tr "\012\137\173\174\175\176" "\015\244\333\337\335\257" > t$$ X mv t$$ $i Xdone SHAR_EOF if test 572 -ne "`wc -c < 'unixtoc64'`" then echo shar: "error transmitting 'unixtoc64'" '(should have been 572 characters)' fi chmod +x 'unixtoc64' fi exit 0 # End of shell archive