#ifndef LIBRARIES_STC_H
#define LIBRARIES_STC_H
/*
**
**	$Filename: libraries/stc.h $
**	$Revision: 1.1 $
**	$Date: 93/07/25 $
**
**      stc.library definitions
**
**	(C) Copyright 1991-1993 Jouni 'Mr.Spiv' Korhonen
**	    All Rights Reserved
**
*/

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef EXEC_LISTS_H
#include <exec/lists.h>
#endif
#ifndef EXEC_LIBRARIES_H
#include <exec/libraries.h>
#endif
#ifndef GRAPHICS_GFXBASE_H
#include <graphics/gfxbase.h>
#endif
#ifndef	GRAPHICS_RASTPORT_H
#include <graphics/rastport.h>
#endif
#ifndef	GRAPHICS_RASTPORT_H
#include <graphics/rastport.h>
#endif
#ifndef  INTUITION_INTUITION_H
#include <intuition/intuition.h>
#endif
#ifndef DOS_DOS_H
#include <dos/dos.h>
#endif
#ifndef  DOS_DOSEXTENS_H
#include <dos/dosextens.h>
#endif

#define	STCNAME          "stc.library"
#define	STCVERSION      2L

/*****************************************************************************
*                                                                            *
* Preferences                                                                *
*                                                                            *
*****************************************************************************/

#define S403           0L

#define phNOHEADER     1L
#define phNOMATCH      2L
#define phUNIT         3L
#define phNAME         4L
#define phREHEADER     5L
#define phOVERLAY      6L
#define phBREAK        7L
#define phHUNKID       8L

#define seEXEC         0L
#define sePEXEC        1L
#define seLIBRARY      2L
#define seOVERLAY      3L
#define seABSOLUTE     4L

struct  stcCrunchInfo
{
  ULONG FileLength;
  APTR Buffer;
  APTR FileBuffer;
  struct MsgPort *MsgPort;                      /* If NULL no event check */
  struct RastPort *RastPort;
  struct GfxBase *GfxBase;                      /* If NULL no crunchcounter */
  WORD XPos;
  WORD YPos;
};

/*****************************************************************************
*                                                                            *
* Library Base                                                               *
*                                                                            *
*****************************************************************************/


struct StcBase
{
  struct Library LibNode;
  struct DosLibrary *DosBase;
  BPTR SegList;
  ULONG Flags;
  ULONG pad;

  APTR FirstBuffer;
  ULONG BufferSize;                             /* Read Only! */
  ULONG SecurityLen;                            /* REad Only! */
  ULONG ErrorMsg;
};

#endif	/* LIBRARIES_STC_H */

