home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 45
/
Amiga_Dream_45.iso
/
Amiga
/
Magazine
/
Dossier-LaTeX
/
AmiWeb2C.lha
/
source
/
web2c-6.1
/
web2c
/
lib
/
uexit.ch
< prev
next >
Wrap
Text File
|
1995-03-23
|
687b
|
40 lines
Changes for UEXIT.C by Andreas Scherer, March 23, 1995.
@x l.5
#include "config.h"
@y
#include "andyconfig.h"
@z
@x l.8
uexit (unix_code)
int unix_code;
{
int final_code;
if (unix_code == 0)
final_code = EXIT_SUCCESS;
else if (unix_code == 1)
final_code = !EXIT_SUCCESS;
else
final_code = unix_code;
exit (final_code);
}
@y
#define RETURN_OK 0
#define RETURN_WARN 5
#define RETURN_ERROR 10
#define RETURN_FAIL 20
uexit (int history)
{
switch(history) {
case warning_issued: exit(RETURN_WARN); break;
case error_message_issued: exit(RETURN_ERROR); break;
case fatal_error_stop: exit(RETURN_FAIL); break;
default: exit(RETURN_OK);
}
}
@z