	SECTION AutoDocLib,CODE

 NOLIST
 INCLUDE "exec/types.i"
 INCLUDE "exec/libraries.i"
 INCLUDE "exec/lists.i"
 INCLUDE "exec/alerts.i"
 INCLUDE "exec/initializers.i"
 INCLUDE "exec/resident.i"
 INCLUDE "exec/memory.i"
 INCLUDE "libraries/dos.i"
 LIST

;---- XREF all the exec routines we need
 XREF _LVOFreeMem
 XREF _LVORemove

; here we define the library's base structure
	STRUCTURE Base,LIB_SIZE
	UBYTE base_Flags
	UBYTE base_pad
	; now properly aligned
	ULONG base_SysLib
	ULONG base_SegList
	LABEL base_SIZEOF

; the first executable location sets an error and returns in case someone
; tries to load the library as a load moudle instead of OpenLibrary()ing it
	moveq.l #-1,d0
	rts

; the romtag structure for this library
initDDescrip:
		;STRUCTURE RT,0
	dc.w RTC_MATCHWORD	; UWORD RT_MATCHWORD
	dc.l initDDescrip	; APTR  RT_MATCHTAG
	dc.l EndCode		; APTR  RT_ENDSKIP
	dc.b RTF_AUTOINIT	; UBYTE RT_FLAGS
	dc.b VERSION		; UBYTE RT_VERSION
	dc.b NT_LIBRARY		; UBYTE RT_TYPE
	dc.b 0			; BYTE  RT_PRI
	dc.l AutoDocName	; APTR  RT_NAME
	dc.l idString		; APTR  RT_IDSTRING
	dc.l Init		; APTR  RT_INIT

; the name of the library
AutoDocName: dc.b "AutoDocIndex.library",0

; major version number
VERSION: EQU 1

; particular revision number
REVISION: EQU 0

; text identifier tag for the library
	ds.w 0	; word align this as some prgs (XOper) want it so...
idString: dc.b 'AutoDocIndex.library v1.0 (18 Dec 1989), ',$a9,' 1989 '
          dc.b 'by Christopher A. Wichura',13,10
          dc.b 'Index built on 
