2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: autoinit library - support function for showing errors to the user
9 #include <proto/exec.h>
10 #include <proto/dos.h>
11 #include <proto/intuition.h>
12 #include <aros/autoinit.h>
16 int __forceerrorrequester
__attribute__((weak
)) = 0;
18 void __showerror(char *format
, const IPTR
*args
)
20 struct IntuitionBase
*IntuitionBase
;
21 struct DosLibrary
*DOSBase
= NULL
;
22 const char *name
= FindTask(NULL
)->tc_Node
.ln_Name
;
26 !__forceerrorrequester
&&
27 (DOSBase
= (struct DosLibrary
*)OpenLibrary("dos.library", 0)) != NULL
&&
38 VPrintf(format
, args
);
45 if ((IntuitionBase
= (struct IntuitionBase
*)OpenLibrary("intuition.library", 0)))
47 struct EasyStruct es
=
49 sizeof(struct EasyStruct
),
56 EasyRequestArgs(NULL
, &es
, NULL
, args
);
58 CloseLibrary((struct Library
*)IntuitionBase
);
62 CloseLibrary((struct Library
*)DOSBase
);