2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
7 * -date------ -name------------------- -description-----------------------------
8 * 02-jan-2008 [Tomasz Wiszkowski] added disk check option for broken disks
9 * 04-jan-2008 [Tomasz Wiszkowski] corrected tabulation
12 #include <proto/intuition.h>
13 #include <aros/debug.h>
14 #include <exec/rawfmt.h>
15 #include <intuition/intuition.h>
19 #include "errstrings.h"
20 #include "baseredef.h"
24 * displays requester on screen or puts text to the debug buffer
26 LONG
showPtrArgsText(struct AFSBase
*afsbase
, const char *string
, enum showReqType type
, RAWARG args
)
38 struct EasyStruct es
={sizeof (struct EasyStruct
),0,"AFFS",0,options
[type
]};
39 struct IntuitionBase
*IntuitionBase
;
41 IntuitionBase
= (APTR
)OpenLibrary("intuition.library", 39);
42 if (IntuitionBase
!= NULL
)
44 es
.es_TextFormat
=string
;
46 if (IntuitionBase
->FirstScreen
!= NULL
)
48 answer
= EasyRequestArgs(NULL
,&es
,NULL
,args
);
50 CloseLibrary((struct Library
*)IntuitionBase
);
54 /* We use serial for error printing when gfx.hidd is not initialized */
55 RawDoFmt(string
, args
, RAWFMTFUNC_SERIAL
, NULL
);
62 LONG
showError(struct AFSBase
*afsbase
, ULONG error
, ...)
66 if (error
== ERR_ALREADY_PRINTED
)
68 else if (error
>= ERR_UNKNOWN
)
69 ret
= showPtrArgsText(afsbase
, texts
[ERR_UNKNOWN
].text
, texts
[ERR_UNKNOWN
].type
, (RAWARG
)&error
);
71 AROS_SLOWSTACKFORMAT_PRE_USING(error
, texts
[error
].text
);
72 ret
= showPtrArgsText(afsbase
, texts
[error
].text
, texts
[error
].type
, AROS_SLOWSTACKFORMAT_ARG(error
));
73 AROS_SLOWSTACKFORMAT_POST(error
);
80 /* vim: set ts=3 noet fdm=marker fmr={,}: */