4 Copyright (C) 2002-2011 Neil Cafferkey
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24 #include <exec/types.h>
25 #include <exec/resident.h>
26 #include <aros/libcall.h>
27 #include "initializers.h"
31 #include "datatype_protos.h"
33 extern const struct Resident rom_tag
;
34 extern const TEXT datatype_name
[];
35 extern const TEXT version_string
[];
38 AROS_LH2(struct DTBase
*, LibInit
,
39 AROS_LHA(struct DTBase
*, lib_base
, D0
),
40 AROS_LHA(struct DTBase
*, seg_list
, A0
),
41 struct DTBase
*, base
, 0, DT
)
45 return LibInit(lib_base
, seg_list
, base
);
52 AROS_LH1(struct DTBase
*, LibOpen
,
53 AROS_LHA(ULONG
, version
, D0
),
54 struct DTBase
*, base
, 1, DT
)
58 return LibOpen(version
, base
);
65 AROS_LH0(APTR
, LibClose
,
66 struct DTBase
*, base
, 2, DT
)
70 return LibClose(base
);
77 AROS_LH0(APTR
, LibExpunge
,
78 struct DTBase
*, base
, 3, DT
)
82 return LibExpunge(base
);
89 AROS_LH0(APTR
, LibReserved
,
90 struct DTBase
*, base
, 4, DT
)
94 return LibReserved(base
);
101 AROS_LH0(struct IClass
*, ObtainClass
,
102 struct DTBase
*, base
, 5, DT
)
106 return ObtainClass(base
);
112 static const APTR vectors
[] =
114 (APTR
)AROS_SLIB_ENTRY(LibOpen
, DT
, 1),
115 (APTR
)AROS_SLIB_ENTRY(LibClose
, DT
, 2),
116 (APTR
)AROS_SLIB_ENTRY(LibExpunge
, DT
, 3),
117 (APTR
)AROS_SLIB_ENTRY(LibReserved
, DT
, 4),
118 (APTR
)AROS_SLIB_ENTRY(ObtainClass
, DT
, 5),
125 SMALLINITBYTEDEF(type
);
126 SMALLINITPINTDEF(name
);
127 SMALLINITBYTEDEF(flags
);
128 SMALLINITWORDDEF(version
);
129 SMALLINITWORDDEF(revision
);
130 SMALLINITPINTDEF(id_string
);
135 SMALLINITBYTE(OFFSET(Node
, ln_Type
), NT_LIBRARY
),
136 SMALLINITPINT(OFFSET(Node
, ln_Name
), datatype_name
),
137 SMALLINITBYTE(OFFSET(Library
, lib_Flags
), LIBF_SUMUSED
| LIBF_CHANGED
),
138 SMALLINITWORD(OFFSET(Library
, lib_Version
), VERSION
),
139 SMALLINITWORD(OFFSET(Library
, lib_Revision
), REVISION
),
140 SMALLINITPINT(OFFSET(Library
, lib_IdString
), version_string
),
145 static const APTR init_table
[] =
147 (APTR
)sizeof(struct DTBase
),
150 (APTR
)AROS_SLIB_ENTRY(LibInit
, DT
, 0),
154 const struct Resident aros_rom_tag
=
157 (struct Resident
*)&aros_rom_tag
,
158 (APTR
)(&rom_tag
+ 1),
163 (TEXT
*)datatype_name
,
164 (TEXT
*)version_string
,