revert between 56095 -> 55830 in arch
[AROS.git] / workbench / system / Workbook / workbook_init.c
blobd3468515b5337bfb5601a3d8112051eec0811827
1 /*
2 Copyright © 2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Workbook Resource
6 Lang: english
7 */
9 #define DEBUG 0
10 #include <aros/debug.h>
11 #include <aros/symbolsets.h>
13 #include <exec/resident.h>
14 #include <proto/exec.h>
15 #include <proto/dos.h>
17 #include LC_LIBDEFS_FILE
19 extern void WorkbookMain(void);
21 #undef DOSBase
22 static int GM_UNIQUENAME(Init)(LIBBASETYPEPTR LIBBASE)
24 APTR DOSBase;
25 BPTR seg;
27 D(bug("[Workbook] Init\n"));
29 DOSBase = OpenLibrary("dos.library", 0);
30 if ( DOSBase == NULL ) {
31 D(bug("[Workbook] What? No dos.library?\n"));
32 return FALSE;
35 seg = CreateSegList(WorkbookMain);
36 if (seg != BNULL) {
37 AddSegment("Workbook", seg, CMD_INTERNAL);
40 CloseLibrary(DOSBase);
42 return TRUE;
45 ADD2INITLIB(GM_UNIQUENAME(Init), 0);