From: cuz Date: Wed, 19 Sep 2001 08:46:07 +0000 (+0000) Subject: Check for wrong header file inclusions, add CBM510 stuff X-Git-Tag: V2.12.0~2636 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3dc0fb59bc1b5a80202fd2d03c3e39ebebfc0773;p=cc65 Check for wrong header file inclusions, add CBM510 stuff git-svn-id: svn://svn.cc65.org/cc65/trunk@948 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/include/ace.h b/include/ace.h index 7475b9a56..cb5df1f69 100644 --- a/include/ace.h +++ b/include/ace.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998-2000 Ullrich von Bassewitz */ +/* (C) 1998-2001 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ @@ -38,6 +38,13 @@ +/* Check for errors */ +#if !defined(__ACE__) +# error This module may only be used when compiling for the ACE os! +#endif + + + #ifndef _STDDEF_H #include #endif diff --git a/include/apple2.h b/include/apple2.h index a89052d50..83e3a7483 100644 --- a/include/apple2.h +++ b/include/apple2.h @@ -11,6 +11,13 @@ +/* Check for errors */ +#if !defined(__APPLE2__) +# error This module may only be used when compiling for the Apple ][! +#endif + + + /* Color Defines * Since Apple2 does not support color text these defines are only * used to get the library to compile correctly. They should not be used diff --git a/include/atari.h b/include/atari.h index 64e4b898a..735433e27 100644 --- a/include/atari.h +++ b/include/atari.h @@ -30,9 +30,20 @@ /* */ /*****************************************************************************/ + + #ifndef _ATARI_H #define _ATARI_H + + +/* Check for errors */ +#if !defined(__ATARI__) +# error This module may only be used when compiling for the Atari! +#endif + + + /* Character codes */ #define CH_DEL 0xFE #define CH_ESC 0x1B @@ -96,7 +107,7 @@ #define HUE_GREEN 12 #define HUE_YELLOWGREEN 13 #define HUE_YELLOW 14 -#define HUE_YELLOWRED 15 +#define HUE_YELLOWRED 15 /* Color defines, similar to c64 colors (untested) */ #define COLOR_BLACK _gtia_mkcolor(HUE_GREY,0) diff --git a/include/c128.h b/include/c128.h index 1831f6e9b..0cb08dc78 100644 --- a/include/c128.h +++ b/include/c128.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998-2000 Ullrich von Bassewitz */ +/* (C) 1998-2001 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ @@ -33,16 +33,15 @@ -/* - * c128.h - * - * Ullrich von Bassewitz, 12.08.1998 - */ +#ifndef _C128_H +#define _C128_H -#ifndef _C128_H -#define _C128_H +/* Check for errors */ +#if !defined(__C128__) +# error This module may only be used when compiling for the C128! +#endif diff --git a/include/c64.h b/include/c64.h index e537f948e..05dcde047 100644 --- a/include/c64.h +++ b/include/c64.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998-2000 Ullrich von Bassewitz */ +/* (C) 1998-2001 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ @@ -38,6 +38,13 @@ +/* Check for errors */ +#if !defined(__C64__) +# error This module may only be used when compiling for the C64! +#endif + + + /* Additional key defines */ #define CH_F1 133 #define CH_F2 137 diff --git a/include/cbm.h b/include/cbm.h index fc55b43d1..c2ed28303 100644 --- a/include/cbm.h +++ b/include/cbm.h @@ -38,6 +38,13 @@ +/* Check for errors */ +#if !defined(__CBM__) +# error This module may only be used when compiling for CBM machines! +#endif + + + /* Load the system specific files here, if needed */ #if defined(__C64__) && !defined(_C64_H) # include diff --git a/include/cbm510.h b/include/cbm510.h index 8a4286ee2..d4785d557 100644 --- a/include/cbm510.h +++ b/include/cbm510.h @@ -38,6 +38,13 @@ +/* Check for errors */ +#if !defined(__CBM510__) +# error This module may only be used when compiling for the CBM 510! +#endif + + + /* Additional key defines */ #define CH_F1 224 #define CH_F2 225 @@ -93,7 +100,7 @@ void __fastcall__ pokewsys (unsigned addr, unsigned val); /* Define hardware */ #include <_vic.h> #define VIC (*(struct __vic*)0xD800) - + #include <_sid.h> #define SID (*(struct __sid*)0xDA00) diff --git a/include/cbm610.h b/include/cbm610.h index 865d1452f..416bcfa4b 100644 --- a/include/cbm610.h +++ b/include/cbm610.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998-2000 Ullrich von Bassewitz */ +/* (C) 1998-2001 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ @@ -38,6 +38,13 @@ +/* Check for errors */ +#if !defined(__CBM610__) +# error This module may only be used when compiling for the CBM 610! +#endif + + + /* Additional key defines */ #define CH_F1 224 #define CH_F2 225 diff --git a/include/geos.h b/include/geos.h index 671a4aeb1..f70a88b6e 100644 --- a/include/geos.h +++ b/include/geos.h @@ -12,6 +12,13 @@ +/* Check for errors */ +#if !defined(__GEOS__) +# error This module may only be used when compiling for GEOS! +#endif + + + #ifndef _GCONST_H #include #endif diff --git a/include/joystick.h b/include/joystick.h index 56fa729d2..fd92e2a8f 100644 --- a/include/joystick.h +++ b/include/joystick.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998-2000 Ullrich von Bassewitz */ +/* (C) 1998-2001 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ @@ -39,9 +39,11 @@ /* Define __JOYSTICK__ for systems that support a joystick */ -#if defined(__ATARI__) || defined(__C64__) || defined(__C128__) || defined(__PLUS4__) +#if defined(__ATARI__) || defined(__C64__) || defined(__C128__) || defined(__PLUS4__) || defined(__CBM510__) # define __JOYSTICK__ -#endif +#else +# error The target system does not support a joystick! +# endif /* Argument for the function */ #define JOY_1 0 diff --git a/include/mouse.h b/include/mouse.h index 87004e0ad..92eec80c3 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1999-2000 Ullrich von Bassewitz */ +/* (C) 1999-2001 Ullrich von Bassewitz */ /* Wacholderweg 14 */ /* D-70597 Stuttgart */ /* EMail: uz@musoftware.de */ @@ -39,9 +39,11 @@ /* Define __MOUSE__ for systems that support a mouse */ -#if defined(__ATARI__) || defined(__C64__) || defined(__C128__) +#if defined(__ATARI__) || defined(__C64__) || defined(__C128__) || defined(__CBM510__) # define __MOUSE__ -#endif +#else +# error The target system does not support a mouse! +# endif @@ -55,7 +57,7 @@ #define MOUSE_TRAKBALL 0 #define MOUSE_ST 1 #define MOUSE_AMIGA 2 -#define MOUSE_C64 3 /* 1351 mouse */ +#define MOUSE_CBM1351 3 /* 1351 mouse */ /* Mouse button masks */ #define MOUSE_BTN_LEFT 0x10 diff --git a/include/pet.h b/include/pet.h index 22bc9b9be..684d20f81 100644 --- a/include/pet.h +++ b/include/pet.h @@ -1,8 +1,35 @@ -/* - * pet.h - * - * Ullrich von Bassewitz, 26.11.1998 - */ +/*****************************************************************************/ +/* */ +/* pet.h */ +/* */ +/* PET system specific definitions */ +/* */ +/* */ +/* */ +/* (C) 1998-2001 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@musoftware.de */ +/* */ +/* */ +/* This software is provided 'as-is', without any expressed or implied */ +/* warranty. In no event will the authors be held liable for any damages */ +/* arising from the use of this software. */ +/* */ +/* Permission is granted to anyone to use this software for any purpose, */ +/* including commercial applications, and to alter it and redistribute it */ +/* freely, subject to the following restrictions: */ +/* */ +/* 1. The origin of this software must not be misrepresented; you must not */ +/* claim that you wrote the original software. If you use this software */ +/* in a product, an acknowledgment in the product documentation would be */ +/* appreciated but is not required. */ +/* 2. Altered source versions must be plainly marked as such, and must not */ +/* be misrepresented as being the original software. */ +/* 3. This notice may not be removed or altered from any source */ +/* distribution. */ +/* */ +/*****************************************************************************/ @@ -11,6 +38,13 @@ +/* Check for errors */ +#if !defined(__PET__) +# error This module may only be used when compiling for the CBM PET! +#endif + + + /* Color defines */ #define COLOR_BLACK 0x00 #define COLOR_WHITE 0x01 diff --git a/include/plus4.h b/include/plus4.h index 2a4dd1b6b..d3dd8beda 100644 --- a/include/plus4.h +++ b/include/plus4.h @@ -1,8 +1,35 @@ -/* - * plus4.h - * - * Ullrich von Bassewitz, 12.08.1998 - */ +/*****************************************************************************/ +/* */ +/* plus4.h */ +/* */ +/* Plus/4 system specific definitions */ +/* */ +/* */ +/* */ +/* (C) 1998-2001 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@musoftware.de */ +/* */ +/* */ +/* This software is provided 'as-is', without any expressed or implied */ +/* warranty. In no event will the authors be held liable for any damages */ +/* arising from the use of this software. */ +/* */ +/* Permission is granted to anyone to use this software for any purpose, */ +/* including commercial applications, and to alter it and redistribute it */ +/* freely, subject to the following restrictions: */ +/* */ +/* 1. The origin of this software must not be misrepresented; you must not */ +/* claim that you wrote the original software. If you use this software */ +/* in a product, an acknowledgment in the product documentation would be */ +/* appreciated but is not required. */ +/* 2. Altered source versions must be plainly marked as such, and must not */ +/* be misrepresented as being the original software. */ +/* 3. This notice may not be removed or altered from any source */ +/* distribution. */ +/* */ +/*****************************************************************************/ @@ -11,6 +38,13 @@ +/* Check for errors */ +#if !defined(__PLUS4__) +# error This module may only be used when compiling for the Plus/4! +#endif + + + /* Additional key defines */ #define CH_F1 133 #define CH_F2 137