1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Lost some more code that is not required for AmigaOS 4.x and can be

handled conveniently through conditional compilation.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14802 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-01-13 15:39:39 +00:00
parent c6fcede4ce
commit 23f70d0c53
3 changed files with 56 additions and 55 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_showerror.c,v 1.8 2005-01-09 10:10:41 obarthel Exp $
* $Id: stdlib_showerror.c,v 1.9 2005-01-13 15:39:39 obarthel Exp $
*
* :ts=4
*
@ -102,37 +102,14 @@ __show_error(const char * message)
/* If we can't hope to print the error message, show a requester instead. */
if(__no_standard_io || __WBenchMsg != NULL)
{
if(IntuitionBase->lib_Version >= 37)
UBYTE program_name[256];
struct EasyStruct es;
STRPTR title_string;
/* The following does not make great sense on OS4. */
#if NOT defined(__amigaos4__)
{
UBYTE program_name[256];
struct EasyStruct es;
STRPTR title_string;
if(__WBenchMsg != NULL)
{
title_string = (STRPTR)FilePart(__WBenchMsg->sm_ArgList[0].wa_Name);
}
else
{
if(GetProgramName(program_name,sizeof(program_name)))
title_string = FilePart((STRPTR)program_name);
else
title_string = (STRPTR)"Error";
}
memset(&es,0,sizeof(es));
es.es_StructSize = sizeof(es);
es.es_Title = title_string;
es.es_TextFormat = (STRPTR)message;
es.es_GadgetFormat = (STRPTR)"Sorry";
EasyRequestArgs(NULL,&es,NULL,NULL);
}
else
{
/* The following does not make great sense on OS4. */
#if NOT defined(__amigaos4__)
if(IntuitionBase->lib_Version < 37)
{
static struct TextAttr default_font = { (STRPTR)"topaz.font",8,FS_NORMAL,FPF_ROMFONT|FPF_DESIGNED };
static struct IntuiText sorry_text = {0,1,JAM1,6,3,(struct TextAttr *)NULL,(STRPTR)"Sorry",(struct IntuiText *)NULL};
@ -144,9 +121,32 @@ __show_error(const char * message)
body_text.IText = (STRPTR)message;
AutoRequest(NULL,&body_text,NULL,&sorry_text,0,0,37 + 8 * strlen(message),46);
goto out;
}
#endif /* __amigaos4__ */
}
#endif /* __amigaos4__ */
if(__WBenchMsg != NULL)
{
title_string = (STRPTR)FilePart(__WBenchMsg->sm_ArgList[0].wa_Name);
}
else
{
if(GetProgramName(program_name,sizeof(program_name)))
title_string = FilePart((STRPTR)program_name);
else
title_string = (STRPTR)"Error";
}
memset(&es,0,sizeof(es));
es.es_StructSize = sizeof(es);
es.es_Title = title_string;
es.es_TextFormat = (STRPTR)message;
es.es_GadgetFormat = (STRPTR)"Sorry";
EasyRequestArgs(NULL,&es,NULL,NULL);
}
else
{