/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Types.h -- Basic types
2008-11-23 : Igor Pavlov : Public domain */
#ifndef __7Z_TYPES_H
#define __7Z_TYPES_H
#ifndef _KERNEL
#include <stddef.h>
#endif /* _KERNEL */
#ifdef _WIN32
#include <windows.h>
#endif
#define SZ_OK 0
typedef int SRes;
#ifdef _WIN32
#else
typedef int WRes;
#endif
#ifndef RINOK
#endif
typedef unsigned char Byte;
typedef short Int16;
typedef unsigned short UInt16;
#ifdef _LZMA_UINT32_IS_ULONG
typedef long Int32;
typedef unsigned long UInt32;
#else
typedef int Int32;
typedef unsigned int UInt32;
#endif
#ifdef _SZ_NO_INT_64
/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
NOTES: Some code will work incorrectly in that case! */
typedef long Int64;
typedef unsigned long UInt64;
#else
#if defined(_MSC_VER) || defined(__BORLANDC__)
#else
typedef long long int Int64;
typedef unsigned long long int UInt64;
#endif
#endif
#ifdef _LZMA_NO_SYSTEM_SIZE_T
#else
#endif
typedef int Bool;
#define False 0
#ifdef _MSC_VER
#if _MSC_VER >= 1300
#else
#define MY_NO_INLINE
#endif
#else
#define MY_CDECL
#define MY_STD_CALL
#define MY_FAST_CALL
#endif
/* The following interfaces use first parameter as pointer to structure */
typedef struct
{
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
(output(*size) < input(*size)) is allowed */
} ISeqInStream;
/* it can return SZ_ERROR_INPUT_EOF */
typedef struct
{
/* Returns: result - the number of actually written bytes.
(result < size) means error */
typedef enum
{
SZ_SEEK_SET = 0,
} ESzSeek;
typedef struct
{
typedef struct
{
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
(output(*size) > input(*size)) is not allowed
(output(*size) < input(*size)) is allowed */
/* offset must be <= output(*size) of Look */
/* reads directly (without buffer). It's same as ISeqInStream::Read */
/* reads via ILookInStream::Read */
typedef struct
{
} CLookToRead;
void LookToRead_Init(CLookToRead *p);
typedef struct
{
ISeqInStream s;
} CSecToLook;
void SecToLook_CreateVTable(CSecToLook *p);
typedef struct
{
ISeqInStream s;
} CSecToRead;
void SecToRead_CreateVTable(CSecToRead *p);
typedef struct
{
/* Returns: result. (result != SZ_OK) means break.
Value (UInt64)(Int64)-1 for size means unknown value. */
typedef struct
{
} ISzAlloc;
#endif