2 Copyright © 2005-2011, The AROS Development Team. All rights reserved.
6 #define MUIMASTER_YES_INLINE_STDARG
9 #include <aros/debug.h>
11 #include <proto/alib.h>
12 #include <proto/intuition.h>
13 #include <proto/muimaster.h>
14 #include <proto/workbench.h>
15 #include <proto/dos.h>
18 #include <libraries/mui.h>
19 #include <workbench/startup.h>
27 void cleanup(CONST_STRPTR message
)
29 DiskInfo_Deinitialize();
30 Locale_Deinitialize();
34 ShowError(NULL
, NULL
, message
, TRUE
);
43 int main(int argc
, char **argv
)
50 if (!DiskInfo_Initialize()) cleanup(_(MSG_ERROR_CLASSES
));
54 /* start from wanderer only */
55 DiskInfo_Deinitialize();
56 Locale_Deinitialize();
57 PrintFault(ERROR_OBJECT_WRONG_TYPE
, argv
[0]);
61 struct WBStartup
*startup
= (struct WBStartup
*) argv
;
62 if (startup
->sm_NumArgs
> 1)
64 initial
= startup
->sm_ArgList
[1].wa_Lock
;
65 D(bug("[DiskInfo] main, initial: 0x%08lX\n", initial
));
66 application
= (Object
*)DiskInfoObject
,
67 MUIA_DiskInfo_Initial
, (IPTR
) initial
,
68 MUIA_DiskInfo_Aspect
, 0,
71 if (application
!= NULL
)
73 DoMethod(application
, MUIM_Application_Execute
);
74 MUI_DisposeObject(application
);
77 DiskInfo_Deinitialize();
78 Locale_Deinitialize();
79 PrintFault(ERROR_REQUIRED_ARG_MISSING
, argv
[0]);
84 return RETURN_OK
; /* make compiler happy */