#ifndef _NSRTYPDF_ //-*-c++-*-
#define _NSRTYPDF_

//----------------------------------------------------------------------
//  nsrTypdf.h
//   The NSR types for use in NSR source code.
//
//      Unpublished Confidential Information of Hewlett-Packard
//      Company. Do not disclose.  Copyright (c) Hewlett-Packard
//      Company 1995. All rights reserved
// 
// The contents of this software are proprietary and confidential to
// the Hewlett- Packard Company, and are limited in distribution to
// those with a direct need to know.  Individuals having access to
// this software are responsible for maintaining the confidentiality
// of the content and for keeping the software secure when not in use.
// Transfer to any party is strictly forbidden other than as expressly
// permitted in writing by Hewlett-Packard Company.  Unauthorized
// transfer to or possession by any unauthorized party may be a
// criminal offense.
//
//                  RESTRICTED RIGHTS LEGEND
//
//      Use,  duplication,  or disclosure by the U. S. Government is
//      subject to restrictions as set forth in subparagraph (c) (1)
//      (ii) in the Rights in Technical Data and Computer Software
//      clause in DFARS 252.227-7013 or any other successor clause.
//
//                      HEWLETT-PACKARD COMPANY
//                      3000 Hanover St.
//                      Palo Alto, CA  94304 U.S.A.
//
//      Rights for non-DOD U.S. Government Departments and Agencies
//      are as set forth in FAR 52.227-19 (c) (1,2) or any other
//      successor clause.
//
//----------------------------------------------------------------------
// $Source: /projects/HMS/nsr/udfCore/config/nsrTypdf.h,v $
// $Revision: 1.5 $     $Author: hmgr $
// $State: Exp $        $Locker:  $
// $Date: 96/05/20 14:56:51 $

// This file contains the typedef definitions for the NSR system.  The types
// defined are used consistently in the NSR code to aid in porting across
// platforms.

    typedef     unsigned char   UINT8;
    typedef     char            INT8;
    typedef     unsigned short  UINT16;
    typedef     short           INT16;
    typedef     unsigned long   UINT32;
    typedef     long            INT32;
    // NOTE:  We do not have a native data type UINT64; this should
    //   probably be a class.  For now, we specify interfaces with the
    //   correct ISO/IEC 13346 standard of UINT64 where they are needed,
    //   although at present it is (really) implemented as a UINT32.
    typedef     unsigned long   UINT64;
    typedef     long            INT64;
    typedef     UINT8           BYTE;

    enum Boolean {
        False = 0,
        True  = 1
    };

//-----------------------------------------------------------------------
// The following type casts for the NSR system are defined and used
// consistently in the NSR code to aid in porting across platforms.
// defined are used consistently in the NSR code to aid in porting across
// platforms.

// NOTE:  The DOS/WINDOWS environment requires char* be defined as
//   "huge"  (for the huge memory model), while no other platform
//   demands this.

// The following are correct regardless of the platform.
typedef char                            CHAR;

#if defined WINDOWS_PLATFORM

typedef void huge *                     VOID_PTR;
typedef char huge *                     CHAR_PTR;
typedef unsigned char huge *            BYTE_PTR;
// The following are not necessary if we can nest typedefs.
typedef const void huge*                CONST_VOID_PTR;
typedef const char huge*                CONST_CHAR_PTR;
typedef const unsigned char huge*       CONST_BYTE_PTR;
typedef const void huge* const          CONST_VOID_PTR_CONST;
typedef const char huge* const          CONST_CHAR_PTR_CONST;
typedef const unsigned char huge* const CONST_BYTE_PTR_CONST;

#else  // For UNIX_PLATFORM and MAC_PLATFORM.

typedef void*                           VOID_PTR;
typedef char*                           CHAR_PTR;
typedef unsigned char*                  BYTE_PTR;
// The following are not necessary if we can nest typedefs.
typedef const void*                     CONST_VOID_PTR;
typedef const char*                     CONST_CHAR_PTR;
typedef const unsigned char*            CONST_BYTE_PTR;
typedef const void* const               CONST_VOID_PTR_CONST;
typedef const char* const               CONST_CHAR_PTR_CONST;
typedef const unsigned char* const      CONST_BYTE_PTR_CONST;

#endif

#if 0  // Why can't we nest typedef's in gcc????????
// The following are for all platforms, regardless of their char* treatment.
typedef const CHAR_PTR                  CONST_CHAR_PTR;
typedef const BYTE_PTR                  CONST_BYTE_PTR;

//typedef CONST_CHAR_PTR const          CONST_CHAR_PTR_CONST;
//typedef CONST_BYTE_PTR const          CONST_BYTE_PTR_CONST;
#endif


#endif // _NSRTYPDF_
