summaryrefslogtreecommitdiff
path: root/Source/CloseIFF.S
diff options
context:
space:
mode:
authorChristian A. Weber <chris@gna.ch>1992-05-12 22:26:12 +0000
committerChristian A. Weber <chris@gna.ch>1992-05-12 22:26:12 +0000
commit36c824864c02f0a3f62c8a1d365d1670835c8c96 (patch)
treef3f433e4af522925d4c91f56865d38efaf83a456 /Source/CloseIFF.S
downloadiff-library-36c824864c02f0a3f62c8a1d365d1670835c8c96.tar.gz
iff-library-36c824864c02f0a3f62c8a1d365d1670835c8c96.tar.bz2
iff-library-36c824864c02f0a3f62c8a1d365d1670835c8c96.zip
Initial revision
Diffstat (limited to 'Source/CloseIFF.S')
-rw-r--r--Source/CloseIFF.S67
1 files changed, 67 insertions, 0 deletions
diff --git a/Source/CloseIFF.S b/Source/CloseIFF.S
new file mode 100644
index 0000000..b463eaa
--- /dev/null
+++ b/Source/CloseIFF.S
@@ -0,0 +1,67 @@
+**
+** $Id: $
+** $Revision: $
+**
+** $Filename: CloseIFF.S $
+** $Author: Christian A. Weber $
+** $Release: 19.1 $
+** $Date: 92/05/11 21:11:27 $
+**
+** iff.library/IFFLib_CloseIFF
+**
+** COPYRIGHT (C) 1987-1992 BY CHRISTIAN A. WEBER, BRUGGERWEG 2,
+** CH-8037 ZUERICH, SWITZERLAND. ALL RIGHTS RESERVED. NO PART
+** OF THIS SOFTWARE MAY BE COPIED, REPRODUCED, OR TRANSMITTED
+** IN ANY FORM OR BY ANY MEANS, WITHOUT THE PRIOR WRITTEN PER-
+** MISSION OF THE AUTHOR. USE AT YOUR OWN RISK.
+**
+
+
+ IDNT IFFLib_CloseIFF
+ SECTION text,CODE
+
+ INCLUDE "IffLib.i"
+
+ XREF ClearError
+ XDEF CloseIFFFunc
+
+
+******* iff.library/IFFLib_CloseIFF *****************************************
+*
+* NAME
+* IFFLib_CloseIFF -- Close an IFF-file and deallocate buffers
+*
+* SYNOPSIS
+* IFFLib_CloseIFF( ifffile )
+* A1
+*
+* void IFFLib_CloseIFF( IFFFILE )
+*
+* FUNCTION
+* Returns the memory previously allocated by OpenIFF().
+*
+* INPUTS
+* ifffile - IFF file pointer, from OpenIFF()
+*
+* RESULTS
+* For now, always results TRUE (this may change in the future).
+*
+* SEE ALSO
+* IFFLib_OpenIFF()
+*
+*****************************************************************************
+
+CloseIFFFunc: movem.l a5-a6,-(SP)
+ movea.l a6,a5 ; IFFBase für ClearError()
+
+ move.l a1,d0 ; Ist a1 == NULL ?
+ beq.s 1$ ; ja ---> don't free anything
+ move.l -(a1),d0 ; Grösse des reservierten Bereichs
+ movea.l ib_SysBase(a5),a6
+ JSRLIB FreeMem
+1$: bsr ClearError ; IFFError zurücksetzen, D0 := 1
+
+ movem.l (SP)+,a5-a6
+ rts
+
+ END