/* LinkUnTmpRas.h  -- allocate, initialize and link a TmpRas structure
 *                    into the given RastPort.  AllocRaster's a
 *                    temporary raster area using the given size.
 *                    Also a function to unlink and free the TmpRas and
 *                    Raster.
 *   Written for Manx 3.4a
 *
 * Copyright  1988, Patrick White.
 *    Anybody can use this code in any commercial or non-commercial program.
 * It may not be sold alone or as part of a code toolbox (without prior
 * arrangments with me).
 */
/* struct  TmpRas  *InitLinkTR( rport, width, height, ret_code );
 * struct  RastPort  *rport;    -- RastPort to attatch TmpRas to
 * LONG width;                  -- max width of screen or window
 * LONG height;                 -- max height of screen or window
 * LONG *ret_code;              -- return code to indicate errors
 *
 * allocate, init, then link into the RastPort, a TmpRas structure and
 * related Raster.
 *
 * return codes from ret_code
 *       0 == all ok.. worked perfectly
 *      -1 == GfxBase not opened
 *      -2 == can't allocate raster
 *      -3 == can't allocate TmpRas structure
 */
/* LONG  UnlinkFreeTR( rport, width, height )
 * struct  RastPort  *rport;    -- RastPort to unlink and free TmpRas from
 * LONG    width;               -- max width of window or screen
 * LONG    height;              -- max height of window or screen
 *
 * unlink and free the TmpRas and raster in a rasterport -- ASSUMES THAT
 * BOTH WERE ALLOCATED BY THE ABOVE FUNCTION.  If this is not the case,
 * expect a visit from the GURU.
 *
 * return codes
 *       0 == everything ok
 *      -1 == GfxBase no longer open -- nothing done
 *      -2 == TmpRas ptr was NULL
 */
/* LONG  FreeTmpRas( tmpras, width, height )
 * struct  TmpRas  *tmpras;     -- ptr to TmpRas struct to free
 * LONG width;                  -- width of raster to free
 * LONG height;                 -- height of raster to free
 *
 * free a TmpRas structure alloacted by InitLinkTR()
 * (does the grunt work for UnlinkFreeTmpRas().. but dosen't unlink it)
 *
 * return codes:
 *    0 == all ok
 *   -2 == NULL tmpras ptr
 */
struct  TmpRas  *InitLinkTR();
LONG            UnlinkFreeTR();
LONG            FreeTmpRas();
