home *** CD-ROM | disk | FTP | other *** search
- ----------------------------------------------------------------------
- Copyright (C) 1991 by Natürlich!
- This file is copyrighted!
- ----------------------------------------------------------------------
-
- CRLF155 --- a file conversion utility for Atari 8Bit/16Bit and UNIX
- systems. ASCII only.
-
-
- Copyright © 1991 by Natürlich!
- on sources, binaries and manuals
- Parts of this program (WILDMAT) by Rich $alz & Lars Mathiesen (*)
-
- »» Bang that Bit that doesn't Bang ««
-
-
-
- I n t r o d u c t i o n
-
- If you are developing on UNIX and TOS systems, you are probably
- transporting archives from one machines to the other. But there is a
- problem, the carriage returns are missing! That's because UNIX
- (cleverly) uses only a LF to terminate a line, whereas TOS (and MSDOS)
- use two characters CR and LF. (The historical reason is that with
- a CR/LF ended, line you can just dump the file into (most) printers.)
- If you often transport files between the two systems, this utility
- is probably what you were looking for. Not that it is immensely
- difficult to write such a conversion utility, actually it's probably
- about the simplest program imaginable, but you don't have to write it
- again, and CRLF155 is a million times more useful, than the one your
- are using now.
-
-
- U s a g e
-
- crlf155 ([flags] <pattern>)+
-
- -a Optionally you can also convert ATASCII files to UNIX
- -x with the -a option and to TOS with the -x option.
- The backwards flag applies here as well. Also you
- can untabify here. Be sure to set the TAB value.
-
- -n Just untabify. This is useful, when converting between
- files of various editors. (I hate ((char) 0x9)s ...)
-
- -h No hardtabs. (probably useless). Assume a TAB to be
- a fixed amount of spaces.
-
- -b Backwards, change conversion direction, f.e. LF to 155
- This depends if you are a UNIX or TOS system. The default
- conversion route is to your system.
-
- -u[val] Untabify, default: TOS TAB == 3, UNIX TAB == 8
-
- -c<char> Specify TAB character. Either as a character or in
- decimal.
-
- -s Show some statistics for user amusement
-
- -t (TOS) halt screen before exiting
-
-
-
- E x a m p l e s
-
- On a TOS system under GULAM
-
- 1. Convert all .C and .H files from TOS to UNIX.
-
- crlf155 -b '*.c *.h'
-
- Note that files are lowercase. The apostrophes are to protect the
- argument from expansion. Else GULAM would substitute all the .C and
- .H files as arguments. Unfortunately standard TOS commandlines can't
- exceed 125 characters (or somesuch).
-
- 2. Convert all .C files from UNIX to TOS all .TXT files from ATASCII
- to UNIX, that start with 'a', 'b', 'c' or 'f'. Untabify the .TXT
- files, but leave the TABs in the .C files.
-
- crlf155 '*.c' -a -u8 '[a-cf]*.txt'
-
- Flags can be toggled. The commandline is processed, from left to
- right.
-
- CRLF155 overwrites the source file. If your disk runs out of space
- one file might get clobbered. If CRLF155 has been compiled with
- LASTDITCH code enabled, CRLF155 will try to save a backup in f:\tmp
- (/tmp for UNIX) or whereever it was told to save it. CRLF155 looks
- in the environment and looks for an entry TMPDIR.
- CRLF155 preserves the time/date of the source file. This is so that
- make doesn't recompile/assemble the files, just because you changed
- a couple of TABs and LFs.
-
-
-
- (*) Rich Dollaralz, Cashalz, Lootalz ??
-