home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / MM1 / UTIL / autolf24.lzh / AUTOLF.TXT < prev   
Text File  |  1995-03-01  |  5KB  |  125 lines

  1. ------------------------------------------------------------------------------
  2. autolf - a utility program to convert file line-termination characters
  3.         between formats used by different systems (e.g. Unix, DOS, OS-9).
  4. ------------------------------------------------------------------------------
  5.  
  6. This program will convert between each of the formats, in any direction.
  7. You do not need more than one program (e.g. dos2unix, unix2dos).
  8.  
  9. The information presented here is somewhat brief, if anyone would like
  10. to write it up a bit better, please feel most welcome - email me a
  11. revised version for future distribution.
  12.  
  13. I am initially releasing the following files:
  14.  
  15.     autolf24.lzh      (version 2.4)   1995/03/01
  16.         autolf.osk    OS-9/68K v2.4
  17.         autolf.sun    SunOS v4.1.3
  18.         autolf.exe    MS-DOS version
  19.         autolf.txt    This text file
  20.  
  21. Currently in hand is a port to OS-9/6809; this will be uploaded
  22. to chestnut.cs.wisc.edu when available, and advised in
  23. comp.os.os9
  24.  
  25.  
  26. As this is the first public release of the code, I have not included
  27. source code.  The reason for this is two-fold:
  28.  
  29.     1. So that I can co-ordinate the porting to different platforms.
  30.  
  31.     2. The utility is written by me, for me.  I do not expect it to
  32.         meet everyones needs exactly, so I expect some suggestions
  33.         to make the program better.
  34.  
  35. Once things have stabilised a little, I expect to release the source
  36. code as well.
  37.  
  38.  
  39.  
  40. Overview
  41. --------
  42.  
  43. autolf: copy stdin to stdout, converting end-of-line character sequences
  44. between the formats CR, LF and CRLF.  Also expands tabs if required.
  45. If filenames are provided, then these are used instead of stdin.
  46. Version 2.4, date 1995/03/01
  47. by Mike Tozer: autolf@vkthree.demon.co.uk   See -x for licence.
  48.  
  49. {on the MS-DOS version, '/' may be used as the lead-in for command
  50. line options if desired}
  51.  
  52. Usage:   autolf [<opts>] {<file names> [<opts>]}
  53.    -?         print this information
  54.    -h         print this information
  55.    -H         show detailed information on conversions
  56.    -c         use CR on input as eol sequence
  57.    -l         use LF on input as eol sequence
  58.    -C         use CR on output as eol sequence
  59.    -L         use LF on output as eol sequence
  60.    -N         set -C & -L for this platform (i.e. cr)
  61.    -z         ignore all ^Z characters from input
  62.    -Z         add a ^Z character at the end of the file
  63.    -k         keep intermediate temporary file(s)
  64.    -x         show licence details
  65.    -t[=][<n>] expand tab characters (tab-size <n> default is 4)
  66. If no -c, -l, -C, -L or -N specified, -t is set automatically
  67. If both -C & -L (or -c & -l) given, CR/LF is implied
  68. If neither -c or -l given, auto-detection of input format {i.e. first
  69.                                 EOL sequence detected is used}.
  70. If none of -C, -L, -N given, output is based on input format: see -H
  71. Author: Mike Tozer, autolf@vkthree.demon.co.uk
  72.  
  73.  
  74. Licence Information
  75. -------------------
  76.  
  77. This software is supplied AS IS.  No responsibility can be accepted for
  78. anything caused by using, or possessing this software.  I have no control
  79. over how this program is used, and I have not issued or implied any
  80. warranty so I don't see why I should be responsible if it fails to perform
  81. in some way.  If you don't like these conditions, don't use the program.
  82.  
  83. You may use this program however you wish.  It is not shareware, or
  84. anything like that, so you needn't send me any money (but I won't refuse
  85. any either!)  You may copy and redistribute this software, providing that
  86. you do not modify the program, and that you do not charge anything for this
  87. software other than media and reasonable handling fees.
  88.  
  89. Written in K&R C.  Currently ported to: SunOs 4.1.x; MS-DOS; OS-9/68K
  90.  
  91. If you would like this program available on another platform, and have a C
  92. compiler, please e-mail me.  I will generally release the source code to
  93. allow porting, provided that the ported source & object is returned to me
  94. without any restrictions being imposed on it which would prevent free
  95. distribution of them.  Bug reports and suggestions are also welcome.
  96.  
  97.  
  98. Simple Examples
  99. ---------------
  100.  
  101. (Note that MS-DOS appears to do it's own conversions if stdin and/or
  102. stdout are redirected.  Thus, the MS-DOS version will only operate
  103. directly on files, whereas OS-9 and unix versions will additionally
  104. accept redirected input & output.  If I am wrong here, (and I hope I
  105. am!), please let me know.
  106.  
  107.  
  108.  
  109.     autolf -N readme.txt        
  110.                         convert file to machine's native format
  111.                         note that the resultant format depends on
  112.                         the machine you're running it on.
  113.  
  114.  
  115.     autolf -Ct4 readme.txt
  116.                         convert to OS-9 format (carriage returns only),
  117.                         expanding tabs at 4 column intervals
  118.  
  119.     autolf -L <readme.txt >readme2.txt
  120.                         convert file to use Line Feeds (e.g. unix)
  121.  
  122.  
  123.     autolf -CL readme.txt
  124.                         convert to Carriage Return/Line Feed (e.g. PC)
  125.