clean up defines

This commit is contained in:
llsth 2015-04-07 21:18:39 +02:00
parent bcf936f4a8
commit 00acfc11e7
6 changed files with 54 additions and 38 deletions

View File

@ -34,71 +34,82 @@
*/
/******************************************************************************/
#include "clib.h"
#ifdef mc68000
#define ACPU "68000+"
# define TXTCPU "68000+"
#endif
#ifdef mc68020
#define ACPU "68020"
# ifdef TXTCPU
# undef TXTCPU
# endif
# define TXTCPU "68020"
#endif
#ifdef mc68030
#define ACPU "68030"
# ifdef TXTCPU
# undef TXTCPU
# endif
# define TXTCPU "68030"
#endif
#ifdef mc68040
#define ACPU "68040"
# ifdef TXTCPU
# undef TXTCPU
# endif
# define TXTCPU "68040"
#endif
#ifdef mc68060
#define ACPU "68060"
# ifdef TXTCPU
# undef TXTCPU
# endif
# define TXTCPU "68060"
#endif
/******************************************************************************/
#if defined(INTELCPU) || defined(i386) || defined(i486) || \
defined(intel) || defined(x86) || defined(i86pc) || \
defined(__i386__) || defined(_M_IX86)
#ifdef ACPU
#undef ACPU
#endif
#define ACPU "i386"
#if defined(INTELCPU) || defined(i386) || defined(i486) || \
defined(intel) || defined(x86) || defined(i86pc) || \
defined(__i386__) || defined(_M_IX86)
# ifdef TXTCPU
# undef TXTCPU
# endif
# define TXTCPU "i386"
#endif
#ifdef __powerpc__
#define ACPU "PowerPC"
# define TXTCPU "PowerPC"
#endif
#if defined(__x86_64__)
#define ACPU "amd64"
# define TXTCPU "amd64"
#endif
#ifndef ACPU
#ifndef TXTCPU
#error what cpu is this ?!
//#define ACPU EMPTYSTRING
//#define TXTCPU EMPTYSTRING
#endif
/******************************************************************************/
#if defined(AROS)
#define ASYSNAME SPACE "AROS"
# define TXTSYSNAME SPACE "AROS"
#endif
#if defined(MORPHOS)
#define ASYSNAME SPACE "MorphOS"
# define TXTSYSNAME SPACE "MorphOS"
#endif
#if defined(AOS3) || defined(AOS4)
#define ASYSNAME SPACE "AmigaOS"
# define TXTSYSNAME SPACE "AmigaOS"
#endif
#ifndef ASYSNAME
#define ASYSNAME EMPTYSTRING
#ifndef TXTSYSNAME
# define TXTSYSNAME EMPTYSTRING
#endif
/******************************************************************************/
#ifdef WITHTEST
#define ATEST SPACE "TEST"
# define TXTTEST SPACE "TEST"
#else
#define ATEST EMPTYSTRING
# define TXTTEST EMPTYSTRING
#endif
/******************************************************************************/
#if defined(ACPU) && defined(__HAVE_68881__)
#define AFPU SPACE "FPU"
#if defined(TXTCPU) && defined(__HAVE_68881__)
# define TXTFPU SPACE "FPU"
#else
#define AFPU EMPTYSTRING
# define TXTFPU EMPTYSTRING
#endif
/******************************************************************************/
#define ARCH ACPU AFPU ASYSNAME ATEST
#define ATITLE "amath version 1.6.0"
#define ACOPYRIGHT "(c) 2015 Carsten Sonne Larsen"
#define ASTARTMSG ATITLE SPACE ARCH SPACE ACOPYRIGHT
#define ADOSVERSION "\0$VER: amath 1.60 (01-04-2015)"
#define TXTTITLE "amath version 1.6.0"
#define TXTDOSVERSION "\0$VER: amath 1.60 (01-04-2015)"
#define TXTCOPYRIGHT "(c) 2015 Carsten Sonne Larsen"
#define TXTARCH TXTCPU TXTFPU TXTSYSNAME TXTTEST
#define TXTSTARTMSG TXTTITLE SPACE TXTARCH SPACE TXTCOPYRIGHT
/******************************************************************************/
#endif

View File

@ -43,7 +43,7 @@ static const texttag texttags[] = {
{ "#COLOR03#", COLOR03},
{ "#SPACE#", SPACE},
{ "#NEWLINE#", NEWLINE},
{ "#STARTMSG#", ASTARTMSG}
{ "#STARTMSG#", TXTSTARTMSG}
};
#endif

View File

@ -76,10 +76,10 @@ char* VersionStatement::Execute()
output->Empty();
output->EnsureSize(
StrLen(BOLD) +
StrLen(ASTARTMSG) +
StrLen(TXTSTARTMSG) +
StrLen(NEWLINE));
output->Append(BOLD);
output->Append(ASTARTMSG);
output->Append(TXTSTARTMSG);
output->Append(NEWLINE);
return output->GetString();

View File

@ -49,7 +49,7 @@
#include "system/graph_amiga.h"
class Program *Program;
const char *vers = ADOSVERSION;
const char *vers = TXTDOSVERSION;
#ifndef AMIGA
#include <new>

View File

@ -101,7 +101,7 @@ void AmigaWindow::Create()
WFLG_ACTIVATE |
WFLG_SMART_REFRESH,
NULL, NULL, // user gadgets, user checkmark
(UBYTE*) ATITLE, // title
(UBYTE*) TXTTITLE, // title
NULL, NULL, // window screen, super bitmap
400, 75, // min width, height
1600, 1050, // max width, height

View File

@ -58,6 +58,9 @@
# ifndef AMIGA
# define AMIGA
# endif
# ifndef ANSICONSOLE
# define ANSICONSOLE
# endif
# include <exec/io.h>
# include <exec/types.h>
# include <exec/memory.h>
@ -70,6 +73,9 @@
# ifndef UNIX
# define UNIX
# endif
# ifndef ANSICONSOLE
# define ANSICONSOLE
# endif
# include <unistd.h>
# include <dirent.h>
# include <termios.h>
@ -87,7 +93,6 @@
# include <stdint.h>
# include <sys/types.h>
#endif
#ifdef MORPHOS
# include <stdint.h>
# include <sys/types.h>