Corrections to SVN properties.
[AROS.git] / workbench / classes / datatypes / degas / aros_datatype.c
blob04da2a30e810e551f2bf0f5fbf992bb9d70e4b73
1 /*
3 Author: Neil Cafferkey
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,
19 MA 02111-1307, USA.
24 #include <exec/types.h>
25 #include <exec/resident.h>
26 #include <aros/libcall.h>
27 #include "initializers.h"
29 #include "datatype.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)
43 AROS_LIBFUNC_INIT
45 return LibInit(lib_base, seg_list, base);
47 AROS_LIBFUNC_EXIT
52 AROS_LH1(struct DTBase *, LibOpen,
53 AROS_LHA(ULONG, version, D0),
54 struct DTBase *, base, 1, DT)
56 AROS_LIBFUNC_INIT
58 return LibOpen(version, base);
60 AROS_LIBFUNC_EXIT
65 AROS_LH0(APTR, LibClose,
66 struct DTBase *, base, 2, DT)
68 AROS_LIBFUNC_INIT
70 return LibClose(base);
72 AROS_LIBFUNC_EXIT
77 AROS_LH0(APTR, LibExpunge,
78 struct DTBase *, base, 3, DT)
80 AROS_LIBFUNC_INIT
82 return LibExpunge(base);
84 AROS_LIBFUNC_EXIT
89 AROS_LH0(APTR, LibReserved,
90 struct DTBase *, base, 4, DT)
92 AROS_LIBFUNC_INIT
94 return LibReserved(base);
96 AROS_LIBFUNC_EXIT
101 AROS_LH0(struct IClass *, ObtainClass,
102 struct DTBase *, base, 5, DT)
104 AROS_LIBFUNC_INIT
106 return ObtainClass(base);
108 AROS_LIBFUNC_EXIT
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),
119 (APTR)-1
123 static const struct
125 SMALLINITBYTEDEF(type);
126 SMALLINITPINTDEF(name);
127 SMALLINITBYTEDEF(flags);
128 SMALLINITWORDDEF(version);
129 SMALLINITWORDDEF(revision);
130 SMALLINITPINTDEF(id_string);
131 INITENDDEF;
133 init_data =
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),
141 INITEND
145 static const APTR init_table[] =
147 (APTR)sizeof(struct DTBase),
148 (APTR)vectors,
149 (APTR)&init_data,
150 (APTR)AROS_SLIB_ENTRY(LibInit, DT, 0),
154 const struct Resident aros_rom_tag =
156 RTC_MATCHWORD,
157 (struct Resident *)&aros_rom_tag,
158 (APTR)(&rom_tag + 1),
159 RTF_AUTOINIT,
160 VERSION,
161 NT_LIBRARY,
163 (TEXT *)datatype_name,
164 (TEXT *)version_string,
165 (APTR)init_table