2 Copyright 1995-2011, The AROS Development Team. All rights reserved.
9 #include <proto/intuition.h>
10 #include <aros/debug.h>
14 #define CATCOMP_NUMBERS
16 #include "dos_intern.h"
19 /*****i***********************************************************************
22 #include <proto/dos.h>
24 AROS_LH3(LONG
, DisplayError
,
27 AROS_LHA(CONST_STRPTR
, formatStr
, A0
),
28 AROS_LHA(ULONG
, flags
, D0
),
29 AROS_LHA(APTR
, args
, A1
),
32 struct DosLibrary
*, DOSBase
, 81, Dos
)
35 Displays an error message to and gets response from a user.
38 formatStr -- printf-style formatted string
39 flags -- arguments to EasyRequestArgs()
40 args -- arguments to 'formatStr'
46 This is a PRIVATE dos function.
55 The purpose of this function is to put up a requester when an error
56 has occurred that is connected to the filesystem.
58 *****************************************************************************/
62 struct IntuitionBase
*IntuitionBase
= NULL
;
63 struct Process
*me
= (struct Process
*)FindTask(NULL
);
64 struct Window
*window
; /* The window to put the requester in */
66 char *gtPtr
= (char *)gadTexts
;
70 struct EasyStruct es
=
72 sizeof(struct EasyStruct
),
74 DosGetString(MSG_STRING_REQUESTTITLE
), /* "System Requester" */
76 gadTexts
/* "Retry|Cancel" */
79 ASSERT_VALID_PROCESS(me
);
80 window
= (struct Window
*)me
->pr_WindowPtr
;
82 /* Supress requesters? */
83 if ((IPTR
)window
== (IPTR
)-1L)
88 if (DOSBase
->dl_IntuitionBase
== NULL
)
90 DOSBase
->dl_IntuitionBase
= OpenLibrary("intuition.library", 37L);
93 if (DOSBase
->dl_IntuitionBase
== NULL
)
99 IntuitionBase
= (struct IntuitionBase
*)DOSBase
->dl_IntuitionBase
;
102 /* Create localised gadget texts */
103 strcpy(gtPtr
, DosGetString(MSG_STRING_RETRY
));
105 strcat(gtPtr
, DosGetString(MSG_STRING_CANCEL
));
107 res
= EasyRequestArgs(window
, &es
, &idcmp
, args
);