TypeTrans is a module written by John Allen to convert between RiscOS and other filetyping systems and to perform coding and decoding of binary files being sent on the Internet. At present it supports uucode and base64 coding.
It has an SWI interface to the coders and decoders as well as other support fuctions. Note that although it is readily available it is not Freeware and the user interface is largely unpublished. Authors of Freeware software may however request a copy of the user interface specification and use/distribute the module with their own applications, provided that its use is acknowledged.
Authors of commercial software will be expected to pay a royalty if they make use of calls in this module.
The SWI numbers are registered with Acorn.
Two SWIs are documented and can be freely used:
This translates PC file extensions to RiscOS filetypes.
R1 pointer to a (up to three character) PC file extension, null terminated
R0 RiscOS filetype
If no RiscOS filetype can be identified &FFD (data) is returned.
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.
This translates RiscOS filetypes to PC file extensions.
R0 The RiscOS filetype
R1 pointer to the PC file extension, null terminated.
If no PC file extension can be identified an empty string 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.
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
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