This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/Borland/BCC55/Include/retcode.h

62 lines
2.1 KiB
C

// --retcode.h------------------------------------------------------------------
//
// Copyright (c) Microsoft Corp. 1986-1996. All Rights Reserved.
//
// Header file for return codes and exit codes.
//
// -----------------------------------------------------------------------------
#if !defined(_RETCODE_H)
#pragma option push -b -a8 -pc -A- /*P_O_Push*/
#define _RETCODE_H
//$--_Rc-----------------------------------------------------------------------
// Available return codes.
// ----------------------------------------------------------------------------
typedef enum _rc {
RC_SUCCESS = 0,
RC_ERROR, // general error
RC_PROTOCOL, // protocol error
RC_SYNTAX, // syntax error
RC_EOF, // end of file
RC_IMPLEMENTATION, // not implemented yet
RC_SOFTWARE, // error in software
RC_CONFIG, // configuration error
RC_MEMORY, // memory allocation error
RC_CONTENTION, // contention error
RC_NOTFOUND, // not found
RC_DISKSPACE, // out of disk space
RC_SHUTDOWN, // service shutdown
RC_EXPIRED, // expired
RC_TIMEOUT, // timeout
RC_INVALID_PARAMETER, // invalid parameter
RC_LAST // all errors are less than this
} RC;
//$--_Ec-----------------------------------------------------------------------
// Available exit codes.
// ----------------------------------------------------------------------------
typedef enum _ec {
EC_SUCCESS = 0,
EC_ERROR, // general error
EC_LAST // all errors are less than this
} EC;
// ----------------------------------------------------------------------------
// Macros.
// ----------------------------------------------------------------------------
#define RC_SUCCEEDED(x) \
((x) == RC_SUCCESS)
#define RC_FAILED(x) \
((x) != RC_SUCCESS)
#define EC_SUCCEEDED(x) \
((x) == EC_SUCCESS)
#define EC_FAILED(x) \
((x) != EC_SUCCESS)
#pragma option pop /*P_O_Pop*/
#endif