This is implemented for gint only currently; on Vhex, _Exit() is likely just going to be a syscall. For CASIOWIN, this is slightly more difficult, as there is no native exit syscall.pull/2/head
parent
73d6b2eb7c
commit
4b90740d3b
@ -0,0 +1,8 @@
|
||||
#ifndef __BITS_EXIT_H__
|
||||
# define __BITS_EXIT_H__
|
||||
|
||||
/* Exit codes for CASIOWIN add-ins. */
|
||||
#define EXIT_SUCCESS 1
|
||||
#define EXIT_FAILURE 0
|
||||
|
||||
#endif /*__BITS_EXIT_H__*/
|
@ -0,0 +1,8 @@
|
||||
#ifndef __BITS_EXIT_H__
|
||||
# define __BITS_EXIT_H__
|
||||
|
||||
/* Exit codes for CASIOWIN add-ins. */
|
||||
#define EXIT_SUCCESS 1
|
||||
#define EXIT_FAILURE 0
|
||||
|
||||
#endif /*__BITS_EXIT_H__*/
|
@ -0,0 +1,8 @@
|
||||
#ifndef __BITS_EXIT_H__
|
||||
# define __BITS_EXIT_H__
|
||||
|
||||
/* Exit codes for CASIOWIN add-ins. */
|
||||
#define EXIT_SUCCESS 1
|
||||
#define EXIT_FAILURE 0
|
||||
|
||||
#endif /*__BITS_EXIT_H__*/
|
@ -0,0 +1,7 @@
|
||||
#ifndef __BITS_EXIT_H__
|
||||
# define __BITS_EXIT_H__
|
||||
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
#endif /*__BITS_EXIT_H__*/
|
@ -0,0 +1,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <bits/stdlib.h>
|
||||
|
||||
void abort(int rc)
|
||||
{
|
||||
/* TODO: Close BFile handles (essential) */
|
||||
|
||||
raise(SIGABRT);
|
||||
_Exit(EXIT_FAILURE);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
void exit(int rc)
|
||||
{
|
||||
/* TODO: invoke atexit callbacks */
|
||||
/* TODO: exit: Flush all streams */
|
||||
/* TODO: exit: Close all streams */
|
||||
/* TODO: exit: Remove temporary files */
|
||||
|
||||
_Exit(rc);
|
||||
}
|
Loading…
Reference in new issue