Removed additional exit constants definitions from cc65.h to stdlih.h. Guarded the definitions by #ifdef. Removed cc65.h includes from abort and assert implementations.
This commit is contained in:
@@ -37,14 +37,6 @@
|
|||||||
#define _CC65_H
|
#define _CC65_H
|
||||||
|
|
||||||
|
|
||||||
/* Those cc65 exit constants definitions are in addition the the
|
|
||||||
constants defined in stdlib.h. The values 0 and 1 are still
|
|
||||||
reserved for EXIT_SUCCESS and EXIT_FAILURE and should not be
|
|
||||||
redefined */
|
|
||||||
#define EXIT_ASSERT 2
|
|
||||||
#define EXIT_ABORT 3
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -48,6 +48,17 @@ typedef unsigned size_t;
|
|||||||
#define EXIT_SUCCESS 0
|
#define EXIT_SUCCESS 0
|
||||||
#define EXIT_FAILURE 1
|
#define EXIT_FAILURE 1
|
||||||
|
|
||||||
|
#if __CC65_STD__ == __CC65_STD_CC65__
|
||||||
|
|
||||||
|
/* Those non-standard cc65 exit constants definitions are in addition
|
||||||
|
to the EXIT_SUCCESS and EXIT_FAILURE constants, which should not be
|
||||||
|
redefined */
|
||||||
|
#define EXIT_ASSERT 2
|
||||||
|
#define EXIT_ABORT 3
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Return type of the div function */
|
/* Return type of the div function */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int rem;
|
int rem;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <cc65.h>
|
|
||||||
|
|
||||||
|
|
||||||
void __fastcall__ _afailed (char* file, unsigned line)
|
void __fastcall__ _afailed (char* file, unsigned line)
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <cc65.h>
|
|
||||||
|
|
||||||
|
|
||||||
void abort (void)
|
void abort (void)
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <geos.h>
|
#include <geos.h>
|
||||||
#include <cc65.h>
|
|
||||||
|
|
||||||
void _afailed (char* file, unsigned line)
|
void _afailed (char* file, unsigned line)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <geos.h>
|
#include <geos.h>
|
||||||
#include <cc65.h>
|
|
||||||
|
|
||||||
void abort (void)
|
void abort (void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user