home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / workbench / libs / iffparse / currentchunk.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-03  |  1.5 KB  |  71 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: currentchunk.c,v 1.1 1997/02/03 16:44:22 digulla Exp $
  4.  
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "iffparse_intern.h"
  9.  
  10. /*****************************************************************************
  11.  
  12.     NAME */
  13. #include <proto/iffparse.h>
  14.  
  15.     AROS_LH1(struct ContextNode *, CurrentChunk,
  16.  
  17. /*  SYNOPSIS */
  18.     AROS_LHA(struct IFFHandle *, iff, A0),
  19.  
  20. /*  LOCATION */
  21.     struct Library *, IFFParseBase, 29, IFFParse)
  22.  
  23. /*  FUNCTION
  24.     Returns the top context node for the give IFFHandle struct.
  25.     The top contexte is the node most recently pushed onto the
  26.     context stack
  27.  
  28.     INPUTS
  29.     iff  - pointer to IFFHandle struct.
  30.  
  31.     RESULT
  32.     top - Pointer to top contextnode or NULL if none.
  33.  
  34.     NOTES
  35.  
  36.     EXAMPLE
  37.  
  38.     BUGS
  39.  
  40.     SEE ALSO
  41.     PushChunk(), PopChunk(), ParseIFF(), ParentChunk()
  42.  
  43.     INTERNALS
  44.     " .. or NULL if none" (see RESULT) is truth with slight modifications,
  45.     since the default context node exists as long as the iffhandle
  46.     itself. However, the user is never given a pointer to this node.
  47.  
  48.  
  49.     HISTORY
  50.   27-11-96    digulla automatically created from
  51.       iffparse_lib.fd and clib/iffparse_protos.h
  52.  
  53. *****************************************************************************/
  54. {
  55.     AROS_LIBFUNC_INIT
  56.     AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
  57.  
  58.     struct ContextNode *cn;
  59.  
  60.     if (iff->iff_Depth)
  61.     cn = TopChunk(iff);
  62.     else
  63.     /* If iffhandle is not opened yet, ther will be no contextnodes */
  64.     cn = NULL;
  65.  
  66.     return (cn);
  67.  
  68.  
  69.     AROS_LIBFUNC_EXIT
  70. } /* CurrentChunk */
  71.