TypeTrans module
================


This module gives general support for transfering files to and from 
RiscOS from other platforms.

The module is copyright and may only be distributed with applications
that it supports.  A royalty will be required for its use by any 
application that is not Freeware.

The SWI numbers are registered with Acorn.

It includes code to uuencode and decode as well as encoding and
decoding base64.  The user interface for this is available from the
author on request.  It also includes the following SWIs:


TypeTrans_FromPC (&505C0)
-------------------------

This translates PC file extensions to RiscOS filetypes.

On entry: 

  R1 pointer to a (up to three character) PC file extension, null terminated

On exit:
  
  R0 RiscOS filetype
  R1 unchanged

If no RiscOS filetype can be identified &FFD (data) is returned.

Errors returned:
  
  None

This SWI first checks the user's DosMap settings.  If no extension 
is specified there it will check through the TypeTrans internal 
table.  In cases of conflict the DosMap value will be returned.


TypeTrans_ToPC (&505C1)
-----------------------

This translates RiscOS filetypes to PC file extensions.

On entry:

  R0 The RiscOS filetype

On exit:

  R0 unchanged 
  R1 pointer to the PC file extension, null terminated.
  
Errors returned:
  
  None

If no PC file extension can be identified an empty sting is returned.

This SWI first checks the user's DosMap settings.  If the filetype 
is not specified it will check through the TypeTrans internal table.  
In cases of conflict the DosMap extension will be returned and if 
more than one extension maps to the same filetype the first specified 
extension will be returned.



This module was written by John Allen (john@bramber.demon.co.uk).
Please write to me with comments, suggests and bug reports (unlikely!)


Acknowledgement
===============

The following is reproduced from the header files of the uuencode and 
decoder C source code.

TypeTrans uses these coders, the standard reference coder/decoder
from Unix, to provide maximum compatibility.

Copyright (c) 1983, 1993
	The Regents of the University of California.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
   must display the following acknowledgement:
	This product includes software developed by the University of
	California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
   may be used to endorse or promote products derived from this software
   without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.



