1 struct ClassLibrary *OpenClass(CONST_STRPTR name, CONST_STRPTR prefix, ULONG version)
3 /* Open named class. Look both in current and images/ directory
6 static struct EasyStruct OpenClassES =
8 sizeof(struct EasyStruct),
11 "Couldn't open %s version %ld or greater",
15 struct ClassLibrary *classbase;
20 if (!(classbase = (struct ClassLibrary *)OpenLibrary(name, version)))
22 /* We can't use AddPart() here because we didn't open dos.library */
24 /* Copy the prefix in the buffer */
25 for (i = 0; buf[i] = prefix[i]; i++);
27 /* Insert trailing character if missing */
32 while (buf[i++] = *name++);
35 classbase = (struct ClassLibrary *)OpenLibrary(buf, version);
40 EasyRequest(NULL, &OpenClassES, NULL, buf, version);