main

Convert unix -> dos text replacing line endings.

Usage: u2d file [ file ... ]

NOTE: 1) This program replaces files IN-PLACE. This makes it very dangerous if the process is interrupted -- a file can be truncated. 2) This program checks if the file has already been converted. If so, it does not do it again. 3) If one or more files can not be read, an error message is issued and the rest of the files in the list are converted.

This utility is meant to be used on a list of files, as is found in a directory. So you can use this tool to convert some or all files in a directory.

Classes

ProcessFile

Functions

mymain Main routine to invoke tool.
usage Print usage for this tool.

ProcessFile

Derived from

object

Methods

ProcessFile Open file and read all its lines
needsConverting Check if any lines need converting.

ProcessFile (Constructor)

ProcessFile(fn)

Open file and read all its lines into a cache which will be used later.

ProcessFile.needsConverting

needsConverting()

Check if any lines need converting. A line needs converting if it ends only in '\r' else it is already in the right format. This check prevents converting an already converted file.

Up

mymain

mymain(args)

Main routine to invoke tool.

Up

usage

usage()

Print usage for this tool.

Up