	IFND	LIBRARIES_FAME_I
LIBRARIES_FAME_I	SET	1

**
**	$VER: FAME.i 0.1
**
**	Standard asm definitions for FAME.library
**
**	(C) Copyright 1996 BLOODROCK/tRSi/F-Innovation
**	    All Rights Reserved
**

	IFND EXEC_LIBRARIES_I
	INCLUDE	"exec/libraries.i"
	ENDC
	IFND DOS_LIBRARIES_I
	INCLUDE	"dos/dos.i"
	ENDC
	IFND LIBRARIES_FAME_LIB_I
	INCLUDE "libraries/FAME_lib.i"
	ENDC


FAMENAME	Macro
		dc.b	"FAME.library",0
		EndM

FAMEVERSION	EQU     0


** FAME Object types **

FOBJ_FAMEDoorMsg	EQU	1
FOBJ_FAMEMailHeader	EQU	2
FOBJ_FAMEMailStat	EQU	3
FOBJ_FAMEToolPortMsg	EQU	4
FOBJ_FAMECoProcessPort	EQU	5
FOBJ_FAMEExternEditor	EQU	6
FOBJ_FAMEToolNotifyMsg	EQU	7


** FAMEAllocObject() error codes **
*  Use DOS/IoErr() to get the error code. May also be ERROR_NO_FREE_STORE.

FAOB_UnknownObject	EQU	-1	; Object type out of range


** Possible return codes from FAMEAvailExe() **

FAE_RESIDENT		EQU	 3
FAE_RESIDENTSYS		EQU	 2
FAE_LOADFILE		EQU	 1
FAE_NOMATCH		EQU	 0
FAE_DATAFILE		EQU	-1
FAE_NOEBIT		EQU	-2
FAE_DIRECTORY		EQU	-3
FAE_ERROR		EQU	-4


** Flags for FAMENumToStr() **

	BITDEF	FNS,HEX,0		; Output hex string
	BITDEF	FNS,BIN,1		; Output binary string
	BITDEF	FNS,WORD,2		; Output size WORD
	BITDEF	FNS,BYTE,3		; Output size BYTE
	BITDEF	FNS,LEADINGZEROES,4	; Output leading zeroes
	BITDEF	FNS,LEADINGSIGN,5	; Add leading numeric system sign
	BITDEF	FNS,RIGHTFORMAT,6	; Right formatted output
	BITDEF	FNS,LEFTFORMAT,7	; Left formatted output
	BITDEF	FNS,CENTERFORMAT,8	; Center formatted output
	BITDEF	FNS,TENDLEFT,9		; Left tendence center formatting
	BITDEF	FNS,LOWERCASE,10	; Hex characters lowercase
	BITDEF	FNS,GROUPING,11		; Separate digit groups
	BITDEF	FNS,NUMLOCALE,12	; Use numeric Locale group separator
	BITDEF	FNS,MONLOCALE,13	; Use monetary Locale group separator
	BITDEF	FNS,SIGNED,14		; Handle value as signed number
	BITDEF	FNS,PLUSSIGN,15		; Use "+" char for signed pos. values
	BITDEF	FNS,SWAPSIGNS,16	; Swap "-/+/ " and "#/$/%" positions


** FAME DevInfoList structure **

	STRUCTURE	FAMEDevInfoList,0
	APTR	fdil_Next		; next device
	STRUCT	fdil_Name,32		; device name including ":"
	LONG	fdil_DiskType		; InfoData->DiskType
	LONG	fdil_DiskState		; InfoData->DiskState
	LONG	fdil_Size		; total size in bytes
	LONG	fdil_BytesFree		; free bytes
	LABEL	fdil_SIZEOF



** FAMEExecuteDir() list (the result you get) **

** This list only contains programs which have been successfully started.

	STRUCTURE	FAMEExecuteDirList,0
	APTR	fxdl_Next 		; next started program
	STRUCT	fxdl_FileName,256	; name of the launched program
	ULONG	fxdl_ReturnCode		; the DOS ReturnCode of the program.
	LABEL	fxdl_SIZEOF		; If the SYS_Async Tag was specified,
					; fxdl_ReturnCode is always NULL.


** FAMEFile structure returned by FAMELoadFile() **

	STRUCTURE	FAMEFile,0
	APTR	ffil_File		; the file image itself
	BPTR	ffil_FH			; the file's FileHandle
					; (only valid if FLFF_KEEPFH was set)
	STRUCT	ffil_FIB,fib_SIZEOF	; the file's FileInfoBlock
	LABEL	ffil_SIZEOF


** FAMELoadFile() flags **

	BITDEF	FLF,KEEPFH,0		; don't close the file


** Library base **

;  Fields declared as private ARE private. Do not use 'em. They contain
;  some internal data structures which don't contain anything you may
;  use to hack the BBS. It isn't useful for you anyway. Some BBS
;  functions give you informations from these data fields, if your
;  program may have use of it. So do not ever read these fields.
;  Also, *never* write anything to the library base.

 STRUCTURE FileIDBase,LIB_SIZE

   * LIBRARY PRIVATE *

   UBYTE   FAME_Flags		; see also:
   UBYTE   FAME_pad		; "sample.library.asm", documented in the
   BPTR    FAME_SegList		; Amiga ROM Kernel Reference Manual: Libraries

   * PUBLIC FIELDS *		; may be READ from your program

   APTR    FAME_DOSBase		; dos.library base V37
   APTR    FAME_SysBase		; exec base for faster access
   APTR    FAME_LocaleBase	; locale.library V38 base address

   * LIBRARY PRIVATE *

   LONG    FAME_Private2
   STRUCT  FAME_Private3,50
   WORD    FAME_Private4
   STRUCT  FAME_Private5,40

   * PUBLIC FIELDS *

   APTR    FAME_TimerBase	; timer.device library base
   APTR    FAME_IconBase	; icon.library V37 base address

   LABEL   FAMEBase_SIZEOF


 ENDC	; LIBRARIES_FAME_I
