	IFND PATCH_BASE_PRIVATE_I
PATCH_BASE_PRIVATE_I SET 1
**
**	$Filename: libraries/PatchbasePRIVATE.i $
**	$Release: 6.0 (internal only) $
**
**	(C) Copyright 1993-97 Stefan Fuchs
**	All rights reserved
**
**      definition of patch.library private base structure


	IFND EXEC_TYPES_I
	include "exec/types.i"
	ENDC

	IFND EXEC_LISTS_I
	include "exec/lists.i"
	ENDC

	IFND EXEC_LIBRARIES_I
	include "exec/libraries.i"
	ENDC

	IFND EXEC_SEMPHORES_I
	include "exec/semaphores.i"
	ENDC


	STRUCTURE PatchBase,LIB_SIZE
	UBYTE PB_Flags			;see below
	UBYTE PB_pad
	ULONG PB_SegList

	STRUCT	PB_Semaphore,SS_SIZE	;Semaphore to protect MasterPatchList
	STRUCT	PB_MasterPatchHeader,14	;Listheader for MasterPatch structures

;Private stuff follows down here
	APTR PB_DosBase
	APTR PB_SysBase
	LONG PB_PatchFunctionCounter	;The Support Program PatchSetFunction
					;may only be removed, if this Counter is
					;zero
	STRUCT	PB_NotifyListHeader,14	;Header of a double linked list
					;containing pointers to MsgPorts to
					;notify in the ln_Name fields
;Fields new for V4:
	WORD PB_PatchSVActive		;If > 0 the support program PatchSupervisor
					;is active within the system
	WORD PB_PatchSVRemoveable	;If 0 the support program PatchSupervisor
					;may remove itself from the system
	APTR PB_MemoryPool		;>0, if memory pools are available
	STRUCT	PB_ProjectHeader,14	;Header of a double linked list
					;containing pointers to PatchProjects
;Fields new for V5:
	WORD PB_OffsetCodeStart		;This contains the number of Bytes between PS_PatchCode
					;and the first Assembler Instruction for use by PatchSetFunc
;Fields new for V6:
	WORD PB_StackExtensions 	;Number of tasks, which can have a stackextension active for a function
					;Higher values mean higher memory usage
					;Default: 5

	APTR PB_UtilityBase
	WORD PB_PSFVersion		;Version of installed PatchSetFunc (for work-arounds only)
					;PatchSetFunc 2.2 is the first version setting this value
	WORD PB_PSFRevision		;Revision of installed PatchSetFunc (for work-arounds only)
					;PatchSetFunc 2.2 is the first version setting this value

	LABEL PatchBase_SIZEOF


;PB_Flags:
	BITDEF	PB,CheckPC,0		;If TRUE: Enable safe removal of patches!
					;Patch.library will use a hack, which
					;is highly dependent on OS versions and installed
					;processors and may therefore not work with
					;certain configurations
					;It's unlikly to crash the machine though
					;New with V4, default: TRUE
	BITDEF	PB,PatchSetFuncActive,1	;If TRUE: A program redirects SetFunction() to patch.library
					;(older versions of PatchSetFunc do not set this bit)
					;New with V4, default: FALSE
	BITDEF  PB,BreakForbid,2	;If TRUE: Break forbid and disable, when
					;trying to get the global semaphore
					;New with V6, default: FALSE
	BITDEF  PB,NoStackAllocmem,3	;If TRUE: Do not call Allocmem for stack extension
					;New with V6, default: TRUE



	ENDC	;PATCH_BASE_PRIVATE_I
