Merge pull request #2113 from polluks2/patch-9

Unified NULL #2110
This commit is contained in:
Bob Andrews
2023-05-19 16:06:46 +02:00
committed by GitHub
8 changed files with 20 additions and 28 deletions

View File

@@ -4,13 +4,15 @@
reassembled by Maciej 'YTM/Elysium' Witkowiak reassembled by Maciej 'YTM/Elysium' Witkowiak
*/ */
/* Here are constants which didn't fit into any other cathegory... */ /* Here are constants which didn't fit into any other category... */
#ifndef _GCONST_H #ifndef _GCONST_H
#define _GCONST_H #define _GCONST_H
#define NULL 0 #ifndef NULL
#define FALSE NULL #define NULL ((void *) 0)
#endif
#define FALSE 0
#define TRUE 0xff #define TRUE 0xff
#define MOUSE_SPRNUM 0 #define MOUSE_SPRNUM 0
#define DISK_DRV_LGH 0x0d80 #define DISK_DRV_LGH 0x0d80

View File

@@ -39,9 +39,8 @@
/* NULL pointer */ /* NULL pointer */
#ifndef _HAVE_NULL #ifndef NULL
#define NULL 0 #define NULL ((void *) 0)
#define _HAVE_NULL
#endif #endif
/* Locale information constants */ /* Locale information constants */
@@ -82,6 +81,3 @@ char* __fastcall__ setlocale (int category, const char* locale);
/* End of locale.h */ /* End of locale.h */
#endif #endif

View File

@@ -53,9 +53,8 @@ typedef unsigned size_t;
#endif #endif
/* NULL pointer */ /* NULL pointer */
#ifndef _HAVE_NULL #ifndef NULL
#define NULL ((void *) 0) #define NULL ((void *) 0)
#define _HAVE_NULL
#endif #endif
/* offsetof macro */ /* offsetof macro */
@@ -65,6 +64,3 @@ typedef unsigned size_t;
/* End of stddef.h */ /* End of stddef.h */
#endif #endif

View File

@@ -38,9 +38,8 @@
/* NULL pointer */ /* NULL pointer */
#ifndef _HAVE_NULL #ifndef NULL
#define NULL 0 #define NULL ((void *) 0)
#define _HAVE_NULL
#endif #endif
/* size_t is needed */ /* size_t is needed */

View File

@@ -44,6 +44,11 @@ typedef unsigned size_t;
#define _HAVE_size_t #define _HAVE_size_t
#endif #endif
/* NULL pointer */
#ifndef NULL
#define NULL ((void *) 0)
#endif
/* Standard exit codes */ /* Standard exit codes */
#define EXIT_SUCCESS 0 #define EXIT_SUCCESS 0
#define EXIT_FAILURE 1 #define EXIT_FAILURE 1
@@ -167,6 +172,3 @@ int __fastcall__ putenv (char* s);
/* End of stdlib.h */ /* End of stdlib.h */
#endif #endif

View File

@@ -37,9 +37,8 @@
#define _STRING_H #define _STRING_H
/* NULL pointer */ /* NULL pointer */
#ifndef _HAVE_NULL #ifndef NULL
#define NULL 0 #define NULL ((void *) 0)
#define _HAVE_NULL
#endif #endif
/* size_t is needed */ /* size_t is needed */

View File

@@ -39,9 +39,8 @@
/* NULL pointer */ /* NULL pointer */
#ifndef _HAVE_NULL #ifndef NULL
#define NULL 0 #define NULL ((void *) 0)
#define _HAVE_NULL
#endif #endif
/* size_t is needed */ /* size_t is needed */

View File

@@ -22,7 +22,6 @@ long long0 = 0;
long long1 = 0; long long1 = 0;
unsigned long ulong0 = 0; unsigned long ulong0 = 0;
unsigned long ulong1 = 0; unsigned long ulong1 = 0;
#define NULL 0
char *cP0=NULL; char *cP0=NULL;
char *cP1=NULL; char *cP1=NULL;
int *iP0=NULL; int *iP0=NULL;