ftp.nice.ch/pub/next/developer/languages/smalltalk/squeak-2.0-0.3d109.NIHS.bs.tar.gz#/squeak-2.0/nextstep/BoTypes.h

This is BoTypes.h in view mode; [Download] [Up]

/******************************************************************************
FILE
	BoTypes.h
DESCRIPTION
	This file defines general types and constants.
AUTHORS
	<PJB> Pascal J. Bourguignon
MODIFICATIONS
	1989/08/07 <PJB> Creation.
	1991/03/04 <PJB> Updated for use with C version of Isdn Driver.
	1992/02/03 <PJB> Added PROCEDURE, METHOD, CONSTRUCTOR, DESTRUCTOR,
						IN, OUT, INOUT, FIELD, and VAR macros.
	1992/07/22 <PJB> Splited PJBTypes into BoInterface, BoTypes and 
						BoImplementation.
LEGAL
	Copyright Pascal J. Bourguignon 1989 - 1998

	This program is free software; you can redistribute it and/or
	modify it under the terms of the version 2 of the GNU General Public 
	License as published by the Free Software Foundation.
	
	This program is distributed in the hope that it will be useful, but 
	WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
	or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License 
	hereafter for more details.
*****************************************************************************/

#ifndef __BoTypes__
#define __BoTypes__	defined

typedef long int			INT32;
typedef short int			INT16;
typedef char				INT8;
typedef	unsigned long int	CARD32;
typedef	unsigned short int	CARD16;
typedef	unsigned char		CARD8;

#define MIN_INT32			((INT32)0x80000000)
#define MAX_INT32			((INT32)0x7fffffff)
#define MAX_CARD32			((CARD32)0xffffffff)
#define MIN_INT16			((INT32)0x8000)
#define MAX_INT16			((INT32)0x7fff)
#define MAX_CARD16			((CARD32)0xffff)
#define MIN_INT8			((INT32)0x80)
#define MAX_INT8			((INT32)0x7f)
#define MAX_CARD8			((CARD32)0xff)

typedef char				cstr255[256];
typedef char				cstr63[64];
typedef char				cstr31[32];

#define	NIL					((void*)(0))

typedef	unsigned char		BOOLEAN;
#ifdef TRUE
#undef TRUE
#endif
#ifdef FALSE
#undef FALSE
#endif
#define	TRUE				((BOOLEAN)(0==0))
#define	FALSE				((BOOLEAN)(0==1))

#define INC(i)		(++(i))
#define DEC(i)		(--(i))
#define INCR(i,n)	((i)+=(n))
#define DECR(i,n)	((i)-=(n))
#define ODD(i)		((((card32)(i))&1)!=0)
#define CHR(i)		((char)(i))
#define ORD(i)		((card32)(i))
#define VAL(t,v)	((t)(v))
#define ADR(v)		(&(v))
#define MOD			%
#define DIV			/
#define AND			&&
#define OR			||
#define NOT			!
#define INCL(s,x)	((s)|=(1<<(x)))
#define EXCL(s,x)	((s)&=(~(1<<(x))))
#define BITIN(b,s)	(((1<<(b))&(s))!=0)
#define FLAGIN(f,s)	(((f)&(s))!=0)


#define _BoType_obsoletes_
#ifdef _BoType_obsoletes_
#define int32  INT32
#define int16  INT16
#define int8   INT8
#define card32 CARD32
#define card16 CARD16
#define card8  CARD8
#define MIN_int32			((int32)0x80000000)
#define MAX_int32			((int32)0x7fffffff)
#define MAX_card32			((card32)0xffffffff)
#define MIN_int16			((int32)0x8000)
#define MAX_int16			((int32)0x7fff)
#define MAX_card16			((card32)0xffff)
#define MIN_int8			((int32)0x80)
#define MAX_int8			((int32)0x7f)
#define MAX_card8			((card32)0xff)
#endif

#endif	//__BoTypes__
/*** BoTypes.h / Thu Aug 27 23:19:45 MET 1998 / PJB ***/

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.