TNS/E Native Application Conversion Guide

C and C++ Conversion Tasks
TNS/E Native Application Conversion Guide529659-003
3-6
Changing Use of _cc_status for Return Values
The extptr keywords identify 32-bit pointers in external function declarations for TAL.
Native programs support only 32-bit pointers, so this keyword is unnecessary. Delete
the extptr keyword.
Changing Use of _cc_status for Return Values
_cc_status is used for calls to Guardian and TAL procedures that set a condition-
code register instead of returning a value. For TNS C and C++ programs, the CCL,
CCE, and CCG macros examine the results of a function declared with the
_cc_status type specifier. For native C and C++ programs, you must replace these
macros with the _status_lt(x), _status_eq(x), and _status_gt(x) macros.
These new macros are defined in the tal.h header and can be used in TNS and
native programs. These macros are:
For native C and C++:
#define _status_lt(x) ((x) < 0)
#define _status_eq(x) ((x) == 0)
#define _status_gt(x) ((x) > 0)
For TNS C and C++:
#define _status_lt(x) ((x) == 2)
#define _status_eq(x) ((x) == 1)
#define _status_gt(x) ((x) == 0)