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

View File

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

View File

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

View File

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

View File

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

View File

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