home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
KAYPRO
/
CRHRDSFT.LBR
/
HRDSFT.DQC
/
HRDSFT.DOC
Wrap
Text File
|
2000-06-30
|
4KB
|
103 lines
****************************************************************
* *
* HARDSOFT version 1.1 *
* *
* by Kenneth M. Toy, *
* San Diego, California, *
* copyright (c) January 30, 1984, *
* all rights reserved. *
* *
****************************************************************
HARDSOFT is a WordStar utility program that is intended to be
used to facilitate the transfer of text files, to and from
WordStar, from non-WordStar format sources. It has applications
in the uploading and downloading of files from remote bulletin
board systems as well. This program is designed to either a)
remove all WordStar specific characters (while setting the eighth
higher order bit to zero) or b) insert soft carriage-returns into
a file so that text-reformatting can be performed.
The program has two main modules. The text hardener (this
term, as well as the idea for this program, was taken from
Lindsay Woodall of San Diego, California) and the text softener
(the idea for which came from Bill Spencer, also of San Diego).
The input format can take only one of three forms:
input output
harden: HARDSOFT FILENAME.EXT FILENAME.HRD
soften: HARDSOFT FILENAME.EXT S FILENAME.SFT
help: HARDSOFT help screen
Notes:
1) This version of HARDSOFT can handle only those files that
will fit entirely within memory. For a 64K system this means
that the maximum input file size is approximately 48K. A future
implementation of this program may include the ability to handle
larger files. However, WordStar does not handle files of this
size very well, so the utility of such an enhancement is
questionable (except possibly for smaller systems).
2) HARDSOFT writes the output file to the default drive.
Hence, it can be invoked from another drive (with the input file
possibly residing on a third).
3) HARDSOFT does not alter the original file in any way.
4) The end of the input file is assumed to have been reached
if a 1ah character is encountered prior to the end of the file.
** Hardening **
Hardening a file consists of first setting all of its eighth
(higher) order bits to zero and then stripping all resultant non-
printing ascii characters from it. I have taken the printing
ascii characters to include all hex characters between 20h and
7fh (inclusive) as well as 0ah (line feed), 0dh (carriage-return)
and 09h (tab).
** Softening **
Softening a file inserts WordStar soft carriage-returns into
the file based on the following criteria.
A hard carriage-return is assumed to be desired if the line
immediately following the carriage-return in question begins with
one of the following characters:
* a space
* a tab
* another carriage return
* or a period (this is for the dot commands).
Alternately, a soft carriage-return is inserted if the next line
begins with any other character, with the following exceptions:
1) If a line begins with a period it will automatically end with
a hard carriage return.
2) If a line consists solely of a carriage return then that
carriage return will be hard.
** NOTE **
Columns of numbers, if they begin at the left most margin,
will be treated as reformattable text and hence WILL be
reformatted (with the obvious resultant mess) if hard carriage-
returns are not inserted by hand.