/****************************************************************************
 *
 *	Copyright (C) 1984-2006 Micro Focus (IP) Limited.
 *
 *	All rights reserved.  Unpublished, all rights reserved under
 *	copyright law and international treaty.  Use of a copyright notice
 *	is precautionary only and does not imply publication or disclosure.
 *	This software contains confidential information and trade secrets of
 *	Micro Focus International Ltd, and no part of this program or
 *	publication may be reproduced, transmitted, transcribed, stored in
 *	a retrieval system, or translated into any language or computer
 *	language, in any form or by any means, electronic, mechanical,
 *	magnetic, optical, chemical, manual or otherwise, without the prior
 *	written permission of:
 *
 *	Micro Focus International Ltd,
 *	The Lawn, Old Bath Road, Newbury, Berkshire, RG14 1QN, UK.
 *	(01635) 32646
 *
 *	RESTRICTED RIGHTS LEGEND
 *	Use, duplication, or disclosure by the Government is subject to
 *	restrictions as set forth in subparagraph (c)(1)(ii) of the Rights
 *	in Technical Data and Computer Software clause at DFARS 52.227-7013
 *	or subparagraphs (c)(1) and (2) of Commercial Computer Software -
 *	Restricted Rights at 48 CFR 52.227-19, as applicable.  Contact
 *	Micro Focus International Ltd, 701 East Middlefield Road,
 *	Mountain View, California 94043, USA.
 *
 *	Genesis Run Time System (Studio/Server 5.0 Freeze)
 *
 *	@(#)cobtypes.h	11.1
 *
 *	Last Modified on 05/01/28 at 10:06:19
 *
 ****************************************************************************/

/** Start of source module cobtypes.h **/

#ifndef	_COBTYPES_H
#define	_COBTYPES_H

/************************************************************************
 * This file, which is supplied in $COBDIR/include, defines the types used
 * by the documented cob prefix routines.
 *
 * NOTE: Defines that you might have to set when using this include
 *       file are:
 *         CBL_UNSIGNED_CHAR_T <= The system C compiler creates unsigned
 *                                char data items by default 
 *         CBL_NO_INTTYPES_H   <= On some systems the file <inttypes.h>
 *                                might not exist.
 *         CBL_LONGLONG_T      <= If your system doesn't support <inttypes.h>
 *                                then set this to the 64 bit integer type 
 *                                supported on your system.  If undefined
 *                                a common default will be used.
 *         CHAR_IS_UNSIGNED    <= This define is included for compatibility
 *                                with Server Express 1.1 and should not
 *                                be used, instead use CBL_UNSIGNED_CHAR_T
 *
 ***********************************************************************/

#ifdef	__cplusplus
extern "C" {
#endif

#include <sys/types.h>

#if   defined(CBL_UNSIGNED_CHAR_T) || defined(CHAR_IS_UNSIGNED)
typedef	char			cobchar_t; /* Equivalent to cbl_x1_t */
#else
typedef	unsigned char		cobchar_t; /* Equivalent to cbl_x1_t */
#endif

#if !defined(CBL_NO_INTTYPES_H) && (defined(__USLC__) || (defined(_MSC_VER) && !defined(RTS_VERSION)))
# define CBL_NO_INTTYPES_H		/* Unixware */
#endif

#ifndef	CBL_NO_INTTYPES_H

# include <inttypes.h>
typedef uint8_t			cobuns8_t;
typedef uint16_t		cobuns16_t;
typedef uint32_t		cobuns32_t;
typedef uint64_t		cobuns64_t;

typedef int8_t			cobs8_t;
typedef int16_t			cobs16_t;
typedef int32_t			cobs32_t;
typedef int64_t			cobs64_t;

typedef ssize_t                 cobrtncode_t;

#else

#ifndef CBL_LONGLONG_T 
# ifdef _LP64
#  define CBL_LONGLONG_T        long
# elif defined(_MSC_VER)
#  define CBL_LONGLONG_T        __int64
# else
#  define CBL_LONGLONG_T        long long
# endif
#endif

typedef unsigned char		cobuns8_t;
typedef unsigned short		cobuns16_t;
typedef unsigned int		cobuns32_t;
typedef unsigned CBL_LONGLONG_T	cobuns64_t;

typedef          char		cobs8_t;
typedef          short		cobs16_t;
typedef          int		cobs32_t;
typedef          CBL_LONGLONG_T	cobs64_t;

typedef          long           cobrtncode_t;
#endif

typedef int			(*PFI)(); /* pointer to func returning int */
typedef cobrtncode_t		(*PFR)(); /* ptr to func ret'ing cobrtncode_t */

#ifdef	__cplusplus
}
#endif

#endif	/* _COBTYPES_H */

/** End of source module cobtypes.h **/
