Added enum for cc65 exit codes. replaced stdlib exit code names constants in libsrc with cc65 exit code named constants
This commit is contained in:
@@ -36,6 +36,12 @@
|
|||||||
#ifndef _CC65_H
|
#ifndef _CC65_H
|
||||||
#define _CC65_H
|
#define _CC65_H
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CC65_EXIT_SUCCESS,
|
||||||
|
CC65_EXIT_FAILURE,
|
||||||
|
CC65_EXIT_AFAILED,
|
||||||
|
CC65_EXIT_ABORT
|
||||||
|
} cc65_exit_codes_t;
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -17,5 +17,5 @@ void __fastcall__ _afailed (char* file, unsigned line)
|
|||||||
{
|
{
|
||||||
raise (SIGABRT);
|
raise (SIGABRT);
|
||||||
fprintf (stderr, "ASSERTION FAILED IN %s(%u)\n", file, line);
|
fprintf (stderr, "ASSERTION FAILED IN %s(%u)\n", file, line);
|
||||||
exit (2);
|
exit (CC65_EXIT_AFAILED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ void abort (void)
|
|||||||
{
|
{
|
||||||
raise (SIGABRT);
|
raise (SIGABRT);
|
||||||
fputs ("ABNORMAL PROGRAM TERMINATION\n", stderr);
|
fputs ("ABNORMAL PROGRAM TERMINATION\n", stderr);
|
||||||
exit (3);
|
exit (CC65_EXIT_ABORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1580,7 +1580,7 @@ void DbgEntry (void)
|
|||||||
case 'q':
|
case 'q':
|
||||||
/* Quit program */
|
/* Quit program */
|
||||||
clrscr ();
|
clrscr ();
|
||||||
exit (1);
|
exit (CC65_EXIT_FAILURE);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <dio.h>
|
#include <dio.h>
|
||||||
|
#include <cc65.h>
|
||||||
|
|
||||||
unsigned char info_signature[3] = {3, 21, 63 | 0x80};
|
unsigned char info_signature[3] = {3, 21, 63 | 0x80};
|
||||||
|
|
||||||
@@ -69,7 +70,7 @@ static void err_exit(char *operation, unsigned char oserr)
|
|||||||
operation);
|
operation);
|
||||||
}
|
}
|
||||||
getchar();
|
getchar();
|
||||||
exit(EXIT_FAILURE);
|
exit(CC65_EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -342,5 +343,5 @@ int main(int argc, char* argv[])
|
|||||||
printf("Convert to '%.*s' successful", dir_entry->storage_length.name_length,
|
printf("Convert to '%.*s' successful", dir_entry->storage_length.name_length,
|
||||||
dir_entry->file_name);
|
dir_entry->file_name);
|
||||||
getchar();
|
getchar();
|
||||||
return EXIT_SUCCESS;
|
return CC65_EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,5 +28,5 @@ void _afailed (char* file, unsigned line)
|
|||||||
|
|
||||||
DlgBoxOk(CBOLDON "ASSERTION FAILED", "PROGRAM TERMINATED" CPLAINTEXT);
|
DlgBoxOk(CBOLDON "ASSERTION FAILED", "PROGRAM TERMINATED" CPLAINTEXT);
|
||||||
|
|
||||||
exit (2);
|
exit (CC65_EXIT_AFAILED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <geos.h>
|
#include <geos.h>
|
||||||
|
#include <cc65.h>
|
||||||
|
|
||||||
void abort (void)
|
void abort (void)
|
||||||
{
|
{
|
||||||
ExitTurbo();
|
ExitTurbo();
|
||||||
DlgBoxOk(CBOLDON "ABNORMAL PROGRAM", "TERMINATION." CPLAINTEXT);
|
DlgBoxOk(CBOLDON "ABNORMAL PROGRAM", "TERMINATION." CPLAINTEXT);
|
||||||
exit(3);
|
exit(CC65_EXIT_ABORT);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user