home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- [*] Add-Lf [*]
-
- Version 1.0
-
- (C) Copyright 1992, By Randall Edwards
-
-
-
-
-
-
-
- DISCLAIMER
- ----------
-
- The program ADD-LF.EXE and this documentation are the
- copyrighted property of Randall Edwards. All rights, except
- those outlined in this document, are reserved.
-
- By using this software you acknowledge that this
- software may not suit your particular needs or be completely
- trouble free. Use this program at your own risk.
-
- In no event will Randall Edwards be liable for any
- damages, including any lost profits, lost savings or other
- incidental or consequential damages arising out of the use of
- or inability to use these programs, even if Randall Edwards
- has been advised of the possibility of such damages.
-
- In short, there's absolutely no guarantees with this
- program. Use it at your own risk. If you break it, you can
- have both pieces.
-
-
-
- CREDIT WHERE CREDIT IS DUE
- ---------------------------
-
- I give credit to the Taiwanese, who for near-slave wages
- produced this computer that this program was written on. By
- allowing companies based in the United States to steal their
- labor and the profits from their hard work, I have the wealth
- and time to 'play' around with this machine and to write
- programs like this. They have only their near-slave wages,
- terrible working conditions, and my appreciation and hope
- that they can overcome obstacles in their way and achieve
- full social justice.
-
-
-
-
- PURPOSE AND USAGE
- -----------------
-
- Add-Lf is a simple program to add linefeeds (ASCII code
- 10) to text files that don't have linefeeds.
-
- A short note about EOL (end-of-line) markers.
-
- MS-DOS uses the sequence Carriage Return (ASCII code 13)
- then LineFeed (ASCII code 10) to mark the end of a line of
- text in an ASCII text file. That's all well and fine, the
- problem is that many other computers only use a Carriage
- Return and no linefeed.
-
- That's where Add-Lf comes in.
-
- Add-Lf should ONLY be used on plain ASCII text files.
- Using it on binary files (such as *.EXE or *.COM files) is
- NOT recommended and unknown results will occur -- but hey,
- you're big enough, do what you want, right?
-
- Add-Lf will search through a text file examining every
- single byte in the file. What Add-Lf searches for is a
- Carriage Return (ASCII 13). Whenever Add-Lf finds a Carriage
- Return in a file it will replace the single Carriage Return
- character with the two characters Carriage Return and
- LineFeed.
-
- The use of Add-Lf is simple. Add-Lf takes one command
- line parameter -- the name of a text file to work on. You
- would run Add-Lf from the DOS prompt like this:
-
- C> Add-Lf THISFILE.TXT
-
- Or, alternatively, you can specify the drive and path to
- a particular file, in a form such as:
-
- C> Add-Lf C:\DOCS\THATFILE.DOC
-
- Once you run Add-Lf it will go to work and search
- through every character replacing Carriage Returns with the
- Carriage Return/LineFeed sequence.
-
- Add-Lf will inform you on the screen to the file it is
- working on, how many characters it has read in from the
- specified input file, and how many characters it has written
- out to its output file. Since Add-Lf will ADD a LineFeed to
- a file after each Carriage Return, common sense says that the
- output file will be slightly larger than the input file.
-
- Warning! There are two cautions that you should be
- aware of when using Add-Lf. These are:
-
-
- 1) Add-Lf will not bother to check to see if a file already
- has a normal Carriage Return/LineFeed sequence in it.
-
- If you're silly enough to run Add-Lf on a file that
- already has a normal MS-DOS Carriage Return/LineFeed sequence
- in it, you'll wind up with a file that will have a "Carriage
- Return LineFeed LineFeed" sequence all through the file,
- which probably isn't what you wanted. Simple enough, huh?
-
- 2) Add-Lf overwrites the input file!
-
- Add-Lf will work on a text file of any size, because it
- writes the output to a temporary file called $ADD-LF$.TMP
- which is temporarily written in the default directory where
- you run Add-Lf from. If, for some reason that Add-Lf aborts
- while being run (say, an out of disk space error or something
- similar) then Add-Lf will inform you of what has happened and
- your input file will remain intact and untouched.
-
- However, once Add-Lf successfully adds linefeeds to a
- file, it will overwrite the input file and will not save a
- backup copy (Add-Lf, of course, erases its temporary
- $ADD-LF$.TMP file when it is finished). While this should
- not be a problem, since you told Add-Lf to process the input
- file, you should be aware of this.
-
- If, for any reason, Add-Lf experiences an error while
- processing a file, Add-Lf will return a DOS errorlevel of 1
- which could be "trapped" in a DOS batch file.
-
- If you do not specify an input file on the DOS command
- line for Add-Lf to process, Add-Lf will display a short help
- screen reminding you what the program does and how to use it.
-
- And that's about all there is to running and using Add-Lf.
-
-
-
-
- VERSION HISTORY
- ---------------
-
- 1.0 - Initial public release.
-
-
-
-
- LICENSE
- -------
-
- It's free. If you like it use it. If you don't like it
- then erase it from your disk(s) and forget all about it.
-
- The only persons and/or organizations that are
- specifically forbidden to use this program are anyone
- employed by the Department of Defense and/or the National
- Security Agency of the United States Government.
-
- Please don't modify and then redistribute the program and/or
- documentation.
-
- Suggestions and bug reports may be sent to Randy Edwards
- at the Socialism OnLine! BBS at 1-719-392-7781, 300-9600 bps
- HST/MNP/V42bis, FidoNet 1:128/105.0.
-
- Trademarks mentioned in this document are probably
- registered to their respective owners. (But who cares, right?)
-
-
-
-