2 Copyright 1995-2001, The AROS Development Team. All rights reserved.
8 #include <proto/intuition.h>
9 #include "dos_intern.h"
10 #include <aros/debug.h>
13 /*****i***********************************************************************
16 #include <proto/dos.h>
18 AROS_LH3(LONG
, DisplayError
,
21 AROS_LHA(CONST_STRPTR
, formatStr
, A0
),
22 AROS_LHA(ULONG
, flags
, D0
),
23 AROS_LHA(APTR
, args
, A1
),
26 struct DosLibrary
*, DOSBase
, 81, Dos
)
29 Displays an error message to and gets response from a user.
32 formatStr -- printf-style formatted string
33 flags -- arguments to EasyRequestArgs()
34 args -- arguments to 'formatStr'
40 This is a PRIVATE dos function.
49 The purpose of this function is to put up a requester when an error
50 has occurred that is connected to the filesystem.
52 *****************************************************************************/
56 struct IntuitionBase
*IntuitionBase
= NULL
;
57 struct Window
*window
; /* The window to put the requester in */
59 char *gtPtr
= (char *)gadTexts
;
63 struct EasyStruct es
=
65 sizeof(struct EasyStruct
),
67 DosGetString(STRING_REQUESTTITLE
), /* "System Requester" */
69 gadTexts
/* "Retry|Cancel" */
72 window
= (struct Window
*)((struct Process
*)FindTask(NULL
))->pr_WindowPtr
;
74 /* Supress requesters? */
75 if ((IPTR
)window
== (IPTR
)-1L)
80 if (DOSBase
->dl_IntuitionBase
== NULL
)
82 DOSBase
->dl_IntuitionBase
= OpenLibrary("intuition.library", 37L);
85 if (DOSBase
->dl_IntuitionBase
== NULL
)
91 IntuitionBase
= (struct IntuitionBase
*)DOSBase
->dl_IntuitionBase
;
94 /* Create localised gadget texts */
95 strcpy(gtPtr
, DosGetString(STRING_RETRY
));
97 strcat(gtPtr
, DosGetString(STRING_CANCEL
));
99 res
= EasyRequestArgs(window
, &es
, &idcmp
, args
);