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>
18 #include "errstrings.h"
19 #include "baseredef.h"
23 * displays requester on screen or puts text to the debug buffer
25 LONG
showPtrArgsText(struct AFSBase
*afsbase
, const char *string
, enum showReqType type
, IPTR
*args
)
37 struct EasyStruct es
={sizeof (struct EasyStruct
),0,"AFFS",0,options
[type
]};
38 struct IntuitionBase
*IntuitionBase
;
40 IntuitionBase
= (APTR
)OpenLibrary("intuition.library", 39);
41 if (IntuitionBase
!= NULL
)
43 es
.es_TextFormat
=string
;
45 if (IntuitionBase
->FirstScreen
!= NULL
)
47 answer
= EasyRequestArgs(NULL
,&es
,NULL
,args
);
49 CloseLibrary((struct Library
*)IntuitionBase
);
53 /* We use serial for error printing when gfx.hidd is not initialized */
54 RawDoFmt(string
, args
, RAWFMTFUNC_SERIAL
, NULL
);
61 LONG
showErrorArgs(struct AFSBase
*afsbase
, IPTR
*args
)
63 ULONG error
= args
[0];
65 if (error
== ERR_ALREADY_PRINTED
)
67 else if (error
>= ERR_UNKNOWN
)
68 return showPtrArgsText(afsbase
, texts
[ERR_UNKNOWN
].text
, texts
[ERR_UNKNOWN
].type
, args
);
70 return showPtrArgsText(afsbase
, texts
[error
].text
, texts
[error
].type
, &args
[1]);
74 /* vim: set ts=3 noet fdm=marker fmr={,}: */