home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / doc / crlf155.txt < prev    next >
Text File  |  1993-01-19  |  4KB  |  98 lines

  1.    ----------------------------------------------------------------------
  2.                      Copyright (C) 1991 by Natürlich!
  3.                         This file is copyrighted!
  4.    ----------------------------------------------------------------------
  5.  
  6.    CRLF155 --- a file conversion utility for Atari 8Bit/16Bit and UNIX
  7.                systems. ASCII only.
  8.  
  9.  
  10.          Copyright © 1991 by Natürlich!
  11.             on sources, binaries and manuals
  12.          Parts of this program (WILDMAT) by Rich $alz & Lars Mathiesen (*)
  13.    
  14.                   »» Bang that Bit that doesn't Bang ««
  15.  
  16.  
  17.  
  18.    I n t r o d u c t i o n
  19.  
  20.    If you are developing on UNIX and TOS systems, you are probably
  21.    transporting archives from one machines to the other. But there is a 
  22.    problem, the carriage returns are missing! That's because UNIX 
  23.    (cleverly) uses only a LF to terminate a line, whereas TOS (and MSDOS) 
  24.    use two characters CR and LF. (The historical reason is that with
  25.    a CR/LF ended, line you can just dump the file into (most) printers.)
  26.    If you often transport files between the two systems, this utility
  27.    is probably what you were looking for. Not that it is immensely
  28.    difficult to write such a conversion utility, actually it's probably
  29.    about the simplest program imaginable, but you don't have to write it
  30.    again, and CRLF155 is a million times more useful, than the one your 
  31.    are using now.
  32.  
  33.  
  34.    U s a g e
  35.  
  36.       crlf155 ([flags] <pattern>)+
  37.       
  38.          -a       Optionally you can also convert ATASCII files to UNIX
  39.          -x       with the -a option and to TOS with the -x option.
  40.                   The backwards flag applies here as well. Also you
  41.                   can untabify here. Be sure to set the TAB value.
  42.                    
  43.          -n       Just untabify. This is useful, when converting between
  44.                   files of various editors. (I hate ((char) 0x9)s ...)
  45.          
  46.          -h       No hardtabs. (probably useless). Assume a TAB to be
  47.                   a fixed amount of spaces.
  48.          
  49.          -b       Backwards, change conversion direction, f.e. LF to 155
  50.                   This depends if you are a UNIX or TOS system. The default
  51.                   conversion route is to your system.
  52.          
  53.          -u[val]  Untabify, default: TOS TAB == 3, UNIX TAB == 8
  54.          
  55.          -c<char> Specify TAB character. Either as a character or in
  56.                   decimal.
  57.          
  58.          -s       Show some statistics for user amusement
  59.          
  60.          -t       (TOS) halt screen before exiting
  61.  
  62.    
  63.  
  64.    E x a m p l e s
  65.    
  66.    On a TOS system under GULAM 
  67.    
  68.    1. Convert all .C and .H files from TOS to UNIX.
  69.    
  70.       crlf155 -b '*.c *.h' 
  71.       
  72.       Note that files are lowercase. The apostrophes are to protect the
  73.       argument from expansion. Else GULAM would substitute all the .C and
  74.       .H files as arguments. Unfortunately standard TOS commandlines can't
  75.       exceed 125 characters (or somesuch).
  76.       
  77.    2. Convert all .C files from UNIX to TOS all .TXT files from ATASCII
  78.       to UNIX, that start with 'a', 'b', 'c' or 'f'. Untabify the .TXT 
  79.       files, but leave the TABs in the .C files.
  80.       
  81.       crlf155 '*.c' -a -u8 '[a-cf]*.txt'
  82.       
  83.       Flags can be toggled. The commandline is processed, from left to
  84.       right.
  85.          
  86.    CRLF155 overwrites the source file. If your disk runs out of space
  87.    one file might get clobbered. If CRLF155 has been compiled with
  88.    LASTDITCH code enabled, CRLF155 will try to save a backup in f:\tmp
  89.    (/tmp for UNIX) or whereever it was told to save it. CRLF155 looks
  90.    in the environment and looks for an entry TMPDIR.
  91.    CRLF155 preserves the time/date of the source file. This is so that
  92.    make doesn't recompile/assemble the files, just because you changed
  93.    a couple of TABs and LFs.
  94.    
  95.    
  96.       
  97. (*) Rich Dollaralz, Cashalz, Lootalz ??      
  98.