home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / fileutil / add-lf10.arj / ADD-LF.DOC next >
Encoding:
Text File  |  1992-01-18  |  7.3 KB  |  183 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                           [*]    Add-Lf    [*]
  9.  
  10.                                Version  1.0
  11.  
  12.                    (C) Copyright 1992, By Randall Edwards
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                                DISCLAIMER 
  21.                                ----------
  22.  
  23.               The program ADD-LF.EXE and this documentation are the
  24.          copyrighted property of Randall Edwards. All rights, except 
  25.          those outlined in this document, are reserved. 
  26.  
  27.               By using this software you acknowledge that this 
  28.          software may not suit your particular needs or be completely 
  29.          trouble free.  Use this program at your own risk. 
  30.  
  31.               In no event will Randall Edwards be liable for any 
  32.          damages, including any lost profits, lost savings or other 
  33.          incidental or consequential damages arising out of the use of 
  34.          or inability to use these programs, even if Randall Edwards 
  35.          has been advised of the possibility of such damages. 
  36.  
  37.               In short, there's absolutely no guarantees with this 
  38.          program.  Use it at your own risk.  If you break it, you can 
  39.          have both pieces. 
  40.  
  41.  
  42.  
  43.                           CREDIT WHERE CREDIT IS DUE 
  44.                           ---------------------------
  45.  
  46.               I give credit to the Taiwanese, who for near-slave wages 
  47.          produced this computer that this program was written on.  By 
  48.          allowing companies based in the United States to steal their 
  49.          labor and the profits from their hard work, I have the wealth 
  50.          and time to 'play' around with this machine and to write 
  51.          programs like this.  They have only their near-slave wages, 
  52.          terrible working conditions, and my appreciation and hope 
  53.          that they can overcome obstacles in their way and achieve 
  54.          full social justice. 
  55.         
  56.  
  57.  
  58.  
  59.                              PURPOSE AND USAGE
  60.                              -----------------
  61.           
  62.               Add-Lf is a simple program to add linefeeds (ASCII code 
  63.          10) to text files that don't have linefeeds. 
  64.  
  65.               A short note about EOL (end-of-line) markers.  
  66.          
  67.               MS-DOS uses the sequence Carriage Return (ASCII code 13) 
  68.          then LineFeed (ASCII code 10) to mark the end of a line of 
  69.          text in an ASCII text file.  That's all well and fine, the 
  70.          problem is that many other computers only use a Carriage 
  71.          Return and no linefeed. 
  72.  
  73.               That's where Add-Lf comes in. 
  74.  
  75.               Add-Lf should ONLY be used on plain ASCII text files.  
  76.          Using it on binary files (such as *.EXE or *.COM files) is 
  77.          NOT recommended and unknown results will occur -- but hey, 
  78.          you're big enough, do what you want, right? 
  79.  
  80.               Add-Lf will search through a text file examining every 
  81.          single byte in the file.  What Add-Lf searches for is a 
  82.          Carriage Return (ASCII 13).  Whenever Add-Lf finds a Carriage 
  83.          Return in a file it will replace the single Carriage Return 
  84.          character with the two characters Carriage Return and 
  85.          LineFeed.
  86.          
  87.               The use of Add-Lf is simple.  Add-Lf takes one command 
  88.          line parameter -- the name of a text file to work on.  You 
  89.          would run Add-Lf from the DOS prompt like this:
  90.          
  91.          C> Add-Lf THISFILE.TXT
  92.          
  93.               Or, alternatively, you can specify the drive and path to 
  94.          a particular file, in a form such as:
  95.          
  96.          C> Add-Lf C:\DOCS\THATFILE.DOC
  97.          
  98.               Once you run Add-Lf it will go to work and search 
  99.          through every character replacing Carriage Returns with the 
  100.          Carriage Return/LineFeed sequence.  
  101.          
  102.               Add-Lf will inform you on the screen to the file it is 
  103.          working on, how many characters it has read in from the 
  104.          specified input file, and how many characters it has written 
  105.          out to its output file.  Since Add-Lf will ADD a LineFeed to 
  106.          a file after each Carriage Return, common sense says that the 
  107.          output file will be slightly larger than the input file. 
  108.  
  109.               Warning!  There are two cautions that you should be 
  110.          aware of when using Add-Lf.  These are:         
  111.  
  112.  
  113.          1) Add-Lf will not bother to check to see if a file already 
  114.          has a normal Carriage Return/LineFeed sequence in it.  
  115.          
  116.               If you're silly enough to run Add-Lf on a file that 
  117.          already has a normal MS-DOS Carriage Return/LineFeed sequence 
  118.          in it, you'll wind up with a file that will have a "Carriage 
  119.          Return LineFeed LineFeed" sequence all through the file, 
  120.          which probably isn't what you wanted.  Simple enough, huh? 
  121.          
  122.          2) Add-Lf overwrites the input file!  
  123.          
  124.               Add-Lf will work on a text file of any size, because it 
  125.          writes the output to a temporary file called $ADD-LF$.TMP 
  126.          which is temporarily written in the default directory where 
  127.          you run Add-Lf from.  If, for some reason that Add-Lf aborts 
  128.          while being run (say, an out of disk space error or something 
  129.          similar) then Add-Lf will inform you of what has happened and 
  130.          your input file will remain intact and untouched. 
  131.  
  132.               However, once Add-Lf successfully adds linefeeds to a 
  133.          file, it will overwrite the input file and will not save a 
  134.          backup copy (Add-Lf, of course, erases its temporary 
  135.          $ADD-LF$.TMP file when it is finished).  While this should 
  136.          not be a problem, since you told Add-Lf to process the input 
  137.          file, you should be aware of this. 
  138.  
  139.               If, for any reason, Add-Lf experiences an error while 
  140.          processing a file, Add-Lf will return a DOS errorlevel of 1 
  141.          which could be "trapped" in a DOS batch file.
  142.          
  143.               If you do not specify an input file on the DOS command 
  144.          line for Add-Lf to process, Add-Lf will display a short help 
  145.          screen reminding you what the program does and how to use it. 
  146.  
  147.          And that's about all there is to running and using Add-Lf. 
  148.  
  149.  
  150.  
  151.  
  152.           VERSION HISTORY
  153.           --------------- 
  154.           
  155.          1.0 - Initial public release.
  156.  
  157.  
  158.  
  159.  
  160.                                 LICENSE 
  161.                                 -------
  162.          
  163.               It's free.  If you like it use it.  If you don't like it 
  164.          then erase it from your disk(s) and forget all about it.  
  165.          
  166.               The only persons and/or organizations that are 
  167.          specifically forbidden to use this program are anyone 
  168.          employed by the Department of Defense and/or the National 
  169.          Security Agency of the United States Government. 
  170.          
  171.               Please don't modify and then redistribute the program and/or
  172.          documentation. 
  173.          
  174.               Suggestions and bug reports may be sent to Randy Edwards 
  175.          at the Socialism OnLine! BBS at 1-719-392-7781, 300-9600 bps
  176.          HST/MNP/V42bis, FidoNet 1:128/105.0.
  177.  
  178.               Trademarks mentioned in this document are probably 
  179.          registered to their respective owners.  (But who cares, right?)
  180.  
  181.  
  182.  
  183.