home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
CONVERT.ZIP
/
CONVERT.DOC
< prev
next >
Wrap
Text File
|
1991-11-16
|
1KB
|
26 lines
Converts text files between UNIX LF-only format and DOS CR/LF format
(either direction).
Program is self-documenting. Run with no parameters for help screen.
However:
convert <direction> <input file> [<output file>]
<direction> is -u for converting to UNIX format. It is -p or -d or -o
for converting to PC-DOS-OS/2 format.
<input file> is required. <output file> is optional; if not specified
then <input file> is replaced by the converted file.
Timestamps are preserved on converted files. Long file names are allowed.
The makefile is set up for compilation with CL386 but the .EXE file was
compiled with CL and bound to create a family mode program.
If you run this program over anything other than a text file it is
guaranteed to scrog the file, probably in an irreversable way. Maybe
someone would like to add a sanity check. Suggestion: check first few
hundred bytes to ensure that all characters are those which one might
reasonably expect to find in a text file. Such characters would include
all ASCII characters between 0x20 and 0x7E, CR, LF, maybe FF, and the
line/box-drawing set.