

WFile - WorkFile - work (do things) on (ASCII-)files
----------------------------------------------------
Version 1.10 - Freely distributable as long as it is used in non-commercial
products.


WFile takes one (1 in the current version, more in later versions) file and
processes certain characters in it. Tabs can be expanded to multiple
spaces, multiple spaces can be shrinked into one tab. Newline characters
can be expanded by a CR code (usual on MS-DOS machines) or MS-DOS
file-newlines can be stripped to a single LF code (usual on Amiga and UNIX
machines). Foreign characters (German Umlaute for example) can be changed
to the character set of another machine.

WFile provides a number of built-in templates to adapt files between
AmigaDOS, MS-DOS and UNIX machines. This allows the user to adapt a file
quickly without knowing the different ASCII-codes on each system.

Type wfile without any parameters to see how to invoke WFile. Parameters in
<> brackets have to be specified, those in [] brackets are optional.
Parameters divided by a | can be replaced by each other, i.e. one of those
parameters have to be specified.

Here are some more facts concerning the parameters:

file -		       name of the file to be processed. WFile
		       automatically backs up the original file by adding
		       the extension .bak to it. (The MS-DOS version changes
		       a present extension to .bak.) You could switch this
		       off by setting the -b option (no backup).

-?   -		       displays this help text and exits. All other
		       parameters are ignored.

+|-CR	 -	       adds (+) or removes (-) the CR character ($0d) before
		       a LF character ($0a). In AmigaDOS and UNIX a newline
		       is represented by a single LF character, on MS-DOS
		       systems a newline is represented by a CR and a LF
		       character.

+|-T[tabsize] -        +T shrinks multiple spaces (number can be specified
		       by the optional tabsize parameter) to one tab.
		       -T expands one tab to multiple spaces.
		       If no tabsize parameter is given a tabsize of 8 is
		       assumed.
		       WFile regards tabs as fixed tabs, that means that
		       tabstops start at fixed positions. Example: If you
		       have a tabsize of 8 and the first two characters are
		       two slashes (//) the next tab will advance the
		       cursor to file position 8 (next tabstop) and not 10
		       (fileposition + tabsize).

-ddd=ddd	       exchange characters
		       With this option you can adapt foreign symbols
		       (German Umlaute for example) from one system to
		       another since they have different ASCII codes on
		       each system. With -246=148 you can adapt the German
		       oe on Amiga systems to an oe on MSDOS systems.
		       You could also delete characters like an oe if you
		       say -246=0. To exchange the ASCII value 246 against
		       the ASCII value null (0) you have also to specify
		       the -0 option (see below)

-0		       treat 0 as an ASCII value
		       If you want to *EXCHANGE* anything with a \0 rather
		       than deleting a character you have to set the -0
		       option, otherwise the 0 would be treated as a remove
		       command (see exchange characters above)

-b		       do not create backup of the original.
		       Usually WFile creates a backup of the original file
		       to make sure that, in case of an error, you could
		       restore the original state. The backup file gets the
		       extension .bak.

-f[filename]	       use a profile to enter commands.
		       With this powerful option you can specify a file
		       that may contain WFile options. This allows you to
		       save all your desired options in a file so that you
		       don't have to enter all the options every time you
		       use WFile. If you don't specify a file name, WFile
		       will look for the file "wfile.pro" to read. (see
		       below how to build a profile)

+ddd		       add character to end of file
		       Some (strange) operating systems such as the famous
		       operating system bulit in (curiously enough) very
		       popular machines (starting with M..., I don't dare
		       to speak out the name) add a $1A code to the end of
		       each file. If you convert files from a real computer
		       to one of those systems you can enforce to add this
		       character with +26 (decimal value of $1A). You
		       could, of course, add any other (ASCII) value
		       between 0 and 255.

TEMPLATES: ----------

Generally: All options within a template are written to STDOUT to let you see
	   what's going on.

-AI  -		       Amiga to IBM
		       This template changes foreign symbols (German
		       Umlaute in the current version) from the Amiga to
		       the enhanced IBM-ASCII set used in IBM PCs and its
		       clones. It also adds an CR code to the end of each
		       line.

-IA  -		       IBM to Amiga
		       This templete changes foreign symbols (German
		       Umlaute in the current version) from the enhanced
		       IBM-ASCII set to MSDOS compatible systems to the
		       character set of the Amiga. The CR code at the ende
		       of each line will be stripped.

-AU  -		       Amiga to UNIX
		       changes Amiga foreign symbols to their UNIX (HP
		       9000/825 HP-UX 7.0 SysV) equivalents (see above).

-UA  -		       UNIX to Amiga
		       changes UNIX (HP 9000/825 HP-UX 7.0 SysV) foreign
		       symbols to their Amiga equivalents (see above).

-UI  -		       UNIX to IBM.
		       changes foreign symbols from UNIX to the enhanced
		       IBM- ASCII set used in IBM PCs and its clones. It
		       also adds an CR code to the end of each line.

-IU  -		       IBM to UNIX
		       changes foreign symbols from the enhanced IBM-ASCII
		       set on MSDOS compatible systems their equivalents
		       in UNIX.The CR code at the end of each line will be
		       stripped.


PROFILES:
---------

Generally: All options within a profile are written to STDOUT to let you
	   see what's going on.

In a profile you can specify the options that WFile should use. You can
keep any number of profiles, according to your needs. If you want to use a
profile you must specify the -f option (see above) to let WFile know your
commands come from a file. If no filename after the -f option is specified,
WFile looks for a file named 'wfile.pro' in the current directory to read
from. Amiga users should keep their wfile.pro file in the s: directory and
invoke WFile with -fs:wfile.pro option.

A profile can contain any number of options as long as the general maximum
for WFile commands is not exceeded. All templates (see above) may be used!
In this case you should not specify the options within a template also by
yourself. WFile might get confused if an option has to be processed twice.

Each option must stand in a single line. Each line MUST NOT contain more
than 79 characters (currently there is no option, that is that long). Each
line MUST end with a newline character ($0a on UNIX and Amiga, $0d$0a on
MSDOS). Comment lines MUST have a # character as their first sign.

Example:

# don't enter the <newline> literally, just press return
-t2  <newline>
-UI  <newline>
-b   <newline>

---------------------------------------------------------------------------
WFile is (C) Copyright 1991 by Joerg Fenin / Metalworx.

USE THIS PROGRAM AT YOUR OWN RISK!!
There is no guarantee that WFile works properly. The author takes no
responsibility for any damage that might result from the use of WFile.

This program may be distributed and used freely as long as no more than DM
5,- / US $ 5,- is charged for copying. It MUST NOT be part of any
commercial product without the written permission of the author.


